vkd3d-shader/spirv: Use vsir_opcode_get_name() in spirv_compiler_emit_alu_instruction().

This commit is contained in:
Henri Verbeet
2025-06-11 20:57:41 +02:00
parent f46c8ea03c
commit eb988e95e1
Notes: Henri Verbeet 2025-06-16 17:48:30 +02:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1566

View File

@@ -7639,9 +7639,9 @@ static enum vkd3d_result spirv_compiler_emit_alu_instruction(struct spirv_compil
if (op == SpvOpMax) if (op == SpvOpMax)
{ {
ERR("Unexpected instruction %#x.\n", instruction->opcode);
spirv_compiler_error(compiler, VKD3D_SHADER_ERROR_SPV_INVALID_HANDLER, spirv_compiler_error(compiler, VKD3D_SHADER_ERROR_SPV_INVALID_HANDLER,
"Encountered invalid/unhandled instruction handler %#x.", instruction->opcode); "Encountered invalid/unhandled instruction \"%s\" (%#x).",
vsir_opcode_get_name(instruction->opcode, "<unknown>"), instruction->opcode);
return VKD3D_ERROR_INVALID_SHADER; return VKD3D_ERROR_INVALID_SHADER;
} }