vkd3d-shader/ir: Introduce VSIR_OP_NEG to represent floating-point negation.

This commit is contained in:
Giovanni Mascellani
2025-10-08 22:26:59 +02:00
committed by Henri Verbeet
parent 62fa65066f
commit 79736ae6ff
Notes: Henri Verbeet 2025-10-13 19:32:46 +02:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1783
5 changed files with 52 additions and 11 deletions

View File

@@ -7548,6 +7548,7 @@ static SpvOp spirv_compiler_map_alu_instruction(const struct vkd3d_shader_instru
{VSIR_OP_ITOF, SpvOpConvertSToF},
{VSIR_OP_ITOI, SpvOpSConvert},
{VSIR_OP_MUL, SpvOpFMul},
{VSIR_OP_NEG, SpvOpFNegate},
{VSIR_OP_NOT, SpvOpNot},
{VSIR_OP_OR, SpvOpBitwiseOr},
{VSIR_OP_UDIV_SIMPLE, SpvOpUDiv},
@@ -10581,6 +10582,7 @@ static int spirv_compiler_handle_instruction(struct spirv_compiler *compiler,
case VSIR_OP_ITOF:
case VSIR_OP_ITOI:
case VSIR_OP_MUL:
case VSIR_OP_NEG:
case VSIR_OP_NOT:
case VSIR_OP_OR:
case VSIR_OP_UDIV_SIMPLE: