-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash translating hull shader outputs #32
Comments
Output signature Patch Constant signature There is an access to o3 but the compiler is only looking at output signatures so it will return NULL since there is no o3 there. So the fix involves decoding the PCSG fourcc chunk and look for output registers there for certain phases. |
Is this something that you'd be able to take a look at(if you have the time) or I can. But I've had trouble finding documentation regarding the formats. Do you have anything that describes the format of PCSG chunks? |
I have pushed changes to decode PCSG. It is the same as output signatures. |
OK I have done a quick change to use the patch constants. The shader compiles but I have not looked into its correctness. |
Things are looking much better thanks to you. Here is another, similar crash. First there is the requirement to increase the number of max fork phases but that's an easy fix.
|
Previous code was limited to a single join phase and no more than two fork phases. Support for input and output patch constants is still incomplete.
I've encountered problem with translating hull shaders. GetOutputSignatureFromRegister in AddUserOutput returns a null reference. It appears that there is trouble when join phases have a lot of dcl_output instructions. After 8-10 instructions the register numbers get out of whack and the output signature cannot be retrieved.
Here is source to reproduce the issue, compiled with this command.
fxc.exe /Od /Gec /T hs_5_0 /Fo test.o /E HS_PNTriangles test.hlsl
The text was updated successfully, but these errors were encountered: