mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Test shader compilation within function definitions.
This commit is contained in:
parent
7363fd2816
commit
e9260bba3a
Notes:
Henri Verbeet
2024-08-20 21:34:57 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1006
@ -66,6 +66,17 @@ technique
|
|||||||
float4 main() : sv_target { return 0; }
|
float4 main() : sv_target { return 0; }
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader fail(sm<6)]
|
||||||
|
float4 fun() : sv_target { return 0; }
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
PixelShader ps1 = compile ps_2_0 fun(); // Object literals not allowed inside functions.
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
% Test the CompileShader() syntax.
|
% Test the CompileShader() syntax.
|
||||||
[pixel shader todo fail(sm>=6)]
|
[pixel shader todo fail(sm>=6)]
|
||||||
float arg1, arg2;
|
float arg1, arg2;
|
||||||
@ -139,3 +150,14 @@ float4 main() : sv_target { return 0; }
|
|||||||
|
|
||||||
PixelShader ps1 = CompileShader(ps_2_0, main());
|
PixelShader ps1 = CompileShader(ps_2_0, main());
|
||||||
PixelShader ps2 = ps1;
|
PixelShader ps2 = ps1;
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader fail(sm<6)]
|
||||||
|
float4 fun() : sv_target { return 0; }
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
PixelShader ps1 = CompileShader(ps_2_0, fun()); // Object literals not allowed inside functions.
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user