mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests/hlsl: Add a few extra structured buffer matrix load + swizzle tests.
This commit is contained in:
committed by
Henri Verbeet
parent
721859005f
commit
161d463f3c
Notes:
Henri Verbeet
2025-08-05 16:40:11 +02:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1457
@@ -283,6 +283,47 @@ todo(sm<6 | msl) draw quad
|
|||||||
if(sm<6) probe(0, 0) rgba(7.0, 8.0, 9.0, 1.0)
|
if(sm<6) probe(0, 0) rgba(7.0, 8.0, 9.0, 1.0)
|
||||||
if(sm>=6) probe(0, 0) rgba(7.0, 9.0, 11.0, 1.0)
|
if(sm>=6) probe(0, 0) rgba(7.0, 9.0, 11.0, 1.0)
|
||||||
|
|
||||||
|
[pixel shader todo]
|
||||||
|
StructuredBuffer<float2x3> buf;
|
||||||
|
|
||||||
|
uniform uint buf_idx;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
return float4(buf[buf_idx]._22_23_13, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
uniform 0 uint 0
|
||||||
|
todo(sm<6 | msl) draw quad
|
||||||
|
probe (0, 0) f32(4.0, 6.0, 5.0, 1.0)
|
||||||
|
|
||||||
|
uniform 0 uint 1
|
||||||
|
todo(sm<6 | msl) draw quad
|
||||||
|
probe (0, 0) f32(10.0, 12.0, 11.0, 1)
|
||||||
|
|
||||||
|
[pixel shader todo]
|
||||||
|
typedef row_major float2x3 rm_float2x3;
|
||||||
|
StructuredBuffer<rm_float2x3> buf;
|
||||||
|
|
||||||
|
uniform uint buf_idx;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
return float4(buf[buf_idx]._22_23_13, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
uniform 0 uint 0
|
||||||
|
todo(sm<6 | msl) draw quad
|
||||||
|
if(sm<6) probe (0, 0) f32(5.0, 6.0, 3.0, 1.0)
|
||||||
|
if(sm>=6) probe (0, 0) f32(4.0, 6.0, 5.0, 1.0)
|
||||||
|
|
||||||
|
uniform 0 uint 1
|
||||||
|
todo(sm<6 | msl) draw quad
|
||||||
|
if(sm<6) probe (0, 0) f32(11.0, 12.0, 9.0, 1.0)
|
||||||
|
if(sm>=6) probe (0, 0) f32(10.0, 12.0, 11.0, 1.0)
|
||||||
|
|
||||||
[srv 0]
|
[srv 0]
|
||||||
stride 20
|
stride 20
|
||||||
size (buffer, 3)
|
size (buffer, 3)
|
||||||
@@ -430,3 +471,13 @@ probe (0, 0) rgba(0.0, 1.0, 2.0, 3.0)
|
|||||||
uniform 0 uint 1
|
uniform 0 uint 1
|
||||||
todo(sm<6 | msl) draw quad
|
todo(sm<6 | msl) draw quad
|
||||||
probe (0, 0) rgba(5.0, 6.0, 7.0, 8.0)
|
probe (0, 0) rgba(5.0, 6.0, 7.0, 8.0)
|
||||||
|
|
||||||
|
% Check that an index load of a non-structured resource load
|
||||||
|
% is not interpreted as a structured resource load.
|
||||||
|
[pixel shader]
|
||||||
|
Texture2D<float4> tex;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
return tex.Load(int3(1, 2, 3))[1];
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user