mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Allow effect calls on default value initializers.
This commit is contained in:
committed by
Henri Verbeet
parent
4aa262d773
commit
ffc1449412
Notes:
Henri Verbeet
2024-09-14 16:53:12 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1057
@@ -83,7 +83,7 @@ technique10
|
||||
// Without initializer
|
||||
technique10 < int a; > {}
|
||||
|
||||
[effect fail]
|
||||
[effect fail todo]
|
||||
// Only numeric types and strings are allowed
|
||||
technique10 < DepthStencilState ds = { 0 }; > {}
|
||||
|
||||
|
@@ -20,3 +20,11 @@ float4 main() : sv_target
|
||||
[test]
|
||||
todo(sm<6) draw quad
|
||||
probe (0, 0) rgba (0.1, 0.1, 0.2, 0.4)
|
||||
|
||||
|
||||
[pixel shader fail]
|
||||
float4 fun() { return 0; };
|
||||
|
||||
float a[CompileShader(ps_2_0, main())];
|
||||
|
||||
float4 main() : sv_target { return 0; }
|
||||
|
@@ -294,6 +294,17 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
|
||||
% This compiles but default values for 'p' aren't written to the output binary.
|
||||
[pixel shader fail(sm>=6)]
|
||||
float4 fun() { return 0; };
|
||||
float2 p = {5, CompileShader(ps_2_0, fun())};
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
return p.xyxy;
|
||||
}
|
||||
|
||||
|
||||
[require]
|
||||
shader model >= 5.0
|
||||
|
||||
|
@@ -161,13 +161,13 @@ float4 main() : sv_target { return 0; }
|
||||
PixelShader ps1 = {42}; // braces make the type checking more permissive.
|
||||
|
||||
% This compiles, but the default value of "f" is not written.
|
||||
[pixel shader todo fail(sm>=6)]
|
||||
[pixel shader fail(sm>=6)]
|
||||
float4 fun() : sv_target { return 0; }
|
||||
float f = {CompileShader(ps_2_0, fun())};
|
||||
float4 main() : sv_target { return f; }
|
||||
|
||||
% This also compiles, but the default value of "f" is not written.
|
||||
[pixel shader todo fail(sm>=6)]
|
||||
[pixel shader fail(sm>=6)]
|
||||
float4 fun() : sv_target { return 0; }
|
||||
float4 f = {1, 2, compile ps_2_0 fun(), 4};
|
||||
float4 main() : sv_target { return f; }
|
||||
@@ -225,7 +225,7 @@ shader model < 6.0
|
||||
|
||||
|
||||
% The following test segfaults on DXC.
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
float f;
|
||||
|
||||
float4 foo(uniform float r) : sv_target { return r; }
|
||||
@@ -247,7 +247,7 @@ technique
|
||||
float4 main() : sv_target { return 0; }
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
todo(glsl) draw quad
|
||||
probe (0, 0) rgba (0, 0, 0, 0)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user