mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader: Implement DTOU instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c61b573d9c
commit
88c08df03b
@ -817,6 +817,7 @@ static const struct vkd3d_sm4_opcode_info opcode_table[] =
|
||||
{VKD3D_SM5_OP_DFMA, VKD3DSIH_DFMA, "d", "ddd"},
|
||||
{VKD3D_SM5_OP_DRCP, VKD3DSIH_DRCP, "d", "d"},
|
||||
{VKD3D_SM5_OP_DTOI, VKD3DSIH_DTOI, "i", "d"},
|
||||
{VKD3D_SM5_OP_DTOU, VKD3DSIH_DTOU, "u", "d"},
|
||||
};
|
||||
|
||||
static const enum vkd3d_shader_register_type register_type_table[] =
|
||||
|
@ -336,6 +336,7 @@ enum vkd3d_sm4_opcode
|
||||
VKD3D_SM5_OP_DFMA = 0xd3,
|
||||
VKD3D_SM5_OP_DRCP = 0xd4,
|
||||
VKD3D_SM5_OP_DTOI = 0xd6,
|
||||
VKD3D_SM5_OP_DTOU = 0xd7,
|
||||
};
|
||||
|
||||
enum vkd3d_sm4_instruction_modifier
|
||||
|
@ -6778,6 +6778,7 @@ static SpvOp vkd3d_dxbc_compiler_map_alu_instruction(const struct vkd3d_shader_i
|
||||
{VKD3DSIH_DMUL, SpvOpFMul},
|
||||
{VKD3DSIH_DTOF, SpvOpFConvert},
|
||||
{VKD3DSIH_DTOI, SpvOpConvertFToS},
|
||||
{VKD3DSIH_DTOU, SpvOpConvertFToU},
|
||||
{VKD3DSIH_FTOD, SpvOpFConvert},
|
||||
{VKD3DSIH_FTOI, SpvOpConvertFToS},
|
||||
{VKD3DSIH_FTOU, SpvOpConvertFToU},
|
||||
@ -9533,6 +9534,7 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler,
|
||||
case VKD3DSIH_DMUL:
|
||||
case VKD3DSIH_DTOF:
|
||||
case VKD3DSIH_DTOI:
|
||||
case VKD3DSIH_DTOU:
|
||||
case VKD3DSIH_FTOD:
|
||||
case VKD3DSIH_FTOI:
|
||||
case VKD3DSIH_FTOU:
|
||||
|
@ -130,6 +130,7 @@ static const char * const shader_opcode_names[] =
|
||||
/* VKD3DSIH_DSY_FINE */ "deriv_rty_fine",
|
||||
/* VKD3DSIH_DTOF */ "dtof",
|
||||
/* VKD3DSIH_DTOI */ "dtoi",
|
||||
/* VKD3DSIH_DTOU */ "dtou",
|
||||
/* VKD3DSIH_ELSE */ "else",
|
||||
/* VKD3DSIH_EMIT */ "emit",
|
||||
/* VKD3DSIH_EMIT_STREAM */ "emit_stream",
|
||||
|
@ -219,6 +219,7 @@ enum vkd3d_shader_opcode
|
||||
VKD3DSIH_DSY_FINE,
|
||||
VKD3DSIH_DTOF,
|
||||
VKD3DSIH_DTOI,
|
||||
VKD3DSIH_DTOU,
|
||||
VKD3DSIH_ELSE,
|
||||
VKD3DSIH_EMIT,
|
||||
VKD3DSIH_EMIT_STREAM,
|
||||
|
@ -10022,12 +10022,12 @@ static void test_shader_instructions(void)
|
||||
{&ps_dge, {.d = {{1.5, 1.0}}}, {{0xffffffff}}, true},
|
||||
{&ps_dlt, {.d = {{0.0, 1.0}}}, {{0xffffffff}}, true},
|
||||
{&ps_dlt, {.d = {{1.0, 1.0}}}, {{0x00000000}}, true},
|
||||
{&ps_dtou, {.d = {{ -NAN}}}, {{ 0, 0 }}, true, true},
|
||||
{&ps_dtou, {.d = {{ NAN}}}, {{ 0, 0 }}, true, true},
|
||||
{&ps_dtou, {.d = {{-INFINITY}}}, {{ 0, ~0u}}, true, true},
|
||||
{&ps_dtou, {.d = {{ INFINITY}}}, {{~0u, 0 }}, true, true},
|
||||
{&ps_dtou, {.d = {{ -1.0}}}, {{ 0, 1 }}, true, true},
|
||||
{&ps_dtou, {.d = {{ 1.0}}}, {{ 1, 0 }}, true, true},
|
||||
{&ps_dtou, {.d = {{ -NAN}}}, {{ 0, 0 }}, true},
|
||||
{&ps_dtou, {.d = {{ NAN}}}, {{ 0, 0 }}, true},
|
||||
{&ps_dtou, {.d = {{-INFINITY}}}, {{ 0, ~0u}}, true},
|
||||
{&ps_dtou, {.d = {{ INFINITY}}}, {{~0u, 0 }}, true},
|
||||
{&ps_dtou, {.d = {{ -1.0}}}, {{ 0, 1 }}, true},
|
||||
{&ps_dtou, {.d = {{ 1.0}}}, {{ 1, 0 }}, true},
|
||||
{&ps_dtoi, {.d = {{ 1.0}}}, {.i = {1, -1}}, true},
|
||||
{&ps_dtof, {.d = {{ 1.5}}}, {.f = {1.5f, -1.5f}}, true},
|
||||
{&ps_utod, {.u = {{3, 0xffffffff}}}, {.d = {3.0, 4294967295.0}}, true, true},
|
||||
|
Loading…
x
Reference in New Issue
Block a user