mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Emit a hlsl_fixme() for HLSL_IR_CALL instructions.
Avoid outputting invalid shaders.
This commit is contained in:
parent
f9e7cb6345
commit
aa3badbd9d
Notes:
Alexandre Julliard
2023-01-31 22:50:33 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/65
@ -824,6 +824,10 @@ static void write_sm1_instructions(struct hlsl_ctx *ctx, struct vkd3d_bytecode_b
|
||||
|
||||
switch (instr->type)
|
||||
{
|
||||
case HLSL_IR_CALL:
|
||||
hlsl_fixme(ctx, &instr->loc, "Inline call instructions.\n");
|
||||
break;
|
||||
|
||||
case HLSL_IR_CONSTANT:
|
||||
write_sm1_constant(ctx, buffer, instr);
|
||||
break;
|
||||
|
@ -2360,6 +2360,10 @@ static void write_sm4_block(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *
|
||||
|
||||
switch (instr->type)
|
||||
{
|
||||
case HLSL_IR_CALL:
|
||||
hlsl_fixme(ctx, &instr->loc, "Inline call instructions.\n");
|
||||
break;
|
||||
|
||||
case HLSL_IR_CONSTANT:
|
||||
write_sm4_constant(ctx, buffer, hlsl_ir_constant(instr));
|
||||
break;
|
||||
|
@ -118,7 +118,7 @@ void func()
|
||||
{
|
||||
}
|
||||
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
|
||||
float func(in float a, out float b, inout float c)
|
||||
{
|
||||
@ -139,10 +139,10 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.5, 0.6, 0.7, 0)
|
||||
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
|
||||
void func(in float a, inout float2 b)
|
||||
{
|
||||
@ -160,7 +160,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.6, 0.1, 0.5, 0)
|
||||
|
||||
% Recursion is forbidden.
|
||||
|
@ -153,7 +153,7 @@ static int x = 1;
|
||||
[numthreads((x = 2), 1, 1)]
|
||||
void main() {}
|
||||
|
||||
[compute shader]
|
||||
[compute shader todo]
|
||||
|
||||
static int x = 1;
|
||||
|
||||
|
@ -38,7 +38,7 @@ float4x1 main() : sv_target
|
||||
draw quad
|
||||
probe all rgba (0.4, 0.3, 0.2, 0.1)
|
||||
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
float3 func()
|
||||
{
|
||||
return float3x1(0.4, 0.3, 0.2);
|
||||
@ -50,10 +50,10 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.4, 0.3, 0.2, 0.0)
|
||||
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
float3 func()
|
||||
{
|
||||
return float1x3(0.4, 0.3, 0.2);
|
||||
@ -65,10 +65,10 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.4, 0.3, 0.2, 0.0)
|
||||
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
float1x3 func()
|
||||
{
|
||||
return float3(0.4, 0.3, 0.2);
|
||||
@ -80,10 +80,10 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.4, 0.3, 0.2, 0.0)
|
||||
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
float3x1 func()
|
||||
{
|
||||
return float3(0.4, 0.3, 0.2);
|
||||
@ -95,7 +95,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.4, 0.3, 0.2, 0.0)
|
||||
|
||||
[pixel shader fail]
|
||||
@ -120,7 +120,7 @@ float4 main() : sv_target
|
||||
return float4(func(), 0.0);
|
||||
}
|
||||
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
float3 func()
|
||||
{
|
||||
return float4(0.4, 0.3, 0.2, 0.1);
|
||||
@ -132,10 +132,10 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.4, 0.3, 0.2, 0.0)
|
||||
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
float3 func()
|
||||
{
|
||||
return float4x1(0.4, 0.3, 0.2, 0.1);
|
||||
@ -147,10 +147,10 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.4, 0.3, 0.2, 0.0)
|
||||
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
float3 func()
|
||||
{
|
||||
return float1x4(0.4, 0.3, 0.2, 0.1);
|
||||
@ -162,7 +162,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.4, 0.3, 0.2, 0.0)
|
||||
|
||||
[pixel shader fail todo]
|
||||
@ -176,7 +176,7 @@ float4 main() : sv_target
|
||||
return float4(func(), 0.0);
|
||||
}
|
||||
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
float3x1 func()
|
||||
{
|
||||
return float4x1(0.4, 0.3, 0.2, 0.1);
|
||||
@ -188,7 +188,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.4, 0.3, 0.2, 0.0)
|
||||
|
||||
[pixel shader fail]
|
||||
@ -202,7 +202,7 @@ float4 main() : sv_target
|
||||
return float4(func(), 0.0);
|
||||
}
|
||||
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
float1x3 func()
|
||||
{
|
||||
return float4(0.4, 0.3, 0.2, 0.1);
|
||||
@ -214,7 +214,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.4, 0.3, 0.2, 0.0)
|
||||
|
||||
[pixel shader fail]
|
||||
@ -228,7 +228,7 @@ float4 main() : sv_target
|
||||
return float4(func(), 0.0);
|
||||
}
|
||||
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
float1x3 func()
|
||||
{
|
||||
return float1x4(0.4, 0.3, 0.2, 0.1);
|
||||
@ -240,5 +240,5 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.4, 0.3, 0.2, 0.0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
float myfunc()
|
||||
{
|
||||
return 0.6;
|
||||
@ -12,7 +12,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.8, 0.0, 0.0, 0.0)
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
[pixel shader]
|
||||
[pixel shader todo]
|
||||
void sub2(in uniform float4 i, out float4 o)
|
||||
{
|
||||
o = i;
|
||||
@ -17,5 +17,5 @@ void main(in uniform float4 a, uniform float4 b, out float4 o : sv_target)
|
||||
[test]
|
||||
uniform 0 float4 0.1 0.0 0.0 0.0
|
||||
uniform 4 float4 0.2 0.0 0.0 0.0
|
||||
draw quad
|
||||
todo draw quad
|
||||
todo probe all rgba (0.1, 0.2, 0.3, 0.4)
|
||||
|
@ -7,7 +7,7 @@ size (1, 1)
|
||||
|
||||
0.1 0.2 0.3 0.4
|
||||
|
||||
[compute shader]
|
||||
[compute shader todo]
|
||||
|
||||
RWTexture2D<float4> u;
|
||||
|
||||
@ -23,5 +23,5 @@ void main()
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 1 1 1
|
||||
todo dispatch 1 1 1
|
||||
todo probe uav 0 (0, 0) rgba (0.1, 0.3, 0.3, 0.5)
|
||||
|
Loading…
Reference in New Issue
Block a user