vkd3d/tests/hlsl/pointer-cast.shader_test
Elizabeth Figura d3ba810c98 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).
2024-06-13 23:55:31 +02:00

24 lines
503 B
Plaintext

[require]
shader model >= 6.0
[pixel shader]
uint u, v, w;
static float foo[3] = {0.25, 0.5, 0.75};
float4 main(float4 pos : SV_Position) : SV_Target
{
// Compiles to a constexpr uint pointer cast of foo for a store instruction.
if (v)
foo[1] = asfloat(w);
return float4(foo[u], foo[u + 1], 0.0, 1.0);
}
[test]
uniform 0 uint4 0 1 0x3e000000 0
draw quad
probe (0, 0) rgba (0.25, 0.125, 0.0, 1.0)
uniform 0 uint4 1 0 0x3e000000 0
draw quad
probe (0, 0) rgba (0.5, 0.75, 0.0, 1.0)