Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com --- libs/vkd3d-shader/dxbc.c | 2 ++ libs/vkd3d-shader/spirv.c | 2 ++ libs/vkd3d-shader/trace.c | 1 + libs/vkd3d-shader/vkd3d_shader_private.h | 1 + tests/d3d12.c | 6 +++--- 5 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index da102056..26911255 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -310,6 +310,7 @@ enum vkd3d_sm4_opcode VKD3D_SM5_OP_IMM_ATOMIC_UMAX = 0xbc, VKD3D_SM5_OP_IMM_ATOMIC_UMIN = 0xbd, VKD3D_SM5_OP_SYNC = 0xbe, + VKD3D_SM5_OP_DADD = 0xbf, VKD3D_SM5_OP_DEQ = 0xc3, VKD3D_SM5_OP_DMOV = 0xc7, VKD3D_SM5_OP_EVAL_SAMPLE_INDEX = 0xcc, @@ -1251,6 +1252,7 @@ static const struct vkd3d_sm4_opcode_info opcode_table[] = {VKD3D_SM5_OP_IMM_ATOMIC_UMIN, VKD3DSIH_IMM_ATOMIC_UMIN, "uU", "iu"}, {VKD3D_SM5_OP_SYNC, VKD3DSIH_SYNC, "", "", shader_sm5_read_sync}, + {VKD3D_SM5_OP_DADD, VKD3DSIH_DADD, "d", "dd"}, {VKD3D_SM5_OP_DEQ, VKD3DSIH_DEQ, "u", "dd"}, {VKD3D_SM5_OP_DMOV, VKD3DSIH_DMOV, "d", "d"}, {VKD3D_SM5_OP_EVAL_SAMPLE_INDEX, VKD3DSIH_EVAL_SAMPLE_INDEX, "f", "fi"}, diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index c18f6944..a2873ff5 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -6756,6 +6756,7 @@ static SpvOp vkd3d_dxbc_compiler_map_alu_instruction(const struct vkd3d_shader_i {VKD3DSIH_AND, SpvOpBitwiseAnd}, {VKD3DSIH_BFREV, SpvOpBitReverse}, {VKD3DSIH_COUNTBITS, SpvOpBitCount}, + {VKD3DSIH_DADD, SpvOpFAdd}, {VKD3DSIH_DIV, SpvOpFDiv}, {VKD3DSIH_FTOI, SpvOpConvertFToS}, {VKD3DSIH_FTOU, SpvOpConvertFToU}, @@ -9495,6 +9496,7 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler, case VKD3DSIH_AND: case VKD3DSIH_BFREV: case VKD3DSIH_COUNTBITS: + case VKD3DSIH_DADD: case VKD3DSIH_DIV: case VKD3DSIH_FTOI: case VKD3DSIH_FTOU: diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index d66681b9..592befe1 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -59,6 +59,7 @@ static const char * const shader_opcode_names[] = /* VKD3DSIH_CRS */ "crs", /* VKD3DSIH_CUT */ "cut", /* VKD3DSIH_CUT_STREAM */ "cut_stream", + /* VKD3DSIH_DADD */ "dadd", /* VKD3DSIH_DCL */ "dcl", /* VKD3DSIH_DCL_CONSTANT_BUFFER */ "dcl_constantBuffer", /* VKD3DSIH_DCL_FUNCTION_BODY */ "dcl_function_body", diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index c4500499..23f2b232 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -148,6 +148,7 @@ enum vkd3d_shader_opcode VKD3DSIH_CRS, VKD3DSIH_CUT, VKD3DSIH_CUT_STREAM, + VKD3DSIH_DADD, VKD3DSIH_DCL, VKD3DSIH_DCL_CONSTANT_BUFFER, VKD3DSIH_DCL_FUNCTION_BODY, diff --git a/tests/d3d12.c b/tests/d3d12.c index a43a7f27..f90526c7 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -9881,12 +9881,12 @@ static void test_shader_instructions(void) {&ps_movc, {{{1, 1, 1, 1}, {1, 2, 3, 4}, {5, 6, 7, 8}}}, {{1, 2, 3, 4}}},
{&ps_dmov, {.d = {{2.5 + 1.0e-9, -3.5 - 1.0e-9}}}, {.d = {3.5 + 1.0e-9, -2.5 - 1.0e-9}}, true}, - {&ps_dadd, {.d = {{2.5, 0.0}}}, {.d = {2.5 + 1.0000002433080226, 2.5 + 2.000000481493771}}, true, true}, + {&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, 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, true}, - {&ps_dmodifier, {.d = {{-1.5, 0.0}}}, {.d = {1.5f, 1.5f}}, true, true}, + {&ps_dmodifier, {.d = {{1.5, 0.0}}}, {.d = {1.5f, 2.5f}}, true}, + {&ps_dmodifier, {.d = {{-1.5, 0.0}}}, {.d = {1.5f, 1.5f}}, true}, {&ps_deq, {.d = {{0.0, 0.0}}}, {{0xffffffff}}, true}, {&ps_deq, {.d = {{1.0, 0.0}}}, {{0x00000000}}, true}, {&ps_dne, {.d = {{0.0, 0.0}}}, {{0x00000000}}, true, true},