vkd3d-shader/glsl: Implement VKD3DSIH_IMAX.

This commit is contained in:
Henri Verbeet 2024-10-03 16:42:41 +02:00
parent c2a42214ff
commit fc8384462f
Notes: Henri Verbeet 2024-10-08 22:11:09 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1155
2 changed files with 5 additions and 4 deletions

View File

@ -1186,15 +1186,16 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen,
case VKD3DSIH_LTO:
shader_glsl_relop(gen, ins, "<", "lessThan");
break;
case VKD3DSIH_IMUL:
shader_glsl_mul_extended(gen, ins);
break;
case VKD3DSIH_IMAX:
case VKD3DSIH_MAX:
shader_glsl_intrinsic(gen, ins, "max");
break;
case VKD3DSIH_MIN:
shader_glsl_intrinsic(gen, ins, "min");
break;
case VKD3DSIH_IMUL:
shader_glsl_mul_extended(gen, ins);
break;
case VKD3DSIH_INE:
case VKD3DSIH_NEU:
shader_glsl_relop(gen, ins, "!=", "notEqual");

View File

@ -98,7 +98,7 @@ float4 main() : SV_TARGET
[test]
uniform 0 float4 5.0 -7.0 0.0 -10.0
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (5.0, 7.0, 0.0, 10.0)
[pixel shader todo(sm<4)]