-
Notifications
You must be signed in to change notification settings - Fork 665
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
[SPIR-V] OpConstantNull Result Type <id> '12[%type_2d_image]' cannot have a null value #6653
Comments
Hi! Thanks for the report & nice catch! |
@Keenuts See if you can find the reason in the history. I prefer using OpConstantNull when possible because if that code is triggered, it will give consistent results. That would be easier to debug. For types where OpConstantNull is not allowed, using undef is a good. |
Original addition was #809 As for using |
Before this change, OpConstantNull was emitted when an undef value was required. This causes an issue for some types which cannot have the OpConstantNull value. In addition, it mixed well-defined values with undefined values, which prevents any kind of optimization/analysis later on. Fixes microsoft#6653 Signed-off-by: Nathan Gauër <brioche@google.com>
Before this change, OpConstantNull was emitted when an undef value was required. This causes an issue for some types which cannot have the OpConstantNull value. In addition, it mixed well-defined values with undefined values, which prevents any kind of optimization/analysis later on. Fixes microsoft#6653 Signed-off-by: Nathan Gauër <brioche@google.com>
Before this change, OpConstantNull was emitted when an undef value was required. This causes an issue for some types which cannot have the OpConstantNull value. In addition, it mixed well-defined values with undefined values, which prevents any kind of optimization/analysis later on. Fixes #6653 --------- Signed-off-by: Nathan Gauër <brioche@google.com>
Description
Invalid spirv generated when calling a function that returns a texture depending on a condition
Steps to Reproduce
Shader Playground
Actual Behavior
fatal error: generated SPIR-V is invalid: OpConstantNull Result Type '12[%type_2d_image]' cannot have a null value.
%13 = OpConstantNull %type_2d_image
Environment
DXC Trunk, no optimization
The text was updated successfully, but these errors were encountered: