KhronosGroup / SPIRV-Registry

SPIR-V specs
109 stars 72 forks source link

OpPtrDiff with mix of untyped and typed pointers #262

Closed ErikHogeman closed 3 weeks ago

ErikHogeman commented 1 month ago

Hi, the current spec language for OpPtrDiff is explicit about what happens if you have two typed pointers or two untyped pointers, but to me it's not too clear what the expectation is when mixing typed with untyped pointers. Would it be possible to clarify whether this is allowed or not and what is expected to happen in that case?

alan-baker commented 1 month ago

For reference, spirv-val currently requires the types of both operands to match. So both untyped or both typed. It would be possible to mix types if we treated it in the same manner as OpCopyMemory such that the result is based on the typed operand.