mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
tests/shader_runner: Add support for testing explicit descriptor mapping.
When no descriptor mapping is specified, the backend will just build the usual default mapping. Otherwise the explicit mapping is used. Once all backends support the explicit mapping, we'll be able to handle generating the default mapping in the shader runner core rather than having each backend implement its own algorithm. So far only the d3d12 backend supports explicit descriptor mapping.
This commit is contained in:
committed by
Henri Verbeet
parent
6b157cc149
commit
da6ce78c1c
Notes:
Henri Verbeet
2025-10-30 20:00:19 +01:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1805
98
tests/hlsl/descriptors.shader_test
Normal file
98
tests/hlsl/descriptors.shader_test
Normal file
@@ -0,0 +1,98 @@
|
||||
[require]
|
||||
shader model >= 5.0
|
||||
descriptors
|
||||
|
||||
[srv 0]
|
||||
format r32-float
|
||||
size (2d, 1, 1)
|
||||
|
||||
1.0
|
||||
|
||||
[srv 1]
|
||||
format r32-float
|
||||
size (2d, 1, 1)
|
||||
|
||||
2.0
|
||||
|
||||
[srv 2]
|
||||
format r32-float
|
||||
size (2d, 1, 1)
|
||||
|
||||
3.0
|
||||
|
||||
[pixel shader]
|
||||
Texture2D<float> t : register(t1);
|
||||
|
||||
float4 main() : SV_Target
|
||||
{
|
||||
return t.Load(uint3(0, 0, 0));
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) f32(2.0, 2.0, 2.0, 2.0)
|
||||
|
||||
[descriptors]
|
||||
t[1:1], space 0, srv 2
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) f32(3.0, 3.0, 3.0, 3.0)
|
||||
|
||||
[descriptors]
|
||||
t[1:2], space 0, srv 0
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) f32(1.0, 1.0, 1.0, 1.0)
|
||||
|
||||
[require]
|
||||
shader model >= 5.0
|
||||
descriptors
|
||||
format r32-float uav-load
|
||||
|
||||
[uav 1]
|
||||
format r32-float
|
||||
size (2d, 1, 1)
|
||||
|
||||
1.0
|
||||
|
||||
[uav 2]
|
||||
format r32-float
|
||||
size (2d, 1, 1)
|
||||
|
||||
2.0
|
||||
|
||||
[uav 3]
|
||||
format r32-float
|
||||
size (2d, 1, 1)
|
||||
|
||||
3.0
|
||||
|
||||
[pixel shader]
|
||||
RWTexture2D<float> u : register(u2);
|
||||
|
||||
float4 main() : SV_Target
|
||||
{
|
||||
return u[uint2(0, 0)];
|
||||
}
|
||||
|
||||
[descriptors]
|
||||
|
||||
[test]
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) f32(2.0, 2.0, 2.0, 2.0)
|
||||
|
||||
[descriptors]
|
||||
u[2:2], space 0, uav 3
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) f32(3.0, 3.0, 3.0, 3.0)
|
||||
|
||||
[descriptors]
|
||||
u[2:3], space 0, uav 1
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) f32(1.0, 1.0, 1.0, 1.0)
|
||||
Reference in New Issue
Block a user