Output storage class stores have effect in helper invocations
This change doesn't alter any code but confirms that SPIR-V stores to
variables in the Output storage class do alter local memory in helper
invocations, as confirmed by:
https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/5566
Bug: b/253701784
Change-Id: Ib2201724cfac65aaa0ec6fdd490cbbf72b0e0a6a
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/69828
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Pipeline/SpirvShaderMemory.cpp b/src/Pipeline/SpirvShaderMemory.cpp
index f7fd2dc..d281d08 100644
--- a/src/Pipeline/SpirvShaderMemory.cpp
+++ b/src/Pipeline/SpirvShaderMemory.cpp
@@ -534,10 +534,10 @@
// "Stores and atomics performed by helper invocations must not have any effect on memory..."
default:
return true;
- // "...except for the Function and Private storage classes".
+ // "...except for the Function, Private and Output storage classes".
case spv::StorageClassFunction:
case spv::StorageClassPrivate:
- case spv::StorageClassOutput: // TODO(b/253701784): We assume Output should be treated as Private.
+ case spv::StorageClassOutput:
return false;
}
}