mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
tests/shader-runner: Introduce "if" qualifier.
When the "if" qualifier is added to a directive, the directive is skipped if the shader->minimum_shader_model is not included in the range. This can be used on the "probe" directives for tests that have different expected results on different shader models, without having to resort to [require] blocks.
This commit is contained in:
committed by
Alexandre Julliard
parent
faec42e8a1
commit
22c47e57f5
Notes:
Alexandre Julliard
2024-02-13 23:11:43 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/616
@ -236,9 +236,6 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
% FXC is incapable of compiling this correctly, but results differ for SM1-3 vs SM4-5.
|
||||
[require]
|
||||
shader model < 4.0
|
||||
|
||||
[test]
|
||||
uniform 0 float 1.0
|
||||
uniform 4 float 2.0
|
||||
@ -246,32 +243,7 @@ uniform 8 float 3.0
|
||||
uniform 12 float 4.0
|
||||
uniform 16 uint4 3 1 0 2
|
||||
uniform 20 uint4 0 3 1 2
|
||||
todo draw quad
|
||||
todo(sm<4) probe all rgba (1.0, 1.0, 1.0, 1.0)
|
||||
|
||||
[require]
|
||||
shader model >= 4.0
|
||||
shader model < 6.0
|
||||
|
||||
[test]
|
||||
uniform 0 float 1.0
|
||||
uniform 4 float 2.0
|
||||
uniform 8 float 3.0
|
||||
uniform 12 float 4.0
|
||||
uniform 16 uint4 3 1 0 2
|
||||
uniform 20 uint4 0 3 1 2
|
||||
draw quad
|
||||
todo probe all rgba (4.0, 4.0, 4.0, 4.0)
|
||||
|
||||
[require]
|
||||
shader model >= 6.0
|
||||
|
||||
[test]
|
||||
uniform 0 float 1.0
|
||||
uniform 4 float 2.0
|
||||
uniform 8 float 3.0
|
||||
uniform 12 float 4.0
|
||||
uniform 16 uint4 3 1 0 2
|
||||
uniform 20 uint4 0 3 1 2
|
||||
draw quad
|
||||
probe all rgba (4.0, 3.0, 2.0, 1.0)
|
||||
todo(sm<4) draw quad
|
||||
if(sm<4) todo probe all rgba (1.0, 1.0, 1.0, 1.0)
|
||||
if(sm>=4 & sm<6) todo probe all rgba (4.0, 4.0, 4.0, 4.0)
|
||||
if(sm>=6) probe all rgba (4.0, 3.0, 2.0, 1.0)
|
||||
|
Reference in New Issue
Block a user