summaryrefslogtreecommitdiffstats
path: root/tests/cross-compile
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-02-27 15:18:07 -0800
committerGitHub <noreply@github.com>2023-02-27 15:18:07 -0800
commita3ba22b51c371d5a20d61aa4e35233ba4f4f68db (patch)
tree704f8e9575fdd888d01137054b4c3887aaac9360 /tests/cross-compile
parentb1b76f06ca5bdfc4b688d99095dfb7d561a04d80 (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/cross-compile')
-rw-r--r--tests/cross-compile/array-of-buffers.slang.glsl10
-rw-r--r--tests/cross-compile/array-of-buffers.slang.hlsl10
2 files changed, 8 insertions, 12 deletions
diff --git a/tests/cross-compile/array-of-buffers.slang.glsl b/tests/cross-compile/array-of-buffers.slang.glsl
index 21961afd1..4ff86f36e 100644
--- a/tests/cross-compile/array-of-buffers.slang.glsl
+++ b/tests/cross-compile/array-of-buffers.slang.glsl
@@ -36,11 +36,9 @@ out vec4 _S6;
void main()
{
- vec4 _S7 = cb_0[C_0._data.index_0]._data.f_0;
- S_0 _S8 = ((sb1_0[C_0._data.index_0])._data[(C_0._data.index_0)]);
- vec4 _S9 = _S7 + _S8.f_0;
- vec4 _S10 = _S9 + ((sb2_0[C_0._data.index_0])._data[(C_0._data.index_0)]);
- uint _S11 = ((bb_0[C_0._data.index_0])._data[(int(C_0._data.index_0 * 4U))/4]);
- _S6 = _S10 + vec4(float(_S11));
+ S_0 _S7 = ((sb1_0[C_0._data.index_0])._data[(C_0._data.index_0)]);
+ vec4 _S8 = cb_0[C_0._data.index_0]._data.f_0 + _S7.f_0;
+ uint _S9 = ((bb_0[C_0._data.index_0])._data[(int(C_0._data.index_0 * 4U))/4]);
+ _S6 = _S8 + ((sb2_0[C_0._data.index_0])._data[(C_0._data.index_0)]) + vec4(float(_S9));
return;
}
diff --git a/tests/cross-compile/array-of-buffers.slang.hlsl b/tests/cross-compile/array-of-buffers.slang.hlsl
index 960957789..e709d323a 100644
--- a/tests/cross-compile/array-of-buffers.slang.hlsl
+++ b/tests/cross-compile/array-of-buffers.slang.hlsl
@@ -27,10 +27,8 @@ RWStructuredBuffer<float4 > sb2_0[int(5)] : register(u0);
ByteAddressBuffer bb_0[int(6)] : register(t4);
float4 main() : SV_TARGET
{
- float4 _S1 = cb_0[C_0.index_0].f_0;
- S_0 _S2 = sb1_0[C_0.index_0][C_0.index_0];
- float4 _S3 = _S1 + _S2.f_0;
- float4 _S4 = _S3 + sb2_0[C_0.index_0][C_0.index_0];
- uint _S5 = bb_0[C_0.index_0].Load(int(C_0.index_0 * 4U));
- return _S4 + (float4)float(_S5);
+ S_0 _S1 = sb1_0[C_0.index_0][C_0.index_0];
+ float4 _S2 = cb_0[C_0.index_0].f_0 + _S1.f_0;
+ uint _S3 = bb_0[C_0.index_0].Load(int(C_0.index_0 * 4U));
+ return _S2 + sb2_0[C_0.index_0][C_0.index_0] + (float4)float(_S3);
}