mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Stop probing all pixels when drawing a uniform colour.
This is simply unnecessary and wastes time. As part of this, simply remove the "all" directive. Only for a couple of tests is it even potentially interesting to validate all pixels (e.g. nointerpolation.shader_test), and for those "all" is replaced with an explicit (0, 0, 640, 480) rect. In all other cases we just probe (0, 0).
This commit is contained in:
committed by
Henri Verbeet
parent
021eb28584
commit
d3ba810c98
Notes:
Henri Verbeet
2024-06-14 00:05:14 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/908
@@ -10,7 +10,7 @@ float4 main() : sv_target
|
||||
[test]
|
||||
uniform 0 float 0.0
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (0.0, 0.0, 0.0, 0.0)
|
||||
probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0)
|
||||
|
||||
|
||||
[pixel shader]
|
||||
@@ -57,11 +57,11 @@ float4 main() : sv_target
|
||||
uniform 0 float4 0.0 1.5 1.5 0.0
|
||||
todo(glsl) draw quad
|
||||
% SM1-3 apparently treats '0/0' as zero.
|
||||
if(sm<4) todo probe all rgba (1010101.0, 11001100.0, 1101001.0, 11.0)
|
||||
if(sm<4) todo probe (0,0) rgba (1010101.0, 11001100.0, 1101001.0, 11.0)
|
||||
% SM4-5 optimises away the 'not' by inverting the condition, even though this is invalid for NaN.
|
||||
if(sm>=4 & sm<6) todo probe all rgba (1010101.0, 0.0, 1101001.0, 1.0)
|
||||
if(sm>=4 & sm<6) todo probe (0,0) rgba (1010101.0, 0.0, 1101001.0, 1.0)
|
||||
% SM6 emits the correct ordered/unordered instructions, so comparisons are false for NaN, and are made true with 'not'.
|
||||
if(sm>=6) probe all rgba (1010101.0, 11110000.0, 1101001.0, 1.0)
|
||||
if(sm>=6) probe (0,0) rgba (1010101.0, 11110000.0, 1101001.0, 1.0)
|
||||
|
||||
|
||||
% In shader model 2.0, native compares two numbers for equality checking if (a - b)*(a - b) is
|
||||
@@ -89,7 +89,7 @@ float4 main() : sv_target
|
||||
uniform 0 float4 1e-37 1e-37 1e+38 1e+38
|
||||
uniform 4 float4 0 -1e-37 1e+38 -1e+38
|
||||
draw quad
|
||||
probe all rgba (1.0, 1.0, 1.0, 0.0)
|
||||
probe (0, 0) rgba (1.0, 1.0, 1.0, 0.0)
|
||||
|
||||
|
||||
[require]
|
||||
@@ -108,7 +108,7 @@ float4 main() : sv_target
|
||||
uniform 0 float4 1e-37 1e-37 1e+38 1e+38
|
||||
uniform 4 float4 0 -1e-37 1e+38 -1e+38
|
||||
draw quad
|
||||
probe all rgba (0.0, 0.0, 1.0, 0.0)
|
||||
probe (0, 0) rgba (0.0, 0.0, 1.0, 0.0)
|
||||
|
||||
|
||||
[require]
|
||||
@@ -126,7 +126,7 @@ float4 main() : sv_target
|
||||
[test]
|
||||
uniform 0 float4 1.5 0.0 1.0 -1.0
|
||||
draw quad
|
||||
probe all rgba (1.0, 1.0, 0.0, 0.0)
|
||||
probe (0, 0) rgba (1.0, 1.0, 0.0, 0.0)
|
||||
|
||||
|
||||
[pixel shader]
|
||||
@@ -140,4 +140,4 @@ float4 main() : sv_target
|
||||
[test]
|
||||
uniform 0 float4 1.5 0.0 1.0 -1.0
|
||||
draw quad
|
||||
probe all rgba (0.0, 0.0, 1.0, 0.0)
|
||||
probe (0, 0) rgba (0.0, 0.0, 1.0, 0.0)
|
||||
|
Reference in New Issue
Block a user