mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Implement DADD 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
2f09f1d359
commit
eb804a5a9f
@ -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"},
|
||||
|
@ -6772,6 +6772,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},
|
||||
@ -9511,6 +9512,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:
|
||||
|
@ -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",
|
||||
|
@ -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,
|
||||
|
@ -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},
|
||||
|
Loading…
Reference in New Issue
Block a user