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
spirv-opt: OpAccessChain without indices is not supported #3643
Comments
@alan-baker @s-perron ping |
@alan-baker Where did the spec come done on the legality of this? I remember we had discussions about it because some optimizations assume at least one index. However, I forget the result. |
It was left as valid because there are a reasonable number of code generators that generate this case. |
spirv-opt doesn't support this case, though. This SPIR-V
produces an error
when executed with the following command Compiled shader is in the attached file . |
In an internal discussion, it was suggested that the pointer operand must point to a composite (as implied by the spec). Thus, this can be regarded as a spirv-val bug. And 0 indices is fine, so this can be classed as a spirv-opt bug. |
* Handle no index access chain in local access chain convert Fixes #3643
…oup#3678) * Handle no index access chain in local access chain convert Fixes KhronosGroup#3643
The following SPIR-V passes
spirv-val
's checksIn this code, the
Base
operand of theOpAccessChain
is not a pointer to a composite. Also, indices operands are missing. The same issue arises withOpInBoundsAccessChain
.The text was updated successfully, but these errors were encountered: