-
Notifications
You must be signed in to change notification settings - Fork 353
Stencil reads are S,X,X,X. (but expect S,S,S,S or S,0,0,1) #1978
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
Conversation
kvark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, assuming that we can indeed rely on these two possibilities.
spec/index.bs
Outdated
| <td>1 − 4 | ||
| <td>stencil | ||
| <td>{{GPUTextureSampleType/"uint"}} | ||
| <td>`vec4<u32>(S, S, S, S)` or `vec4<u32>(S, 0, 0, 1)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can also write vec4<u32>(S)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be S,X,X,X
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this matches the prose below.
|
Resolution: Make this non-normative because Metal doesn't actually guarantee this. |
More specifically, our consensus is that it's not worth it to try to make this normative. (not just because Metal doesn't guarantee it per se) Making it normative can exert pressure to keep just these two possibilities, so that no one ends up adding a third. (like S,0,0,0?) Probably not a big concern. |
kainino0x
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think we also needed to do something like this for binding depth textures as non-depth textures? But we can follow up with it.
I thought the response from Apple was that it's just UB and we aren't supposed to do this at all. (i.e. it's not just the swizzling problem). |
|
Oh yeah, I think you're right. Can't keep all this stuff in my head |
spec/index.bs
Outdated
| <td>1 − 4 | ||
| <td>stencil | ||
| <td>{{GPUTextureSampleType/"uint"}} | ||
| <td>`vec4<u32>(S, S, S, S)` or `vec4<u32>(S, 0, 0, 1)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this matches the prose below.
But probably S,S,S,S or S,0,0,1.
Closes #1198.
Preview | Diff