tests: Prepare for 1.x, part 1/many.
Merge request reports
Activity
9 9 10 10 [test] 11 11 draw quad 12 probe (0, 0) rgba (20.0, -10.0, 75.0, 0.33333333) 12 probe (0, 0) rgba (0.20, -0.10, 0.0075, 0.33333333) 1 13 13 14 14 [pixel shader] 15 15 float4 main() : SV_TARGET 16 16 { 17 float x = 5.0; 18 float y = 15.0; 17 float x = 0.05; 18 float y = 0.15; 19 19 20 return float4(x % y, +x, -x, y / x); 20 return float4(x % y, +x, -x, y % x); - Comment on lines -20 to +20
Rather than removing the division entirely, couldn't we test for different behaviors for SM1.x and all the others? BTW, what's the expected behavior here? I suppose that (leaving
y / x
) the constant propagator puts a 3 there, and that 3 is clamped to 1. Does that clamping happen before writing to SM1 or when executing it? I.e., if having a constant outside [-1, 1] outright illegal in SM1, or is it legal, but then the constant is clamped at execution time? Rather than removing the division entirely, couldn't we test for different behaviors for SM1.x and all the others?
There will be many, many cases of this. I would rather test that sm1 constant propagation works as expected, and then, elsewhere, have a dedicated test showing that sm1 clamps. Which isn't really a shader test, rather it's more in the purview of Wine, because...
BTW, what's the expected behavior here? I suppose that (leaving
y / x
) the constant propagator puts a 3 there, and that 3 is clamped to 1. Does that clamping happen before writing to SM1 or when executing it? I.e., if having a constant outside [-1, 1] outright illegal in SM1, or is it legal, but then the constant is clamped at execution time?It's done at runtime. The shader has the real constant in it.
13 13 draw quad 14 probe (0, 0) rgba (20.0, -10.0, 75.0, 0.33333333) 1 14 probe (0, 0) rgba (0.20, -0.10, 0.0075, -0.15) 1 15 15 16 [pixel shader] 16 17 % 1.x has no division or modulo. 18 [pixel shader notimpl(sm<2)] 17 19 uniform float2 a; 18 20 19 21 float4 main() : SV_TARGET 20 22 { 21 23 float x = a.x; 22 24 float y = a.y; 23 return float4(x % y, +x, -x, y / x); 25 return float4(x / y, -x / y, x / -y, -x / -y); added 4 commits
Toggle commit listadded 86 commits
-
8c89359c...5b2d62e5 - 79 commits from branch
wine:master
- 5f55f5ad - tests: Adjust angle-unit.shader_test to pass with 1.x.
- 8b4f0f34 - tests: Adjust arithmetic-float.shader_test to pass with 1.x.
- fb75c053 - tests: Adjust arithmetic-float-uniform.shader_test to pass with 1.x.
- e40b1919 - tests: Adjust arithmetic-int.shader_test to pass with 1.x.
- e5ec52d6 - tests: Adjust array-parameters.shader_test to pass with 1.x.
- e805fe3e - tests: Adjust array-size-expr.shader_test to pass with 1.x.
- 004a381d - tests: Adjust abs.shader_test to pass with 1.x.
Toggle commit list-
8c89359c...5b2d62e5 - 79 commits from branch