vkd3d-shader/fx: Use a version-neutral name for the opcode table.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov
2025-06-07 16:44:16 +02:00
committed by Henri Verbeet
parent 47b9316a86
commit d6a4084321
Notes: Henri Verbeet 2025-06-11 20:37:36 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1559

View File

@@ -4720,7 +4720,7 @@ static const struct
uint32_t opcode; uint32_t opcode;
const char *name; const char *name;
} }
fx_4_fxlc_opcodes[] = fxlc_opcodes[] =
{ {
{ 0x100, "mov" }, { 0x100, "mov" },
{ 0x101, "neg" }, { 0x101, "neg" },
@@ -4775,14 +4775,14 @@ fx_4_fxlc_opcodes[] =
{ 0x70e, "d3ds_dotswiz" }, { 0x70e, "d3ds_dotswiz" },
}; };
static const char *fx_4_get_fxlc_opcode_name(uint32_t opcode) static const char *get_fxlc_opcode_name(uint32_t opcode)
{ {
size_t i; size_t i;
for (i = 0; i < ARRAY_SIZE(fx_4_fxlc_opcodes); ++i) for (i = 0; i < ARRAY_SIZE(fxlc_opcodes); ++i)
{ {
if (fx_4_fxlc_opcodes[i].opcode == opcode) if (fxlc_opcodes[i].opcode == opcode)
return fx_4_fxlc_opcodes[i].name; return fxlc_opcodes[i].name;
} }
return "<unrecognized>"; return "<unrecognized>";
@@ -4980,7 +4980,7 @@ static void fx_4_parse_fxlvm_expression(struct fx_parser *parser, uint32_t offse
code.scalar = false; code.scalar = false;
parse_fx_print_indent(parser); parse_fx_print_indent(parser);
vkd3d_string_buffer_printf(&parser->buffer, "%s ", fx_4_get_fxlc_opcode_name(opcode)); vkd3d_string_buffer_printf(&parser->buffer, "%s ", get_fxlc_opcode_name(opcode));
/* Destination first. */ /* Destination first. */
fx_4_parse_fxlc_argument(parser, offset + sizeof(arg) * src_count, &code); fx_4_parse_fxlc_argument(parser, offset + sizeof(arg) * src_count, &code);