mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
This fixes the assertion error
"sm4_generate_vsir_instr_expr Failed assertion: dst_type->e.numeric.type == HLSL_TYPE_BOOL"
which occurs when compiling the following HLSL shader using the ps_4_0 target profile:
uniform float4 x;
uniform bool b;
float4 main() : SV_Target
{
if (!b)
clip(x.x);
else
clip(x.y);
return x;
}
59 lines
1.1 KiB
Plaintext
59 lines
1.1 KiB
Plaintext
[pixel shader]
|
|
uniform float4 x;
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
clip(x);
|
|
return x;
|
|
}
|
|
|
|
[test]
|
|
uniform 0 float4 1 2 3 4
|
|
todo(glsl) draw quad
|
|
probe (0, 0) f32(1, 2, 3, 4)
|
|
uniform 0 float4 9 8 7 6
|
|
todo(glsl) draw quad
|
|
probe (0, 0) f32(9, 8, 7, 6)
|
|
uniform 0 float4 -1 8 7 6
|
|
todo(glsl) draw quad
|
|
probe (0, 0) f32(9, 8, 7, 6)
|
|
uniform 0 float4 9 0 7 6
|
|
todo(glsl) draw quad
|
|
probe (0, 0) f32(9, 0, 7, 6)
|
|
uniform 0 float4 3 -8 3 0
|
|
todo(glsl) draw quad
|
|
probe (0, 0) f32(9, 0, 7, 6)
|
|
uniform 0 float4 3 3 3 -1
|
|
todo(glsl) draw quad
|
|
probe (0, 0) f32(9, 0, 7, 6)
|
|
|
|
[pixel shader]
|
|
uniform float4 x;
|
|
uniform bool b;
|
|
|
|
float4 main() : SV_Target
|
|
{
|
|
if (!b)
|
|
clip(x.x);
|
|
else
|
|
clip(x.y);
|
|
|
|
return x;
|
|
}
|
|
|
|
[test]
|
|
uniform 0 float4 1 -2 3 4
|
|
if(sm<4) uniform 4 float 0
|
|
if(sm>=4) uniform 4 uint 0
|
|
todo(glsl) draw quad
|
|
probe (0, 0) f32(1, -2, 3, 4)
|
|
uniform 0 float4 9 -8 7 6
|
|
if(sm<4) uniform 4 float 1
|
|
if(sm>=4) uniform 4 uint 1
|
|
todo(glsl) draw quad
|
|
probe (0, 0) f32(1, -2, 3, 4)
|
|
if(sm<4) uniform 4 float 0
|
|
if(sm>=4) uniform 4 uint 0
|
|
todo(glsl) draw quad
|
|
probe (0, 0) f32(9, -8, 7, 6)
|