mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Implement DFMA 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
ca82a379f5
commit
242261bc52
@ -809,6 +809,7 @@ static const struct vkd3d_sm4_opcode_info opcode_table[] =
|
|||||||
{VKD3D_SM5_OP_EVAL_CENTROID, VKD3DSIH_EVAL_CENTROID, "f", "f"},
|
{VKD3D_SM5_OP_EVAL_CENTROID, VKD3DSIH_EVAL_CENTROID, "f", "f"},
|
||||||
{VKD3D_SM5_OP_DCL_GS_INSTANCES, VKD3DSIH_DCL_GS_INSTANCES, "", "",
|
{VKD3D_SM5_OP_DCL_GS_INSTANCES, VKD3DSIH_DCL_GS_INSTANCES, "", "",
|
||||||
shader_sm4_read_declaration_count},
|
shader_sm4_read_declaration_count},
|
||||||
|
{VKD3D_SM5_OP_DFMA, VKD3DSIH_DFMA, "d", "ddd"},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const enum vkd3d_shader_register_type register_type_table[] =
|
static const enum vkd3d_shader_register_type register_type_table[] =
|
||||||
|
@ -328,6 +328,7 @@ enum vkd3d_sm4_opcode
|
|||||||
VKD3D_SM5_OP_EVAL_SAMPLE_INDEX = 0xcc,
|
VKD3D_SM5_OP_EVAL_SAMPLE_INDEX = 0xcc,
|
||||||
VKD3D_SM5_OP_EVAL_CENTROID = 0xcd,
|
VKD3D_SM5_OP_EVAL_CENTROID = 0xcd,
|
||||||
VKD3D_SM5_OP_DCL_GS_INSTANCES = 0xce,
|
VKD3D_SM5_OP_DCL_GS_INSTANCES = 0xce,
|
||||||
|
VKD3D_SM5_OP_DFMA = 0xd3,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum vkd3d_sm4_instruction_modifier
|
enum vkd3d_sm4_instruction_modifier
|
||||||
|
@ -6843,6 +6843,7 @@ static enum GLSLstd450 vkd3d_dxbc_compiler_map_ext_glsl_instruction(
|
|||||||
}
|
}
|
||||||
glsl_insts[] =
|
glsl_insts[] =
|
||||||
{
|
{
|
||||||
|
{VKD3DSIH_DFMA, GLSLstd450Fma},
|
||||||
{VKD3DSIH_DMAX, GLSLstd450NMax},
|
{VKD3DSIH_DMAX, GLSLstd450NMax},
|
||||||
{VKD3DSIH_DMIN, GLSLstd450NMin},
|
{VKD3DSIH_DMIN, GLSLstd450NMin},
|
||||||
{VKD3DSIH_EXP, GLSLstd450Exp2},
|
{VKD3DSIH_EXP, GLSLstd450Exp2},
|
||||||
@ -9534,6 +9535,7 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler,
|
|||||||
case VKD3DSIH_XOR:
|
case VKD3DSIH_XOR:
|
||||||
vkd3d_dxbc_compiler_emit_alu_instruction(compiler, instruction);
|
vkd3d_dxbc_compiler_emit_alu_instruction(compiler, instruction);
|
||||||
break;
|
break;
|
||||||
|
case VKD3DSIH_DFMA:
|
||||||
case VKD3DSIH_DMAX:
|
case VKD3DSIH_DMAX:
|
||||||
case VKD3DSIH_DMIN:
|
case VKD3DSIH_DMIN:
|
||||||
case VKD3DSIH_EXP:
|
case VKD3DSIH_EXP:
|
||||||
|
@ -105,6 +105,7 @@ static const char * const shader_opcode_names[] =
|
|||||||
/* VKD3DSIH_DEFB */ "defb",
|
/* VKD3DSIH_DEFB */ "defb",
|
||||||
/* VKD3DSIH_DEFI */ "defi",
|
/* VKD3DSIH_DEFI */ "defi",
|
||||||
/* VKD3DSIH_DEQ */ "deq",
|
/* VKD3DSIH_DEQ */ "deq",
|
||||||
|
/* VKD3DSIH_DFMA */ "dfma",
|
||||||
/* VKD3DSIH_DGE */ "dge",
|
/* VKD3DSIH_DGE */ "dge",
|
||||||
/* VKD3DSIH_DIV */ "div",
|
/* VKD3DSIH_DIV */ "div",
|
||||||
/* VKD3DSIH_DLT */ "dlt",
|
/* VKD3DSIH_DLT */ "dlt",
|
||||||
|
@ -194,6 +194,7 @@ enum vkd3d_shader_opcode
|
|||||||
VKD3DSIH_DEFB,
|
VKD3DSIH_DEFB,
|
||||||
VKD3DSIH_DEFI,
|
VKD3DSIH_DEFI,
|
||||||
VKD3DSIH_DEQ,
|
VKD3DSIH_DEQ,
|
||||||
|
VKD3DSIH_DFMA,
|
||||||
VKD3DSIH_DGE,
|
VKD3DSIH_DGE,
|
||||||
VKD3DSIH_DIV,
|
VKD3DSIH_DIV,
|
||||||
VKD3DSIH_DLT,
|
VKD3DSIH_DLT,
|
||||||
|
@ -9960,7 +9960,7 @@ static void test_shader_instructions(void)
|
|||||||
{&ps_dadd, {.d = {{2.5, 0.0}}}, {.d = {2.5 + 1.0000002433080226, 2.5 + 2.000000481493771}}, 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},
|
{&ps_dmin_dmax, {.d = {{-1.0, 1.0}}}, {.d = {-1.0, 1.0}}, true},
|
||||||
{&ps_dfma, {.d = {{1.0000002433080226, 2.000000481493771}}},
|
{&ps_dfma, {.d = {{1.0000002433080226, 2.000000481493771}}},
|
||||||
{.d = {1.0000002433080226 * 2.000000481493771 + 1.0000002433080226}}, true, true},
|
{.d = {1.0000002433080226 * 2.000000481493771 + 1.0000002433080226}}, true},
|
||||||
{&ps_dmovc, {.d = {{0.5, 0.0}}}, {.d = {4.5, 4.5}}, 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_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},
|
{&ps_dmodifier, {.d = {{1.5, 0.0}}}, {.d = {1.5f, 2.5f}}, true},
|
||||||
|
Loading…
Reference in New Issue
Block a user