wined3d: Recognize SM4.1 sampleinfo opcode.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2016-07-15 11:16:22 +02:00 committed by Alexandre Julliard
parent f31994459e
commit f8a3124bf6
5 changed files with 16 additions and 2 deletions

View File

@ -5359,6 +5359,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_SAMPLE_C */ NULL, /* WINED3DSIH_SAMPLE_C */ NULL,
/* WINED3DSIH_SAMPLE_C_LZ */ NULL, /* WINED3DSIH_SAMPLE_C_LZ */ NULL,
/* WINED3DSIH_SAMPLE_GRAD */ NULL, /* WINED3DSIH_SAMPLE_GRAD */ NULL,
/* WINED3DSIH_SAMPLE_INFO */ NULL,
/* WINED3DSIH_SAMPLE_LOD */ NULL, /* WINED3DSIH_SAMPLE_LOD */ NULL,
/* WINED3DSIH_SAMPLE_POS */ NULL, /* WINED3DSIH_SAMPLE_POS */ NULL,
/* WINED3DSIH_SETP */ NULL, /* WINED3DSIH_SETP */ NULL,

View File

@ -8777,6 +8777,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_SAMPLE_C */ shader_glsl_sample_c, /* WINED3DSIH_SAMPLE_C */ shader_glsl_sample_c,
/* WINED3DSIH_SAMPLE_C_LZ */ shader_glsl_sample_c, /* WINED3DSIH_SAMPLE_C_LZ */ shader_glsl_sample_c,
/* WINED3DSIH_SAMPLE_GRAD */ shader_glsl_sample, /* WINED3DSIH_SAMPLE_GRAD */ shader_glsl_sample,
/* WINED3DSIH_SAMPLE_INFO */ NULL,
/* WINED3DSIH_SAMPLE_LOD */ shader_glsl_sample, /* WINED3DSIH_SAMPLE_LOD */ shader_glsl_sample,
/* WINED3DSIH_SAMPLE_POS */ NULL, /* WINED3DSIH_SAMPLE_POS */ NULL,
/* WINED3DSIH_SETP */ NULL, /* WINED3DSIH_SETP */ NULL,

View File

@ -189,6 +189,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_SAMPLE_C */ "sample_c", /* WINED3DSIH_SAMPLE_C */ "sample_c",
/* WINED3DSIH_SAMPLE_C_LZ */ "sample_c_lz", /* WINED3DSIH_SAMPLE_C_LZ */ "sample_c_lz",
/* WINED3DSIH_SAMPLE_GRAD */ "sample_d", /* WINED3DSIH_SAMPLE_GRAD */ "sample_d",
/* WINED3DSIH_SAMPLE_INFO */ "sample_info",
/* WINED3DSIH_SAMPLE_LOD */ "sample_l", /* WINED3DSIH_SAMPLE_LOD */ "sample_l",
/* WINED3DSIH_SAMPLE_POS */ "sample_pos", /* WINED3DSIH_SAMPLE_POS */ "sample_pos",
/* WINED3DSIH_SETP */ "setp", /* WINED3DSIH_SETP */ "setp",
@ -2420,8 +2421,7 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
{ {
shader_addline(&buffer, "p"); shader_addline(&buffer, "p");
} }
else if (ins.handler_idx == WINED3DSIH_RESINFO else if (ins.handler_idx == WINED3DSIH_RESINFO && ins.flags)
&& ins.flags)
{ {
switch (ins.flags) switch (ins.flags)
{ {
@ -2430,6 +2430,14 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
default: shader_addline(&buffer, "_unrecognized(%#x)", ins.flags); default: shader_addline(&buffer, "_unrecognized(%#x)", ins.flags);
} }
} }
else if (ins.handler_idx == WINED3DSIH_SAMPLE_INFO && ins.flags)
{
switch (ins.flags)
{
case WINED3DSI_SAMPLE_INFO_UINT: shader_addline(&buffer, "_uint"); break;
default: shader_addline(&buffer, "_unrecognized(%#x)", ins.flags);
}
}
if (wined3d_shader_instruction_has_texel_offset(&ins)) if (wined3d_shader_instruction_has_texel_offset(&ins))
shader_addline(&buffer, "(%d,%d,%d)", ins.texel_offset.u, ins.texel_offset.v, ins.texel_offset.w); shader_addline(&buffer, "(%d,%d,%d)", ins.texel_offset.u, ins.texel_offset.v, ins.texel_offset.w);

View File

@ -206,6 +206,7 @@ enum wined3d_sm4_opcode
WINED3D_SM4_OP_LOD = 0x6c, WINED3D_SM4_OP_LOD = 0x6c,
WINED3D_SM4_OP_GATHER4 = 0x6d, WINED3D_SM4_OP_GATHER4 = 0x6d,
WINED3D_SM4_OP_SAMPLE_POS = 0x6e, WINED3D_SM4_OP_SAMPLE_POS = 0x6e,
WINED3D_SM4_OP_SAMPLE_INFO = 0x6f,
WINED3D_SM5_OP_HS_DECLS = 0x71, WINED3D_SM5_OP_HS_DECLS = 0x71,
WINED3D_SM5_OP_HS_CONTROL_POINT_PHASE = 0x72, WINED3D_SM5_OP_HS_CONTROL_POINT_PHASE = 0x72,
WINED3D_SM5_OP_HS_FORK_PHASE = 0x73, WINED3D_SM5_OP_HS_FORK_PHASE = 0x73,
@ -806,6 +807,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
{WINED3D_SM4_OP_LOD, WINED3DSIH_LOD, "f", "fRS"}, {WINED3D_SM4_OP_LOD, WINED3DSIH_LOD, "f", "fRS"},
{WINED3D_SM4_OP_GATHER4, WINED3DSIH_GATHER4, "u", "fRS"}, {WINED3D_SM4_OP_GATHER4, WINED3DSIH_GATHER4, "u", "fRS"},
{WINED3D_SM4_OP_SAMPLE_POS, WINED3DSIH_SAMPLE_POS, "f", "Ru"}, {WINED3D_SM4_OP_SAMPLE_POS, WINED3DSIH_SAMPLE_POS, "f", "Ru"},
{WINED3D_SM4_OP_SAMPLE_INFO, WINED3DSIH_SAMPLE_INFO, "f", "R"},
{WINED3D_SM5_OP_HS_DECLS, WINED3DSIH_HS_DECLS, "", ""}, {WINED3D_SM5_OP_HS_DECLS, WINED3DSIH_HS_DECLS, "", ""},
{WINED3D_SM5_OP_HS_CONTROL_POINT_PHASE, WINED3DSIH_HS_CONTROL_POINT_PHASE, "", ""}, {WINED3D_SM5_OP_HS_CONTROL_POINT_PHASE, WINED3DSIH_HS_CONTROL_POINT_PHASE, "", ""},
{WINED3D_SM5_OP_HS_FORK_PHASE, WINED3DSIH_HS_FORK_PHASE, "", ""}, {WINED3D_SM5_OP_HS_FORK_PHASE, WINED3DSIH_HS_FORK_PHASE, "", ""},

View File

@ -495,6 +495,7 @@ enum wined3d_tessellator_partitioning
#define WINED3DSI_INDEXED_DYNAMIC 0x4 #define WINED3DSI_INDEXED_DYNAMIC 0x4
#define WINED3DSI_RESINFO_RCP_FLOAT 0x1 #define WINED3DSI_RESINFO_RCP_FLOAT 0x1
#define WINED3DSI_RESINFO_UINT 0x2 #define WINED3DSI_RESINFO_UINT 0x2
#define WINED3DSI_SAMPLE_INFO_UINT 0x1
#define WINED3DSI_SAMPLER_COMPARISON_MODE 0x1 #define WINED3DSI_SAMPLER_COMPARISON_MODE 0x1
enum wined3d_shader_rel_op enum wined3d_shader_rel_op
@ -705,6 +706,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_SAMPLE_C, WINED3DSIH_SAMPLE_C,
WINED3DSIH_SAMPLE_C_LZ, WINED3DSIH_SAMPLE_C_LZ,
WINED3DSIH_SAMPLE_GRAD, WINED3DSIH_SAMPLE_GRAD,
WINED3DSIH_SAMPLE_INFO,
WINED3DSIH_SAMPLE_LOD, WINED3DSIH_SAMPLE_LOD,
WINED3DSIH_SAMPLE_POS, WINED3DSIH_SAMPLE_POS,
WINED3DSIH_SETP, WINED3DSIH_SETP,