Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com --- libs/vkd3d-shader/dxbc.c | 1 + libs/vkd3d-shader/sm4.h | 1 + libs/vkd3d-shader/spirv.c | 2 ++ libs/vkd3d-shader/trace.c | 1 + libs/vkd3d-shader/vkd3d_shader_private.h | 1 + tests/d3d12.c | 2 +- 6 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index f9be52d3..de55d782 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -809,6 +809,7 @@ static const struct vkd3d_sm4_opcode_info opcode_table[] = {VKD3D_SM5_OP_EVAL_CENTROID, VKD3DSIH_EVAL_CENTROID, "f", "f"}, {VKD3D_SM5_OP_DCL_GS_INSTANCES, VKD3DSIH_DCL_GS_INSTANCES, "", "", shader_sm4_read_declaration_count}, + {VKD3D_SM5_OP_DFMA, VKD3DSIH_DFMA, "d", "ddd"}, };
static const enum vkd3d_shader_register_type register_type_table[] = diff --git a/libs/vkd3d-shader/sm4.h b/libs/vkd3d-shader/sm4.h index c9a389ec..d9f61898 100644 --- a/libs/vkd3d-shader/sm4.h +++ b/libs/vkd3d-shader/sm4.h @@ -328,6 +328,7 @@ enum vkd3d_sm4_opcode VKD3D_SM5_OP_EVAL_SAMPLE_INDEX = 0xcc, VKD3D_SM5_OP_EVAL_CENTROID = 0xcd, VKD3D_SM5_OP_DCL_GS_INSTANCES = 0xce, + VKD3D_SM5_OP_DFMA = 0xd3, };
enum vkd3d_sm4_instruction_modifier diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 1b0051e5..08709e44 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -6843,6 +6843,7 @@ static enum GLSLstd450 vkd3d_dxbc_compiler_map_ext_glsl_instruction( } glsl_insts[] = { + {VKD3DSIH_DFMA, GLSLstd450Fma}, {VKD3DSIH_DMAX, GLSLstd450NMax}, {VKD3DSIH_DMIN, GLSLstd450NMin}, {VKD3DSIH_EXP, GLSLstd450Exp2}, @@ -9534,6 +9535,7 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler, case VKD3DSIH_XOR: vkd3d_dxbc_compiler_emit_alu_instruction(compiler, instruction); break; + case VKD3DSIH_DFMA: case VKD3DSIH_DMAX: case VKD3DSIH_DMIN: case VKD3DSIH_EXP: diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index b0a2298f..d0aaa0fb 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -105,6 +105,7 @@ static const char * const shader_opcode_names[] = /* VKD3DSIH_DEFB */ "defb", /* VKD3DSIH_DEFI */ "defi", /* VKD3DSIH_DEQ */ "deq", + /* VKD3DSIH_DFMA */ "dfma", /* VKD3DSIH_DGE */ "dge", /* VKD3DSIH_DIV */ "div", /* VKD3DSIH_DLT */ "dlt", diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index d8a6379c..47ab3f6b 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -194,6 +194,7 @@ enum vkd3d_shader_opcode VKD3DSIH_DEFB, VKD3DSIH_DEFI, VKD3DSIH_DEQ, + VKD3DSIH_DFMA, VKD3DSIH_DGE, VKD3DSIH_DIV, VKD3DSIH_DLT, diff --git a/tests/d3d12.c b/tests/d3d12.c index 9854af30..aaf4bfca 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -9960,7 +9960,7 @@ static void test_shader_instructions(void) {&ps_dadd, {.d = {{2.5, 0.0}}}, {.d = {2.5 + 1.0000002433080226, 2.5 + 2.000000481493771}}, true}, {&ps_dmin_dmax, {.d = {{-1.0, 1.0}}}, {.d = {-1.0, 1.0}}, true}, {&ps_dfma, {.d = {{1.0000002433080226, 2.000000481493771}}}, - {.d = {1.0000002433080226 * 2.000000481493771 + 1.0000002433080226}}, true, true}, + {.d = {1.0000002433080226 * 2.000000481493771 + 1.0000002433080226}}, true}, {&ps_dmovc, {.d = {{0.5, 0.0}}}, {.d = {4.5, 4.5}}, true, true}, {&ps_dmovc, {.d = {{1.5, 0.0}}}, {.d = {1.5, 0.0}}, true, true}, {&ps_dmodifier, {.d = {{1.5, 0.0}}}, {.d = {1.5f, 2.5f}}, true},