-
Notifications
You must be signed in to change notification settings - Fork 76
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
Inconsistency regarding OpPtrAccessChain and storage classes #107
Comments
If I am reading your question correctly, why do you think you can't have a
|
Section 2.2.2 defines a variable pointer as:
There are no further restrictions given, so that implies all results of OpPtrAccessChain are variable pointers, regardless of operands. Furthermore, if the variable ptr capability is not declared, 2.16 excludes a logical pointer (which pointers within the Push Constant storage classe are) from being the result of
This is a problem for at least one implementation: Mesa assumes this all means My understanding is to get this fixed in Mesa will require clarification from the specification on where exactly |
Khronos is discussing a clarification. OpPtrAccessChain with push constants is never intended to be a valid usage. |
There seems to be conflicting information regarding what pointers OpPtrAccessChain may be applied to:
The spec classifies values obtained from that instruction as "variable pointers" (2.2.2, page 19), and later in 2.16.1 it says variable pointers may only point to
StorageBuffer
andWorkgroup
storage classes.But in the definition of
OpPtrAccessChain
, it is explicitly specified what the behavior is when using theElement
operand to offset a pointer in thePushConstant
storage class, and the behavior is also implied to be valid (but the offset impl-defined) for other storage classes too.The text was updated successfully, but these errors were encountered: