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 | 4 ++-- 6 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 6ec25852..ed7a01a4 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -810,6 +810,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_DDIV, VKD3DSIH_DDIV, "d", "dd"}, {VKD3D_SM5_OP_DFMA, VKD3DSIH_DFMA, "d", "ddd"}, };
diff --git a/libs/vkd3d-shader/sm4.h b/libs/vkd3d-shader/sm4.h index 12380bbb..aba7d276 100644 --- a/libs/vkd3d-shader/sm4.h +++ b/libs/vkd3d-shader/sm4.h @@ -329,6 +329,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_DDIV = 0xd2, VKD3D_SM5_OP_DFMA = 0xd3, };
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 7ffba4d7..3db100e1 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -6773,6 +6773,7 @@ static SpvOp vkd3d_dxbc_compiler_map_alu_instruction(const struct vkd3d_shader_i {VKD3DSIH_BFREV, SpvOpBitReverse}, {VKD3DSIH_COUNTBITS, SpvOpBitCount}, {VKD3DSIH_DADD, SpvOpFAdd}, + {VKD3DSIH_DDIV, SpvOpFDiv}, {VKD3DSIH_DIV, SpvOpFDiv}, {VKD3DSIH_DMUL, SpvOpFMul}, {VKD3DSIH_FTOI, SpvOpConvertFToS}, @@ -9520,6 +9521,7 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler, case VKD3DSIH_BFREV: case VKD3DSIH_COUNTBITS: case VKD3DSIH_DADD: + case VKD3DSIH_DDIV: case VKD3DSIH_DIV: case VKD3DSIH_DMUL: case VKD3DSIH_FTOI: diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index 1e1b026b..a7294307 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -100,6 +100,7 @@ static const char * const shader_opcode_names[] = /* VKD3DSIH_DCL_UAV_STRUCTURED */ "dcl_uav_structured", /* VKD3DSIH_DCL_UAV_TYPED */ "dcl_uav_typed", /* VKD3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount", + /* VKD3DSIH_DDIV */ "ddiv", /* VKD3DSIH_DEF */ "def", /* VKD3DSIH_DEFAULT */ "default", /* VKD3DSIH_DEFB */ "defb", diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index f5fff1ec..56a4dde5 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -189,6 +189,7 @@ enum vkd3d_shader_opcode VKD3DSIH_DCL_UAV_STRUCTURED, VKD3DSIH_DCL_UAV_TYPED, VKD3DSIH_DCL_VERTICES_OUT, + VKD3DSIH_DDIV, VKD3DSIH_DEF, VKD3DSIH_DEFAULT, VKD3DSIH_DEFB, diff --git a/tests/d3d12.c b/tests/d3d12.c index 585ab62d..e7a273e6 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -10008,8 +10008,8 @@ static void test_shader_instructions(void) {&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}, - {&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_ddiv, {.d = {{ 2.0, 4.0}}}, {.d = { 0.5, 2.0}}, true}, + {&ps_ddiv, {.d = {{ 2.0, -4.0}}}, {.d = {-0.5, -2.0}}, true}, {&ps_drcp, {.d = {{ 2.0, -0.5}}}, {.d = { 0.5, -2.0}}, true, true},
{