diff options
| author | Yong He <yonghe@outlook.com> | 2023-02-27 15:18:07 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-27 15:18:07 -0800 |
| commit | a3ba22b51c371d5a20d61aa4e35233ba4f4f68db (patch) | |
| tree | 704f8e9575fdd888d01137054b4c3887aaac9360 /tests/bugs | |
| parent | b1b76f06ca5bdfc4b688d99095dfb7d561a04d80 (diff) | |
Detect and deduplicate read-only resource access. (#2680)
* Detect and deduplicate read-only resource access.
* Fix tests.
* Fix tests.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/bugs')
| -rw-r--r-- | tests/bugs/texture2d-ms.hlsl | 4 | ||||
| -rw-r--r-- | tests/bugs/texture2d-ms.hlsl.glsl | 15 |
2 files changed, 11 insertions, 8 deletions
diff --git a/tests/bugs/texture2d-ms.hlsl b/tests/bugs/texture2d-ms.hlsl index 1d8293937..3fb84f72d 100644 --- a/tests/bugs/texture2d-ms.hlsl +++ b/tests/bugs/texture2d-ms.hlsl @@ -3,8 +3,10 @@ [[vk::binding(0, 0)]] Texture2DMS tex : register(t1); +RWStructuredBuffer<float4> outBuffer; + [numthreads(4, 4, 1)] void main(uint3 groupId : SV_GroupID) { - tex.Load(int2(groupId.xy), 0); + outBuffer[0] = tex.Load(int2(groupId.xy), 0); } diff --git a/tests/bugs/texture2d-ms.hlsl.glsl b/tests/bugs/texture2d-ms.hlsl.glsl index ba0d571dd..40ce5f9de 100644 --- a/tests/bugs/texture2d-ms.hlsl.glsl +++ b/tests/bugs/texture2d-ms.hlsl.glsl @@ -1,16 +1,17 @@ -// texture2d-ms.hlsl.glsl -//TEST_IGNORE_FILE: - #version 450 +#extension GL_EXT_samplerless_texture_functions : require layout(row_major) uniform; layout(row_major) buffer; -#extension GL_EXT_samplerless_texture_functions : require layout(binding = 0) uniform texture2DMS tex_0; -layout(local_size_x = 4, local_size_y = 4, local_size_z = 1) in;void main() +layout(std430, binding = 1) buffer _S1 { + vec4 _data[]; +} outBuffer_0; +layout(local_size_x = 4, local_size_y = 4, local_size_z = 1) in; +void main() { - vec4 _S1 = (texelFetch((tex_0), (ivec2(gl_WorkGroupID.xy)), (0))); + vec4 _S2 = (texelFetch((tex_0), (ivec2(gl_WorkGroupID.xy)), (0))); + ((outBuffer_0)._data[(0U)]) = _S2; return; } - |
