You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
25 is a boolean while 29, 27, 28 are all floating-point vectors. In SPIR-V spec, it says: Condition must be a scalar or vector of Boolean type. It must have the same number of components as Result Type.
So apparently, it violates the spec. Do I miss something? In LLVM spec, the condition could be a scalar (perform vector selection) or a vector (perform component-wise selection). I want to confirm whether it is a spec bug or a glslang bug.
Thank you.
The text was updated successfully, but these errors were encountered:
It would be valuable to have a selection instruction that took a bool and selected between two composite objects of the same type. SPIR-V is quite clear that OpSelect does not do that (as you quoted), but I think that's what the implementation expected.
So, for now the implementation needs to be fixed in glslang, but I'd also like a spec issue to request the new behavior; it has come up for selecting between two structures as well, without having to use control flow.
We have encountered an issue of OpSelect, here is the shader:
This is the SPIR-V
Please pay attention to these instructions:
25 is a boolean while 29, 27, 28 are all floating-point vectors. In SPIR-V spec, it says:
Condition must be a scalar or vector of Boolean type. It must have the same number of components as Result Type.
So apparently, it violates the spec. Do I miss something? In LLVM spec, the condition could be a scalar (perform vector selection) or a vector (perform component-wise selection). I want to confirm whether it is a spec bug or a glslang bug.
Thank you.
The text was updated successfully, but these errors were encountered: