wined3d: Recognize SM5 dcl_resource_structured 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-03-25 19:53:36 +01:00 committed by Alexandre Julliard
parent 463980431f
commit f294f56a5a
5 changed files with 204 additions and 180 deletions

View File

@ -5239,6 +5239,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_DCL_OUTPUT */ NULL,
/* WINED3DSIH_DCL_OUTPUT_SIV */ NULL,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_hw_nop,
/* WINED3DSIH_DCL_RESOURCE_STRUCTURED */ NULL,
/* WINED3DSIH_DCL_SAMPLER */ NULL,
/* WINED3DSIH_DCL_TEMPS */ NULL,
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_hw_nop,

View File

@ -8125,6 +8125,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DCL_OUTPUT */ shader_glsl_nop,
/* WINED3DSIH_DCL_OUTPUT_SIV */ shader_glsl_nop,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_glsl_nop,
/* WINED3DSIH_DCL_RESOURCE_STRUCTURED */ NULL,
/* WINED3DSIH_DCL_SAMPLER */ shader_glsl_nop,
/* WINED3DSIH_DCL_TEMPS */ shader_glsl_nop,
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_glsl_nop,

View File

@ -67,6 +67,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_DCL_OUTPUT */ "dcl_output",
/* WINED3DSIH_DCL_OUTPUT_SIV */ "dcl_output_siv",
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ "dcl_outputTopology",
/* WINED3DSIH_DCL_RESOURCE_STRUCTURED */ "dcl_resource_structured",
/* WINED3DSIH_DCL_SAMPLER */ "dcl_sampler",
/* WINED3DSIH_DCL_TEMPS */ "dcl_temps",
/* WINED3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount",
@ -2022,6 +2023,12 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]);
shader_dump_primitive_type(&buffer, ins.declaration.primitive_type);
}
else if (ins.handler_idx == WINED3DSIH_DCL_RESOURCE_STRUCTURED)
{
shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]);
shader_dump_dst_param(&buffer, &ins.declaration.structured_resource.reg, &shader_version);
shader_addline(&buffer, ", %u", ins.declaration.structured_resource.byte_stride);
}
else if (ins.handler_idx == WINED3DSIH_DCL_SAMPLER)
{
shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]);

View File

@ -99,96 +99,97 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_bytecode);
enum wined3d_sm4_opcode
{
WINED3D_SM4_OP_ADD = 0x00,
WINED3D_SM4_OP_AND = 0x01,
WINED3D_SM4_OP_BREAK = 0x02,
WINED3D_SM4_OP_BREAKC = 0x03,
WINED3D_SM4_OP_CUT = 0x09,
WINED3D_SM4_OP_DERIV_RTX = 0x0b,
WINED3D_SM4_OP_DERIV_RTY = 0x0c,
WINED3D_SM4_OP_DISCARD = 0x0d,
WINED3D_SM4_OP_DIV = 0x0e,
WINED3D_SM4_OP_DP2 = 0x0f,
WINED3D_SM4_OP_DP3 = 0x10,
WINED3D_SM4_OP_DP4 = 0x11,
WINED3D_SM4_OP_ELSE = 0x12,
WINED3D_SM4_OP_EMIT = 0x13,
WINED3D_SM4_OP_ENDIF = 0x15,
WINED3D_SM4_OP_ENDLOOP = 0x16,
WINED3D_SM4_OP_EQ = 0x18,
WINED3D_SM4_OP_EXP = 0x19,
WINED3D_SM4_OP_FRC = 0x1a,
WINED3D_SM4_OP_FTOI = 0x1b,
WINED3D_SM4_OP_FTOU = 0x1c,
WINED3D_SM4_OP_GE = 0x1d,
WINED3D_SM4_OP_IADD = 0x1e,
WINED3D_SM4_OP_IF = 0x1f,
WINED3D_SM4_OP_IEQ = 0x20,
WINED3D_SM4_OP_IGE = 0x21,
WINED3D_SM4_OP_ILT = 0x22,
WINED3D_SM4_OP_IMAD = 0x23,
WINED3D_SM4_OP_IMAX = 0x24,
WINED3D_SM4_OP_IMIN = 0x25,
WINED3D_SM4_OP_IMUL = 0x26,
WINED3D_SM4_OP_INE = 0x27,
WINED3D_SM4_OP_INEG = 0x28,
WINED3D_SM4_OP_ISHL = 0x29,
WINED3D_SM4_OP_ITOF = 0x2b,
WINED3D_SM4_OP_LD = 0x2d,
WINED3D_SM4_OP_LD2DMS = 0x2e,
WINED3D_SM4_OP_LOG = 0x2f,
WINED3D_SM4_OP_LOOP = 0x30,
WINED3D_SM4_OP_LT = 0x31,
WINED3D_SM4_OP_MAD = 0x32,
WINED3D_SM4_OP_MIN = 0x33,
WINED3D_SM4_OP_MAX = 0x34,
WINED3D_SM4_OP_SHADER_DATA = 0x35,
WINED3D_SM4_OP_MOV = 0x36,
WINED3D_SM4_OP_MOVC = 0x37,
WINED3D_SM4_OP_MUL = 0x38,
WINED3D_SM4_OP_NE = 0x39,
WINED3D_SM4_OP_NOT = 0x3b,
WINED3D_SM4_OP_OR = 0x3c,
WINED3D_SM4_OP_RESINFO = 0x3d,
WINED3D_SM4_OP_RET = 0x3e,
WINED3D_SM4_OP_ROUND_NI = 0x41,
WINED3D_SM4_OP_ROUND_PI = 0x42,
WINED3D_SM4_OP_ROUND_Z = 0x43,
WINED3D_SM4_OP_RSQ = 0x44,
WINED3D_SM4_OP_SAMPLE = 0x45,
WINED3D_SM4_OP_SAMPLE_C = 0x46,
WINED3D_SM4_OP_SAMPLE_C_LZ = 0x47,
WINED3D_SM4_OP_SAMPLE_LOD = 0x48,
WINED3D_SM4_OP_SAMPLE_GRAD = 0x49,
WINED3D_SM4_OP_SAMPLE_B = 0x4a,
WINED3D_SM4_OP_SQRT = 0x4b,
WINED3D_SM4_OP_SINCOS = 0x4d,
WINED3D_SM4_OP_UDIV = 0x4e,
WINED3D_SM4_OP_UGE = 0x50,
WINED3D_SM4_OP_USHR = 0x55,
WINED3D_SM4_OP_UTOF = 0x56,
WINED3D_SM4_OP_XOR = 0x57,
WINED3D_SM4_OP_DCL_RESOURCE = 0x58,
WINED3D_SM4_OP_DCL_CONSTANT_BUFFER = 0x59,
WINED3D_SM4_OP_DCL_SAMPLER = 0x5a,
WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY = 0x5c,
WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE = 0x5d,
WINED3D_SM4_OP_DCL_VERTICES_OUT = 0x5e,
WINED3D_SM4_OP_DCL_INPUT = 0x5f,
WINED3D_SM4_OP_DCL_INPUT_SGV = 0x60,
WINED3D_SM4_OP_DCL_INPUT_SIV = 0x61,
WINED3D_SM4_OP_DCL_INPUT_PS = 0x62,
WINED3D_SM4_OP_DCL_INPUT_PS_SGV = 0x63,
WINED3D_SM4_OP_DCL_INPUT_PS_SIV = 0x64,
WINED3D_SM4_OP_DCL_OUTPUT = 0x65,
WINED3D_SM4_OP_DCL_OUTPUT_SIV = 0x67,
WINED3D_SM4_OP_DCL_TEMPS = 0x68,
WINED3D_SM4_OP_DCL_GLOBAL_FLAGS = 0x6a,
WINED3D_SM5_OP_DERIV_RTX_COARSE = 0x7a,
WINED3D_SM5_OP_DERIV_RTX_FINE = 0x7b,
WINED3D_SM5_OP_DERIV_RTY_COARSE = 0x7c,
WINED3D_SM5_OP_DERIV_RTY_FINE = 0x7d,
WINED3D_SM5_OP_LD_STRUCTURED = 0xa7,
WINED3D_SM4_OP_ADD = 0x00,
WINED3D_SM4_OP_AND = 0x01,
WINED3D_SM4_OP_BREAK = 0x02,
WINED3D_SM4_OP_BREAKC = 0x03,
WINED3D_SM4_OP_CUT = 0x09,
WINED3D_SM4_OP_DERIV_RTX = 0x0b,
WINED3D_SM4_OP_DERIV_RTY = 0x0c,
WINED3D_SM4_OP_DISCARD = 0x0d,
WINED3D_SM4_OP_DIV = 0x0e,
WINED3D_SM4_OP_DP2 = 0x0f,
WINED3D_SM4_OP_DP3 = 0x10,
WINED3D_SM4_OP_DP4 = 0x11,
WINED3D_SM4_OP_ELSE = 0x12,
WINED3D_SM4_OP_EMIT = 0x13,
WINED3D_SM4_OP_ENDIF = 0x15,
WINED3D_SM4_OP_ENDLOOP = 0x16,
WINED3D_SM4_OP_EQ = 0x18,
WINED3D_SM4_OP_EXP = 0x19,
WINED3D_SM4_OP_FRC = 0x1a,
WINED3D_SM4_OP_FTOI = 0x1b,
WINED3D_SM4_OP_FTOU = 0x1c,
WINED3D_SM4_OP_GE = 0x1d,
WINED3D_SM4_OP_IADD = 0x1e,
WINED3D_SM4_OP_IF = 0x1f,
WINED3D_SM4_OP_IEQ = 0x20,
WINED3D_SM4_OP_IGE = 0x21,
WINED3D_SM4_OP_ILT = 0x22,
WINED3D_SM4_OP_IMAD = 0x23,
WINED3D_SM4_OP_IMAX = 0x24,
WINED3D_SM4_OP_IMIN = 0x25,
WINED3D_SM4_OP_IMUL = 0x26,
WINED3D_SM4_OP_INE = 0x27,
WINED3D_SM4_OP_INEG = 0x28,
WINED3D_SM4_OP_ISHL = 0x29,
WINED3D_SM4_OP_ITOF = 0x2b,
WINED3D_SM4_OP_LD = 0x2d,
WINED3D_SM4_OP_LD2DMS = 0x2e,
WINED3D_SM4_OP_LOG = 0x2f,
WINED3D_SM4_OP_LOOP = 0x30,
WINED3D_SM4_OP_LT = 0x31,
WINED3D_SM4_OP_MAD = 0x32,
WINED3D_SM4_OP_MIN = 0x33,
WINED3D_SM4_OP_MAX = 0x34,
WINED3D_SM4_OP_SHADER_DATA = 0x35,
WINED3D_SM4_OP_MOV = 0x36,
WINED3D_SM4_OP_MOVC = 0x37,
WINED3D_SM4_OP_MUL = 0x38,
WINED3D_SM4_OP_NE = 0x39,
WINED3D_SM4_OP_NOT = 0x3b,
WINED3D_SM4_OP_OR = 0x3c,
WINED3D_SM4_OP_RESINFO = 0x3d,
WINED3D_SM4_OP_RET = 0x3e,
WINED3D_SM4_OP_ROUND_NI = 0x41,
WINED3D_SM4_OP_ROUND_PI = 0x42,
WINED3D_SM4_OP_ROUND_Z = 0x43,
WINED3D_SM4_OP_RSQ = 0x44,
WINED3D_SM4_OP_SAMPLE = 0x45,
WINED3D_SM4_OP_SAMPLE_C = 0x46,
WINED3D_SM4_OP_SAMPLE_C_LZ = 0x47,
WINED3D_SM4_OP_SAMPLE_LOD = 0x48,
WINED3D_SM4_OP_SAMPLE_GRAD = 0x49,
WINED3D_SM4_OP_SAMPLE_B = 0x4a,
WINED3D_SM4_OP_SQRT = 0x4b,
WINED3D_SM4_OP_SINCOS = 0x4d,
WINED3D_SM4_OP_UDIV = 0x4e,
WINED3D_SM4_OP_UGE = 0x50,
WINED3D_SM4_OP_USHR = 0x55,
WINED3D_SM4_OP_UTOF = 0x56,
WINED3D_SM4_OP_XOR = 0x57,
WINED3D_SM4_OP_DCL_RESOURCE = 0x58,
WINED3D_SM4_OP_DCL_CONSTANT_BUFFER = 0x59,
WINED3D_SM4_OP_DCL_SAMPLER = 0x5a,
WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY = 0x5c,
WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE = 0x5d,
WINED3D_SM4_OP_DCL_VERTICES_OUT = 0x5e,
WINED3D_SM4_OP_DCL_INPUT = 0x5f,
WINED3D_SM4_OP_DCL_INPUT_SGV = 0x60,
WINED3D_SM4_OP_DCL_INPUT_SIV = 0x61,
WINED3D_SM4_OP_DCL_INPUT_PS = 0x62,
WINED3D_SM4_OP_DCL_INPUT_PS_SGV = 0x63,
WINED3D_SM4_OP_DCL_INPUT_PS_SIV = 0x64,
WINED3D_SM4_OP_DCL_OUTPUT = 0x65,
WINED3D_SM4_OP_DCL_OUTPUT_SIV = 0x67,
WINED3D_SM4_OP_DCL_TEMPS = 0x68,
WINED3D_SM4_OP_DCL_GLOBAL_FLAGS = 0x6a,
WINED3D_SM5_OP_DERIV_RTX_COARSE = 0x7a,
WINED3D_SM5_OP_DERIV_RTX_FINE = 0x7b,
WINED3D_SM5_OP_DERIV_RTY_COARSE = 0x7c,
WINED3D_SM5_OP_DERIV_RTY_FINE = 0x7d,
WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED = 0xa2,
WINED3D_SM5_OP_LD_STRUCTURED = 0xa7,
};
enum wined3d_sm4_register_type
@ -306,96 +307,97 @@ struct wined3d_sm4_opcode_info
*/
static const struct wined3d_sm4_opcode_info opcode_table[] =
{
{WINED3D_SM4_OP_ADD, WINED3DSIH_ADD, "F", "FF"},
{WINED3D_SM4_OP_AND, WINED3DSIH_AND, "U", "UU"},
{WINED3D_SM4_OP_BREAK, WINED3DSIH_BREAK, "", ""},
{WINED3D_SM4_OP_BREAKC, WINED3DSIH_BREAKP, "", "U"},
{WINED3D_SM4_OP_CUT, WINED3DSIH_CUT, "", ""},
{WINED3D_SM4_OP_DERIV_RTX, WINED3DSIH_DSX, "F", "F"},
{WINED3D_SM4_OP_DERIV_RTY, WINED3DSIH_DSY, "F", "F"},
{WINED3D_SM4_OP_DISCARD, WINED3DSIH_TEXKILL, "", "U"},
{WINED3D_SM4_OP_DIV, WINED3DSIH_DIV, "F", "FF"},
{WINED3D_SM4_OP_DP2, WINED3DSIH_DP2, "F", "FF"},
{WINED3D_SM4_OP_DP3, WINED3DSIH_DP3, "F", "FF"},
{WINED3D_SM4_OP_DP4, WINED3DSIH_DP4, "F", "FF"},
{WINED3D_SM4_OP_ELSE, WINED3DSIH_ELSE, "", ""},
{WINED3D_SM4_OP_EMIT, WINED3DSIH_EMIT, "", ""},
{WINED3D_SM4_OP_ENDIF, WINED3DSIH_ENDIF, "", ""},
{WINED3D_SM4_OP_ENDLOOP, WINED3DSIH_ENDLOOP, "", ""},
{WINED3D_SM4_OP_EQ, WINED3DSIH_EQ, "U", "FF"},
{WINED3D_SM4_OP_EXP, WINED3DSIH_EXP, "F", "F"},
{WINED3D_SM4_OP_FRC, WINED3DSIH_FRC, "F", "F"},
{WINED3D_SM4_OP_FTOI, WINED3DSIH_FTOI, "I", "F"},
{WINED3D_SM4_OP_FTOU, WINED3DSIH_FTOU, "U", "F"},
{WINED3D_SM4_OP_GE, WINED3DSIH_GE, "U", "FF"},
{WINED3D_SM4_OP_IADD, WINED3DSIH_IADD, "I", "II"},
{WINED3D_SM4_OP_IF, WINED3DSIH_IF, "", "U"},
{WINED3D_SM4_OP_IEQ, WINED3DSIH_IEQ, "U", "II"},
{WINED3D_SM4_OP_IGE, WINED3DSIH_IGE, "U", "II"},
{WINED3D_SM4_OP_ILT, WINED3DSIH_ILT, "U", "II"},
{WINED3D_SM4_OP_IMAD, WINED3DSIH_IMAD, "I", "III"},
{WINED3D_SM4_OP_IMAX, WINED3DSIH_IMAX, "I", "II"},
{WINED3D_SM4_OP_IMIN, WINED3DSIH_IMIN, "I", "II"},
{WINED3D_SM4_OP_IMUL, WINED3DSIH_IMUL, "II", "II"},
{WINED3D_SM4_OP_INE, WINED3DSIH_INE, "U", "II"},
{WINED3D_SM4_OP_INEG, WINED3DSIH_INEG, "I", "I"},
{WINED3D_SM4_OP_ISHL, WINED3DSIH_ISHL, "I", "II"},
{WINED3D_SM4_OP_ITOF, WINED3DSIH_ITOF, "F", "I"},
{WINED3D_SM4_OP_LD, WINED3DSIH_LD, "U", "IR"},
{WINED3D_SM4_OP_LD2DMS, WINED3DSIH_LD2DMS, "U", "IRI"},
{WINED3D_SM4_OP_LOG, WINED3DSIH_LOG, "F", "F"},
{WINED3D_SM4_OP_LOOP, WINED3DSIH_LOOP, "", ""},
{WINED3D_SM4_OP_LT, WINED3DSIH_LT, "U", "FF"},
{WINED3D_SM4_OP_MAD, WINED3DSIH_MAD, "F", "FFF"},
{WINED3D_SM4_OP_MIN, WINED3DSIH_MIN, "F", "FF"},
{WINED3D_SM4_OP_MAX, WINED3DSIH_MAX, "F", "FF"},
{WINED3D_SM4_OP_SHADER_DATA, WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER, "", ""},
{WINED3D_SM4_OP_MOV, WINED3DSIH_MOV, "F", "F"},
{WINED3D_SM4_OP_MOVC, WINED3DSIH_MOVC, "F", "UFF"},
{WINED3D_SM4_OP_MUL, WINED3DSIH_MUL, "F", "FF"},
{WINED3D_SM4_OP_NE, WINED3DSIH_NE, "U", "FF"},
{WINED3D_SM4_OP_NOT, WINED3DSIH_NOT, "U", "U"},
{WINED3D_SM4_OP_OR, WINED3DSIH_OR, "U", "UU"},
{WINED3D_SM4_OP_RESINFO, WINED3DSIH_RESINFO, "F", "IR"},
{WINED3D_SM4_OP_RET, WINED3DSIH_RET, "", ""},
{WINED3D_SM4_OP_ROUND_NI, WINED3DSIH_ROUND_NI, "F", "F"},
{WINED3D_SM4_OP_ROUND_PI, WINED3DSIH_ROUND_PI, "F", "F"},
{WINED3D_SM4_OP_ROUND_Z, WINED3DSIH_ROUND_Z, "F", "F"},
{WINED3D_SM4_OP_RSQ, WINED3DSIH_RSQ, "F", "F"},
{WINED3D_SM4_OP_SAMPLE, WINED3DSIH_SAMPLE, "U", "FRS"},
{WINED3D_SM4_OP_SAMPLE_C, WINED3DSIH_SAMPLE_C, "F", "FRSF"},
{WINED3D_SM4_OP_SAMPLE_C_LZ, WINED3DSIH_SAMPLE_C_LZ, "F", "FRSF"},
{WINED3D_SM4_OP_SAMPLE_LOD, WINED3DSIH_SAMPLE_LOD, "U", "FRSF"},
{WINED3D_SM4_OP_SAMPLE_GRAD, WINED3DSIH_SAMPLE_GRAD, "U", "FRSFF"},
{WINED3D_SM4_OP_SAMPLE_B, WINED3DSIH_SAMPLE_B, "U", "FRSF"},
{WINED3D_SM4_OP_SQRT, WINED3DSIH_SQRT, "F", "F"},
{WINED3D_SM4_OP_SINCOS, WINED3DSIH_SINCOS, "FF", "F"},
{WINED3D_SM4_OP_UDIV, WINED3DSIH_UDIV, "UU", "UU"},
{WINED3D_SM4_OP_UGE, WINED3DSIH_UGE, "U", "UU"},
{WINED3D_SM4_OP_USHR, WINED3DSIH_USHR, "U", "UU"},
{WINED3D_SM4_OP_UTOF, WINED3DSIH_UTOF, "F", "U"},
{WINED3D_SM4_OP_XOR, WINED3DSIH_XOR, "U", "UU"},
{WINED3D_SM4_OP_DCL_RESOURCE, WINED3DSIH_DCL, "R", ""},
{WINED3D_SM4_OP_DCL_CONSTANT_BUFFER, WINED3DSIH_DCL_CONSTANT_BUFFER, "", ""},
{WINED3D_SM4_OP_DCL_SAMPLER, WINED3DSIH_DCL_SAMPLER, "", ""},
{WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY, WINED3DSIH_DCL_OUTPUT_TOPOLOGY, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE, WINED3DSIH_DCL_INPUT_PRIMITIVE, "", ""},
{WINED3D_SM4_OP_DCL_VERTICES_OUT, WINED3DSIH_DCL_VERTICES_OUT, "", ""},
{WINED3D_SM4_OP_DCL_INPUT, WINED3DSIH_DCL_INPUT, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_SGV, WINED3DSIH_DCL_INPUT_SGV, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_SIV, WINED3DSIH_DCL_INPUT_SIV, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_PS, WINED3DSIH_DCL_INPUT_PS, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_PS_SGV, WINED3DSIH_DCL_INPUT_PS_SGV, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_PS_SIV, WINED3DSIH_DCL_INPUT_PS_SIV, "", ""},
{WINED3D_SM4_OP_DCL_OUTPUT, WINED3DSIH_DCL_OUTPUT, "", ""},
{WINED3D_SM4_OP_DCL_OUTPUT_SIV, WINED3DSIH_DCL_OUTPUT_SIV, "", ""},
{WINED3D_SM4_OP_DCL_TEMPS, WINED3DSIH_DCL_TEMPS, "", ""},
{WINED3D_SM4_OP_DCL_GLOBAL_FLAGS, WINED3DSIH_DCL_GLOBAL_FLAGS, "", ""},
{WINED3D_SM5_OP_DERIV_RTX_COARSE, WINED3DSIH_DSX_COARSE, "F", "F"},
{WINED3D_SM5_OP_DERIV_RTX_FINE, WINED3DSIH_DSX_FINE, "F", "F"},
{WINED3D_SM5_OP_DERIV_RTY_COARSE, WINED3DSIH_DSY_COARSE, "F", "F"},
{WINED3D_SM5_OP_DERIV_RTY_FINE, WINED3DSIH_DSY_FINE, "F", "F"},
{WINED3D_SM5_OP_LD_STRUCTURED, WINED3DSIH_LD_STRUCTURED, "U", "UUR"},
{WINED3D_SM4_OP_ADD, WINED3DSIH_ADD, "F", "FF"},
{WINED3D_SM4_OP_AND, WINED3DSIH_AND, "U", "UU"},
{WINED3D_SM4_OP_BREAK, WINED3DSIH_BREAK, "", ""},
{WINED3D_SM4_OP_BREAKC, WINED3DSIH_BREAKP, "", "U"},
{WINED3D_SM4_OP_CUT, WINED3DSIH_CUT, "", ""},
{WINED3D_SM4_OP_DERIV_RTX, WINED3DSIH_DSX, "F", "F"},
{WINED3D_SM4_OP_DERIV_RTY, WINED3DSIH_DSY, "F", "F"},
{WINED3D_SM4_OP_DISCARD, WINED3DSIH_TEXKILL, "", "U"},
{WINED3D_SM4_OP_DIV, WINED3DSIH_DIV, "F", "FF"},
{WINED3D_SM4_OP_DP2, WINED3DSIH_DP2, "F", "FF"},
{WINED3D_SM4_OP_DP3, WINED3DSIH_DP3, "F", "FF"},
{WINED3D_SM4_OP_DP4, WINED3DSIH_DP4, "F", "FF"},
{WINED3D_SM4_OP_ELSE, WINED3DSIH_ELSE, "", ""},
{WINED3D_SM4_OP_EMIT, WINED3DSIH_EMIT, "", ""},
{WINED3D_SM4_OP_ENDIF, WINED3DSIH_ENDIF, "", ""},
{WINED3D_SM4_OP_ENDLOOP, WINED3DSIH_ENDLOOP, "", ""},
{WINED3D_SM4_OP_EQ, WINED3DSIH_EQ, "U", "FF"},
{WINED3D_SM4_OP_EXP, WINED3DSIH_EXP, "F", "F"},
{WINED3D_SM4_OP_FRC, WINED3DSIH_FRC, "F", "F"},
{WINED3D_SM4_OP_FTOI, WINED3DSIH_FTOI, "I", "F"},
{WINED3D_SM4_OP_FTOU, WINED3DSIH_FTOU, "U", "F"},
{WINED3D_SM4_OP_GE, WINED3DSIH_GE, "U", "FF"},
{WINED3D_SM4_OP_IADD, WINED3DSIH_IADD, "I", "II"},
{WINED3D_SM4_OP_IF, WINED3DSIH_IF, "", "U"},
{WINED3D_SM4_OP_IEQ, WINED3DSIH_IEQ, "U", "II"},
{WINED3D_SM4_OP_IGE, WINED3DSIH_IGE, "U", "II"},
{WINED3D_SM4_OP_ILT, WINED3DSIH_ILT, "U", "II"},
{WINED3D_SM4_OP_IMAD, WINED3DSIH_IMAD, "I", "III"},
{WINED3D_SM4_OP_IMAX, WINED3DSIH_IMAX, "I", "II"},
{WINED3D_SM4_OP_IMIN, WINED3DSIH_IMIN, "I", "II"},
{WINED3D_SM4_OP_IMUL, WINED3DSIH_IMUL, "II", "II"},
{WINED3D_SM4_OP_INE, WINED3DSIH_INE, "U", "II"},
{WINED3D_SM4_OP_INEG, WINED3DSIH_INEG, "I", "I"},
{WINED3D_SM4_OP_ISHL, WINED3DSIH_ISHL, "I", "II"},
{WINED3D_SM4_OP_ITOF, WINED3DSIH_ITOF, "F", "I"},
{WINED3D_SM4_OP_LD, WINED3DSIH_LD, "U", "IR"},
{WINED3D_SM4_OP_LD2DMS, WINED3DSIH_LD2DMS, "U", "IRI"},
{WINED3D_SM4_OP_LOG, WINED3DSIH_LOG, "F", "F"},
{WINED3D_SM4_OP_LOOP, WINED3DSIH_LOOP, "", ""},
{WINED3D_SM4_OP_LT, WINED3DSIH_LT, "U", "FF"},
{WINED3D_SM4_OP_MAD, WINED3DSIH_MAD, "F", "FFF"},
{WINED3D_SM4_OP_MIN, WINED3DSIH_MIN, "F", "FF"},
{WINED3D_SM4_OP_MAX, WINED3DSIH_MAX, "F", "FF"},
{WINED3D_SM4_OP_SHADER_DATA, WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER, "", ""},
{WINED3D_SM4_OP_MOV, WINED3DSIH_MOV, "F", "F"},
{WINED3D_SM4_OP_MOVC, WINED3DSIH_MOVC, "F", "UFF"},
{WINED3D_SM4_OP_MUL, WINED3DSIH_MUL, "F", "FF"},
{WINED3D_SM4_OP_NE, WINED3DSIH_NE, "U", "FF"},
{WINED3D_SM4_OP_NOT, WINED3DSIH_NOT, "U", "U"},
{WINED3D_SM4_OP_OR, WINED3DSIH_OR, "U", "UU"},
{WINED3D_SM4_OP_RESINFO, WINED3DSIH_RESINFO, "F", "IR"},
{WINED3D_SM4_OP_RET, WINED3DSIH_RET, "", ""},
{WINED3D_SM4_OP_ROUND_NI, WINED3DSIH_ROUND_NI, "F", "F"},
{WINED3D_SM4_OP_ROUND_PI, WINED3DSIH_ROUND_PI, "F", "F"},
{WINED3D_SM4_OP_ROUND_Z, WINED3DSIH_ROUND_Z, "F", "F"},
{WINED3D_SM4_OP_RSQ, WINED3DSIH_RSQ, "F", "F"},
{WINED3D_SM4_OP_SAMPLE, WINED3DSIH_SAMPLE, "U", "FRS"},
{WINED3D_SM4_OP_SAMPLE_C, WINED3DSIH_SAMPLE_C, "F", "FRSF"},
{WINED3D_SM4_OP_SAMPLE_C_LZ, WINED3DSIH_SAMPLE_C_LZ, "F", "FRSF"},
{WINED3D_SM4_OP_SAMPLE_LOD, WINED3DSIH_SAMPLE_LOD, "U", "FRSF"},
{WINED3D_SM4_OP_SAMPLE_GRAD, WINED3DSIH_SAMPLE_GRAD, "U", "FRSFF"},
{WINED3D_SM4_OP_SAMPLE_B, WINED3DSIH_SAMPLE_B, "U", "FRSF"},
{WINED3D_SM4_OP_SQRT, WINED3DSIH_SQRT, "F", "F"},
{WINED3D_SM4_OP_SINCOS, WINED3DSIH_SINCOS, "FF", "F"},
{WINED3D_SM4_OP_UDIV, WINED3DSIH_UDIV, "UU", "UU"},
{WINED3D_SM4_OP_UGE, WINED3DSIH_UGE, "U", "UU"},
{WINED3D_SM4_OP_USHR, WINED3DSIH_USHR, "U", "UU"},
{WINED3D_SM4_OP_UTOF, WINED3DSIH_UTOF, "F", "U"},
{WINED3D_SM4_OP_XOR, WINED3DSIH_XOR, "U", "UU"},
{WINED3D_SM4_OP_DCL_RESOURCE, WINED3DSIH_DCL, "R", ""},
{WINED3D_SM4_OP_DCL_CONSTANT_BUFFER, WINED3DSIH_DCL_CONSTANT_BUFFER, "", ""},
{WINED3D_SM4_OP_DCL_SAMPLER, WINED3DSIH_DCL_SAMPLER, "", ""},
{WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY, WINED3DSIH_DCL_OUTPUT_TOPOLOGY, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE, WINED3DSIH_DCL_INPUT_PRIMITIVE, "", ""},
{WINED3D_SM4_OP_DCL_VERTICES_OUT, WINED3DSIH_DCL_VERTICES_OUT, "", ""},
{WINED3D_SM4_OP_DCL_INPUT, WINED3DSIH_DCL_INPUT, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_SGV, WINED3DSIH_DCL_INPUT_SGV, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_SIV, WINED3DSIH_DCL_INPUT_SIV, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_PS, WINED3DSIH_DCL_INPUT_PS, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_PS_SGV, WINED3DSIH_DCL_INPUT_PS_SGV, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_PS_SIV, WINED3DSIH_DCL_INPUT_PS_SIV, "", ""},
{WINED3D_SM4_OP_DCL_OUTPUT, WINED3DSIH_DCL_OUTPUT, "", ""},
{WINED3D_SM4_OP_DCL_OUTPUT_SIV, WINED3DSIH_DCL_OUTPUT_SIV, "", ""},
{WINED3D_SM4_OP_DCL_TEMPS, WINED3DSIH_DCL_TEMPS, "", ""},
{WINED3D_SM4_OP_DCL_GLOBAL_FLAGS, WINED3DSIH_DCL_GLOBAL_FLAGS, "", ""},
{WINED3D_SM5_OP_DERIV_RTX_COARSE, WINED3DSIH_DSX_COARSE, "F", "F"},
{WINED3D_SM5_OP_DERIV_RTX_FINE, WINED3DSIH_DSX_FINE, "F", "F"},
{WINED3D_SM5_OP_DERIV_RTY_COARSE, WINED3DSIH_DSY_COARSE, "F", "F"},
{WINED3D_SM5_OP_DERIV_RTY_FINE, WINED3DSIH_DSY_FINE, "F", "F"},
{WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED, WINED3DSIH_DCL_RESOURCE_STRUCTURED, "R", "U"},
{WINED3D_SM5_OP_LD_STRUCTURED, WINED3DSIH_LD_STRUCTURED, "U", "UUR"},
};
static const enum wined3d_shader_register_type register_type_table[] =
@ -968,6 +970,11 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
ins->declaration.semantic.resource_data_type = data_type_table[data_type];
}
}
else if (opcode == WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED)
{
shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_RESOURCE, &ins->declaration.structured_resource.reg);
ins->declaration.structured_resource.byte_stride = *p++;
}
else if (opcode == WINED3D_SM4_OP_DCL_CONSTANT_BUFFER)
{
shader_sm4_read_src_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.src);

View File

@ -519,6 +519,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_DCL_OUTPUT,
WINED3DSIH_DCL_OUTPUT_SIV,
WINED3DSIH_DCL_OUTPUT_TOPOLOGY,
WINED3DSIH_DCL_RESOURCE_STRUCTURED,
WINED3DSIH_DCL_SAMPLER,
WINED3DSIH_DCL_TEMPS,
WINED3DSIH_DCL_VERTICES_OUT,
@ -809,6 +810,12 @@ struct wined3d_shader_register_semantic
enum wined3d_sysval_semantic sysval_semantic;
};
struct wined3d_shader_structured_resource
{
struct wined3d_shader_dst_param reg;
unsigned int byte_stride;
};
struct wined3d_shader_texel_offset
{
signed char u, v, w;
@ -835,6 +842,7 @@ struct wined3d_shader_instruction
struct wined3d_shader_src_param src;
UINT count;
const struct wined3d_shader_immediate_constant_buffer *icb;
struct wined3d_shader_structured_resource structured_resource;
} declaration;
};