vkd3d-shader/ir: Introduce VSIR_OP_UREM.

It is meant to compute the unsigned integer remainder.
This commit is contained in:
Giovanni Mascellani
2025-06-20 18:44:45 +02:00
committed by Henri Verbeet
parent 78e0f8412d
commit 82ef9bf2e5
Notes: Henri Verbeet 2025-06-25 17:09:38 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1603
4 changed files with 14 additions and 21 deletions

View File

@@ -7549,6 +7549,7 @@ static SpvOp spirv_compiler_map_alu_instruction(const struct vkd3d_shader_instru
{VSIR_OP_NOT, SpvOpNot},
{VSIR_OP_OR, SpvOpBitwiseOr},
{VSIR_OP_UDIV_SIMPLE, SpvOpUDiv},
{VSIR_OP_UREM, SpvOpUMod},
{VSIR_OP_USHR, SpvOpShiftRightLogical},
{VSIR_OP_UTOD, SpvOpConvertUToF},
{VSIR_OP_UTOF, SpvOpConvertUToF},
@@ -7675,6 +7676,7 @@ static enum vkd3d_result spirv_compiler_emit_alu_instruction(struct spirv_compil
case VSIR_OP_IDIV:
case VSIR_OP_IREM:
case VSIR_OP_UDIV_SIMPLE:
case VSIR_OP_UREM:
check_zero = true;
break;
@@ -10695,6 +10697,7 @@ static int spirv_compiler_handle_instruction(struct spirv_compiler *compiler,
case VSIR_OP_NOT:
case VSIR_OP_OR:
case VSIR_OP_UDIV_SIMPLE:
case VSIR_OP_UREM:
case VSIR_OP_USHR:
case VSIR_OP_UTOD:
case VSIR_OP_UTOF: