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 de55d782..6ec25852 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -800,6 +800,7 @@ static const struct vkd3d_sm4_opcode_info opcode_table[] = {VKD3D_SM5_OP_DADD, VKD3DSIH_DADD, "d", "dd"}, {VKD3D_SM5_OP_DMAX, VKD3DSIH_DMAX, "d", "dd"}, {VKD3D_SM5_OP_DMIN, VKD3DSIH_DMIN, "d", "dd"}, + {VKD3D_SM5_OP_DMUL, VKD3DSIH_DMUL, "d", "dd"}, {VKD3D_SM5_OP_DEQ, VKD3DSIH_DEQ, "u", "dd"}, {VKD3D_SM5_OP_DGE, VKD3DSIH_DGE, "u", "dd"}, {VKD3D_SM5_OP_DLT, VKD3DSIH_DLT, "u", "dd"}, diff --git a/libs/vkd3d-shader/sm4.h b/libs/vkd3d-shader/sm4.h index d9f61898..12380bbb 100644 --- a/libs/vkd3d-shader/sm4.h +++ b/libs/vkd3d-shader/sm4.h @@ -320,6 +320,7 @@ enum vkd3d_sm4_opcode VKD3D_SM5_OP_DADD = 0xbf, VKD3D_SM5_OP_DMAX = 0xc0, VKD3D_SM5_OP_DMIN = 0xc1, + VKD3D_SM5_OP_DMUL = 0xc2, VKD3D_SM5_OP_DEQ = 0xc3, VKD3D_SM5_OP_DGE = 0xc4, VKD3D_SM5_OP_DLT = 0xc5, diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 08709e44..7ffba4d7 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -6774,6 +6774,7 @@ static SpvOp vkd3d_dxbc_compiler_map_alu_instruction(const struct vkd3d_shader_i {VKD3DSIH_COUNTBITS, SpvOpBitCount}, {VKD3DSIH_DADD, SpvOpFAdd}, {VKD3DSIH_DIV, SpvOpFDiv}, + {VKD3DSIH_DMUL, SpvOpFMul}, {VKD3DSIH_FTOI, SpvOpConvertFToS}, {VKD3DSIH_FTOU, SpvOpConvertFToU}, {VKD3DSIH_IADD, SpvOpIAdd}, @@ -9520,6 +9521,7 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler, case VKD3DSIH_COUNTBITS: case VKD3DSIH_DADD: case VKD3DSIH_DIV: + case VKD3DSIH_DMUL: case VKD3DSIH_FTOI: case VKD3DSIH_FTOU: case VKD3DSIH_IADD: diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index d0aaa0fb..1e1b026b 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -112,6 +112,7 @@ static const char * const shader_opcode_names[] = /* VKD3DSIH_DMAX */ "dmax", /* VKD3DSIH_DMIN */ "dmin", /* VKD3DSIH_DMOV */ "dmov", + /* VKD3DSIH_DMUL */ "dmul", /* VKD3DSIH_DNE */ "dne", /* VKD3DSIH_DP2 */ "dp2", /* VKD3DSIH_DP2ADD */ "dp2add", diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index b64c4b10..f5fff1ec 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -201,6 +201,7 @@ enum vkd3d_shader_opcode VKD3DSIH_DMAX, VKD3DSIH_DMIN, VKD3DSIH_DMOV, + VKD3DSIH_DMUL, VKD3DSIH_DNE, VKD3DSIH_DP2, VKD3DSIH_DP2ADD, diff --git a/tests/d3d12.c b/tests/d3d12.c index 9e8aa837..585ab62d 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -10007,7 +10007,7 @@ static void test_shader_instructions(void) {&ps_utod, {.u = {{3, 0xffffffff}}}, {.d = {3.0, 4294967295.0}}, true, true}, {&ps_itod, {.u = {{3, INT_MIN}}}, {.d = {3.0, -2147483648.0}}, true, true}, {&ps_ftod, {.f = {{-2.5f, -2.5f}}}, {.d = {-2.5, 2.5}}, true, true}, - {&ps_dmul, {.d = {{ 1.5, 3.0}}}, {.d = { 4.5, -4.5}}, true, true}, + {&ps_dmul, {.d = {{ 1.5, 3.0}}}, {.d = { 4.5, -4.5}}, true}, {&ps_ddiv, {.d = {{ 2.0, 4.0}}}, {.d = { 0.5, 2.0}}, true, true}, {&ps_ddiv, {.d = {{ 2.0, -4.0}}}, {.d = {-0.5, -2.0}}, true, true}, {&ps_drcp, {.d = {{ 2.0, -0.5}}}, {.d = { 0.5, -2.0}}, true, true},