mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
tests/hlsl: Add some structured copy tests.
This commit is contained in:
Notes:
Henri Verbeet
2025-12-08 17:48:57 +01:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1836
@@ -44,6 +44,53 @@ uniform 0 uint 1
|
||||
todo(msl | glsl) draw quad
|
||||
probe (0, 0) rgba(4.0, 5.0, 6.0, 7.0)
|
||||
|
||||
[pixel shader todo]
|
||||
typedef float4 arr[2];
|
||||
|
||||
uniform uint4 idx;
|
||||
StructuredBuffer<arr> buffer;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
float4 xs[2] = buffer[idx.x];
|
||||
return xs[idx.y];
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 uint4 0 0 0 0
|
||||
todo(sm<6 | msl) draw quad
|
||||
probe (0, 0) f32(0.0, 1.0, 2.0, 3.0)
|
||||
uniform 0 uint4 0 1 0 0
|
||||
todo(sm<6 | msl) draw quad
|
||||
probe (0, 0) f32(4.0, 5.0, 6.0, 7.0)
|
||||
uniform 0 uint4 1 0 0 0
|
||||
todo(sm<6 | msl) draw quad
|
||||
probe (0, 0) f32(8.0, 9.0, 10.0, 11.0)
|
||||
|
||||
[pixel shader todo]
|
||||
struct banana
|
||||
{
|
||||
float2 x;
|
||||
float2 y;
|
||||
};
|
||||
|
||||
uniform uint idx;
|
||||
StructuredBuffer<banana> buffer;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
banana b = buffer[idx];
|
||||
return float4(b.x, b.y);
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 uint 0
|
||||
todo(sm<6 | msl) draw quad
|
||||
probe (0, 0) f32(0.0, 1.0, 2.0, 3.0)
|
||||
uniform 0 uint 1
|
||||
todo(sm<6 | msl) draw quad
|
||||
probe (0, 0) f32(4.0, 5.0, 6.0, 7.0)
|
||||
|
||||
[srv 0]
|
||||
stride 12
|
||||
size (buffer, 5)
|
||||
@@ -481,3 +528,23 @@ float4 main() : sv_target
|
||||
{
|
||||
return tex.Load(int3(1, 2, 3))[1];
|
||||
}
|
||||
|
||||
[require]
|
||||
shader model >= 5.0
|
||||
geometry-shader
|
||||
|
||||
[geometry shader todo]
|
||||
struct gs_data
|
||||
{
|
||||
float2 x : X;
|
||||
float2 y : Y;
|
||||
};
|
||||
|
||||
uniform uint idx;
|
||||
StructuredBuffer<gs_data> buffer;
|
||||
|
||||
[maxvertexcount(4)]
|
||||
void main(point gs_data vin[1], inout TriangleStream<gs_data> vout)
|
||||
{
|
||||
vout.Append(buffer[idx]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user