KhronosGroup / SPIRV-Registry

SPIR-V specs
110 stars 76 forks source link

SPV_KHR_untyped_pointers extension does not allow untyped access chain instructions in OpSpecConstantOp #285

Open vmaksimo opened 3 weeks ago

vmaksimo commented 3 weeks ago

OpUntypedAccessChainKHR, OpUntypedInBoundsAccessChainKHR, OpUntypedPtrAccessChainKHR, OpUntypedInBoundsPtrAccessChainKHR are analogue instructions to their "typed" versions of access chain instructions.

It seems the extension should have extend the rules for OpSpecConstantOp by allowing untyped access chain operands to also be accepted. The only restriction the specification has is about the scope of the Base which can be found in untyped instructions as well:

for the AccessChain named opcodes, their Base is allowed to be a global (module scope) OpVariable instruction.

bashbaug commented 2 weeks ago

Hi, thank you for raising this issue. We plan to address it in an upcoming revision of the extension. Thanks again!