Module: vkd3d Branch: master Commit: af86cdf713307879aa55a0addc26f4b44890812d URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/af86cdf713307879aa55a0addc26f4...
Author: Conor McCarthy cmccarthy@codeweavers.com Date: Tue Dec 5 14:43:12 2023 +1000
tests/shader-runner: Add a non-const-indexing test for asfloat() result storage.
---
tests/hlsl/non-const-indexing.shader_test | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/tests/hlsl/non-const-indexing.shader_test b/tests/hlsl/non-const-indexing.shader_test index e7b814d3..82a6e321 100644 --- a/tests/hlsl/non-const-indexing.shader_test +++ b/tests/hlsl/non-const-indexing.shader_test @@ -196,6 +196,26 @@ draw quad probe all rgba (1126, 3344, 5566, 3788)
+[pixel shader] +uint i, j; + +float4 main() : sv_target +{ + float mut1[4] = {1, 2, 3, 4}; + + /* dxc emits a pointer bitcast, which results in a VSIR MOV with mismatched data types. */ + mut1[i] = asfloat(j); + + return float4(mut1[0], mut1[1], mut1[2], mut1[3]); +} + +[test] +uniform 0 uint 1 +uniform 1 uint 0x40a00000 +draw quad +probe all rgba (1, 5, 3, 4) + + [pixel shader] uniform float4 f[4]; uniform uint4 u;