vkd3d-shader/glsl: Implement VKD3DSIH_OR.

This commit is contained in:
Henri Verbeet 2024-04-27 00:20:49 +02:00
parent e289c3999d
commit bc70d575ae
Notes: Henri Verbeet 2024-09-20 17:32:27 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1091
2 changed files with 16 additions and 13 deletions

View File

@ -618,6 +618,9 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen,
case VKD3DSIH_MUL:
shader_glsl_binop(gen, ins, "*");
break;
case VKD3DSIH_OR:
shader_glsl_binop(gen, ins, "|");
break;
case VKD3DSIH_RET:
shader_glsl_ret(gen, ins);
break;

View File

@ -8,25 +8,25 @@ float4 main() : sv_target
[test]
uniform 0 float4 1.0 1.0 1.0 1.0
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 float4 1.0 0.0 0.0 0.0
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 float4 0.0 1.0 0.0 0.0
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 float4 0.0 0.0 1.0 0.0
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 float4 0.0 0.0 0.0 1.0
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 float4 0.0 0.0 0.0 0.0
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0)
uniform 0 float4 -1.0 -1.0 -1.0 -1.0
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader]
@ -60,27 +60,27 @@ float4 main() : sv_target
[test]
if(sm<4) uniform 0 float4 1 1 1 1
if(sm>=4) uniform 0 uint4 1 1 1 1
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
if(sm<4) uniform 0 float4 1 0 0 0
if(sm>=4) uniform 0 uint4 1 0 0 0
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
if(sm<4) uniform 0 float4 0 1 0 0
if(sm>=4) uniform 0 uint4 0 1 0 0
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
if(sm<4) uniform 0 float4 0 0 1 0
if(sm>=4) uniform 0 uint4 0 0 1 0
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
if(sm<4) uniform 0 float4 0 0 0 1
if(sm>=4) uniform 0 uint4 0 0 0 1
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
if(sm<4) uniform 0 float4 0 0 0 0
if(sm>=4) uniform 0 uint4 0 0 0 0
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader]