vkd3d/tests/hlsl/state-block-syntax.shader_test
Conor McCarthy 57280673e5 tests/shader-runner: Test shaders with dxcompiler.
The location of dxcompiler should be set during configuration with
'DXCOMPILER_LIBS=-L/path/to/dxcompiler', and then at runtime with
LD_LIBRARY_PATH, WINEPATH or PATH as applicable.

A new 'fail(sm<6)' decoration is needed on many shader declarations
because dxcompiler succeeds on many shaders which fail with fxc. The
opposite case is less common and is flagged with 'fail(sm>=6)'. A few
tests cause dxcompiler to crash or hang, so these are avoided using
[require], which now skips tests until reset instead of exiting. Also,
'todo(sm<6)' and 'todo(sm>=6)' are used to separate checking of results.
2023-10-11 22:21:14 +02:00

174 lines
2.1 KiB
Plaintext

[pixel shader fail(sm<6)]
sampler s
{
foo = float;
};
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail(sm<6)]
sampler s = sampler_state
{
foo = float;
};
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail(sm<6)]
sampler s
{
2 = 3;
};
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail(sm<6)]
sampler s
{
2;
};
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail(sm<6)]
sampler s
{
foo;
};
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail(sm<6)]
sampler s
{
foo = bar
};
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail]
sampler s {}
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail]
float f {} = 1;
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail]
float f = 1 {};
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail]
sampler s = sampler_state;
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail]
float f {} : register(c1);
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail(sm<6)]
float f
{
foo = (sampler)2;
};
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail(sm<6)]
float f
{
foo = (faketype)2;
};
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail(sm<6)]
float f
{
foo = (sampler)bar;
};
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader fail(sm<6)]
float f
{
foo = bar();
};
float4 main() : sv_target
{
return float4(0, 0, 0, 0);
}
[pixel shader]
float u : register(c1) {};
float4 main() : sv_target
{
float zero = 0;
float a {};
float b
{
foo = bar;
foo = bar;
foo = (int)2;
foo = (int)bar;
foo = float4(bar, baz, qux, xyzzy);
foo = zero++;
};
float c {}, d = 1, e;
struct {int a;} s {foo = bar;};
return float4(0, 1, zero, 1);
}
[test]
draw quad
probe all rgba (0, 1, 0, 1)