mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
57280673e5
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.
121 lines
2.2 KiB
Plaintext
121 lines
2.2 KiB
Plaintext
% Test HLSL attribute syntax. The compiler ignores unrecognized attributes, so
|
|
% we need to get the parsing syntax right. Most of the following tests which
|
|
% succeed print warnings.
|
|
|
|
[pixel shader fail(sm>=6)]
|
|
|
|
[numthreads]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader fail(sm>=6)]
|
|
|
|
[ numthreads ]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader fail(sm>=6)]
|
|
|
|
[numthreads(1)]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader todo fail(sm>=6)]
|
|
|
|
[numthreads("")]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader todo fail(sm>=6)]
|
|
|
|
[numthreads("one")]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader todo fail(sm>=6)]
|
|
|
|
uniform float4 f;
|
|
|
|
[numthreads(1, "one", 3 + 9, -9.8e4, -float2(1, 2), f)]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader fail]
|
|
|
|
[numthreads()]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader fail]
|
|
|
|
[numthreads(1,)]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader fail]
|
|
|
|
[numthreads(f)]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader fail]
|
|
|
|
/* Test an invalid constructor. */
|
|
[numthreads(float2(1))]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader]
|
|
|
|
[not_a_real_attribute_name]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader]
|
|
|
|
uniform float4 f;
|
|
|
|
[f]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader fail]
|
|
% This is valid IDL syntax, but not HLSL.
|
|
[one, two]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader]
|
|
|
|
[one][two]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader fail(sm<6) todo]
|
|
|
|
[one][one]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader fail(sm<6) todo]
|
|
|
|
[one][one(1)]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader]
|
|
|
|
[one][One]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader fail(sm>=6)]
|
|
|
|
[numthreads]
|
|
float4 main();
|
|
|
|
[numthreads]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader]
|
|
|
|
/* Expressions with side effects are forbidden in attributes—see
|
|
* hlsl-numthreads.shader_test for an example—but not if the attribute is
|
|
* ignored. */
|
|
static int i = 1;
|
|
|
|
[one(i++)]
|
|
[two(++i)]
|
|
[three(i = 4)]
|
|
float4 main() : sv_target { return 0; }
|
|
|
|
[pixel shader fail(sm<6)]
|
|
|
|
[one]
|
|
float4 f;
|
|
|
|
float4 main() : sv_target { return 0; }
|