You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec is unclear whether memory decorated with writeonly can be passed to, for example, atomicAdd. The atomic operations are specifically described to read then write the memory in question, so it seem reasonable that either writeonly or readonly should be invalid. Section 8.11 (Atomic Memory Functions) goes to some effort to say that restrict, coherent, and volatile are valid, but it makes no mention of readonly or writeonly.
However, we have discovered that the GIANTS Editor does this in many of its shaders, and closed-source drivers from both AMD and NVIDIA accept the shaders.
We discussed this in the 2022-01-19 meeting. The built in atomic functions should not be allowed on readonly or writeonly memory. We'll clarify the spec to explicitly forbid them, but being careful to not contradict the Vulkan memory model extension which has atomicRead and atomicWrite which would be allowed on readonly and writeonly respectively.
The spec is unclear whether memory decorated with
writeonly
can be passed to, for example,atomicAdd
. The atomic operations are specifically described to read then write the memory in question, so it seem reasonable that eitherwriteonly
orreadonly
should be invalid. Section 8.11 (Atomic Memory Functions) goes to some effort to say thatrestrict
,coherent
, andvolatile
are valid, but it makes no mention ofreadonly
orwriteonly
.However, we have discovered that the GIANTS Editor does this in many of its shaders, and closed-source drivers from both AMD and NVIDIA accept the shaders.
See also https://gitlab.freedesktop.org/mesa/mesa/-/issues/5842.
The text was updated successfully, but these errors were encountered: