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 0c590563..86ba18a2 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -807,6 +807,7 @@ static const struct vkd3d_sm4_opcode_info opcode_table[] = {VKD3D_SM5_OP_DNE, VKD3DSIH_DNE, "u", "dd"}, {VKD3D_SM5_OP_DMOV, VKD3DSIH_DMOV, "d", "d"}, {VKD3D_SM5_OP_DMOVC, VKD3DSIH_DMOVC, "d", "udd"}, + {VKD3D_SM5_OP_DTOF, VKD3DSIH_DTOF, "f", "d"}, {VKD3D_SM5_OP_FTOD, VKD3DSIH_FTOD, "d", "f"}, {VKD3D_SM5_OP_EVAL_SAMPLE_INDEX, VKD3DSIH_EVAL_SAMPLE_INDEX, "f", "fi"}, {VKD3D_SM5_OP_EVAL_CENTROID, VKD3DSIH_EVAL_CENTROID, "f", "f"}, diff --git a/libs/vkd3d-shader/sm4.h b/libs/vkd3d-shader/sm4.h index 5f4f22db..34b90c85 100644 --- a/libs/vkd3d-shader/sm4.h +++ b/libs/vkd3d-shader/sm4.h @@ -327,6 +327,7 @@ enum vkd3d_sm4_opcode VKD3D_SM5_OP_DNE = 0xc6, VKD3D_SM5_OP_DMOV = 0xc7, VKD3D_SM5_OP_DMOVC = 0xc8, + VKD3D_SM5_OP_DTOF = 0xc9, VKD3D_SM5_OP_FTOD = 0xca, VKD3D_SM5_OP_EVAL_SAMPLE_INDEX = 0xcc, VKD3D_SM5_OP_EVAL_CENTROID = 0xcd, diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index a50a3099..266db181 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -6776,6 +6776,7 @@ static SpvOp vkd3d_dxbc_compiler_map_alu_instruction(const struct vkd3d_shader_i {VKD3DSIH_DDIV, SpvOpFDiv}, {VKD3DSIH_DIV, SpvOpFDiv}, {VKD3DSIH_DMUL, SpvOpFMul}, + {VKD3DSIH_DTOF, SpvOpFConvert}, {VKD3DSIH_FTOD, SpvOpFConvert}, {VKD3DSIH_FTOI, SpvOpConvertFToS}, {VKD3DSIH_FTOU, SpvOpConvertFToU}, @@ -9529,6 +9530,7 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler, case VKD3DSIH_DDIV: case VKD3DSIH_DIV: case VKD3DSIH_DMUL: + case VKD3DSIH_DTOF: case VKD3DSIH_FTOD: case VKD3DSIH_FTOI: case VKD3DSIH_FTOU: diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index 8f93e1bd..eab3882b 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -128,6 +128,7 @@ static const char * const shader_opcode_names[] = /* VKD3DSIH_DSY */ "dsy", /* VKD3DSIH_DSY_COARSE */ "deriv_rty_coarse", /* VKD3DSIH_DSY_FINE */ "deriv_rty_fine", + /* VKD3DSIH_DTOF */ "dtof", /* VKD3DSIH_ELSE */ "else", /* VKD3DSIH_EMIT */ "emit", /* VKD3DSIH_EMIT_STREAM */ "emit_stream", diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index 7400be51..8980e641 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -217,6 +217,7 @@ enum vkd3d_shader_opcode VKD3DSIH_DSY, VKD3DSIH_DSY_COARSE, VKD3DSIH_DSY_FINE, + VKD3DSIH_DTOF, VKD3DSIH_ELSE, VKD3DSIH_EMIT, VKD3DSIH_EMIT_STREAM, diff --git a/tests/d3d12.c b/tests/d3d12.c index 4c03b81e..f409ac66 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -10029,7 +10029,7 @@ static void test_shader_instructions(void) {&ps_dtou, {.d = {{ -1.0}}}, {{ 0, 1 }}, true, true}, {&ps_dtou, {.d = {{ 1.0}}}, {{ 1, 0 }}, true, true}, {&ps_dtoi, {.d = {{ 1.0}}}, {.i = {1, -1}}, true, true}, - {&ps_dtof, {.d = {{ 1.5}}}, {.f = {1.5f, -1.5f}}, true, true}, + {&ps_dtof, {.d = {{ 1.5}}}, {.f = {1.5f, -1.5f}}, true}, {&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},