diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 9551916704b..51c25120eb7 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -5230,6 +5230,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL /* WINED3DSIH_DCL */ shader_hw_nop, /* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_hw_nop, /* WINED3DSIH_DCL_GLOBAL_FLAGS */ NULL, + /* WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT */ NULL, /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL, /* WINED3DSIH_DCL_INPUT */ NULL, /* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ NULL, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 6bb0a2a6f2b..45e3a766a8a 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8124,6 +8124,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_DCL */ shader_glsl_nop, /* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_glsl_nop, /* WINED3DSIH_DCL_GLOBAL_FLAGS */ shader_glsl_nop, + /* WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT */ NULL, /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL, /* WINED3DSIH_DCL_INPUT */ shader_glsl_nop, /* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ NULL, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 6347fa0af87..b5a3e84d9bb 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -56,6 +56,7 @@ static const char * const shader_opcode_names[] = /* WINED3DSIH_DCL */ "dcl", /* WINED3DSIH_DCL_CONSTANT_BUFFER */ "dcl_constantBuffer", /* WINED3DSIH_DCL_GLOBAL_FLAGS */ "dcl_globalFlags", + /* WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT */ "dcl_hs_fork_phase_instance_count", /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ "dcl_immediateConstantBuffer", /* WINED3DSIH_DCL_INPUT */ "dcl_input", /* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ "dcl_input_control_point_count", @@ -2076,6 +2077,7 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe } else if (ins.handler_idx == WINED3DSIH_DCL_TEMPS || ins.handler_idx == WINED3DSIH_DCL_VERTICES_OUT + || ins.handler_idx == WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT || ins.handler_idx == WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT || ins.handler_idx == WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT) { diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index e4b4938b744..9a5243778d9 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -102,103 +102,104 @@ 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_HS_DECLS = 0x71, - WINED3D_SM5_OP_HS_FORK_PHASE = 0x73, - 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_INPUT_CPOINT_COUNT = 0x93, - WINED3D_SM5_OP_DCL_OUTPUT_CPOINT_COUNT = 0x94, - WINED3D_SM5_OP_DCL_UAV_TYPED = 0x9c, - WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED = 0xa2, - WINED3D_SM5_OP_STORE_UAV_TYPED = 0xa4, - 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_HS_DECLS = 0x71, + WINED3D_SM5_OP_HS_FORK_PHASE = 0x73, + 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_INPUT_CPOINT_COUNT = 0x93, + WINED3D_SM5_OP_DCL_OUTPUT_CPOINT_COUNT = 0x94, + WINED3D_SM5_OP_DCL_HS_FORK_PHASE_INSTANCE_COUNT = 0x99, + WINED3D_SM5_OP_DCL_UAV_TYPED = 0x9c, + WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED = 0xa2, + WINED3D_SM5_OP_STORE_UAV_TYPED = 0xa4, + WINED3D_SM5_OP_LD_STRUCTURED = 0xa7, }; enum wined3d_sm4_register_type @@ -318,103 +319,104 @@ 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_HS_DECLS, WINED3DSIH_HS_DECLS, "", ""}, - {WINED3D_SM5_OP_HS_FORK_PHASE, WINED3DSIH_HS_FORK_PHASE, "", ""}, - {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_INPUT_CPOINT_COUNT, WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT, "", ""}, - {WINED3D_SM5_OP_DCL_OUTPUT_CPOINT_COUNT, WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT, "", ""}, - {WINED3D_SM5_OP_DCL_UAV_TYPED, WINED3DSIH_DCL_UAV_TYPED, "", ""}, - {WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED, WINED3DSIH_DCL_RESOURCE_STRUCTURED, "", ""}, - {WINED3D_SM5_OP_STORE_UAV_TYPED, WINED3DSIH_STORE_UAV_TYPED, "", "Uif"}, - {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_HS_DECLS, WINED3DSIH_HS_DECLS, "", ""}, + {WINED3D_SM5_OP_HS_FORK_PHASE, WINED3DSIH_HS_FORK_PHASE, "", ""}, + {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_INPUT_CPOINT_COUNT, WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT, "", ""}, + {WINED3D_SM5_OP_DCL_OUTPUT_CPOINT_COUNT, WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT, "", ""}, + {WINED3D_SM5_OP_DCL_HS_FORK_PHASE_INSTANCE_COUNT, WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT, "", ""}, + {WINED3D_SM5_OP_DCL_UAV_TYPED, WINED3DSIH_DCL_UAV_TYPED, "", ""}, + {WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED, WINED3DSIH_DCL_RESOURCE_STRUCTURED, "", ""}, + {WINED3D_SM5_OP_STORE_UAV_TYPED, WINED3DSIH_STORE_UAV_TYPED, "", "Uif"}, + {WINED3D_SM5_OP_LD_STRUCTURED, WINED3DSIH_LD_STRUCTURED, "u", "uuR"}, }; static const enum wined3d_shader_register_type register_type_table[] = @@ -1074,7 +1076,8 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.dst); } else if (opcode == WINED3D_SM4_OP_DCL_VERTICES_OUT - || opcode == WINED3D_SM4_OP_DCL_TEMPS) + || opcode == WINED3D_SM4_OP_DCL_TEMPS + || opcode == WINED3D_SM5_OP_DCL_HS_FORK_PHASE_INSTANCE_COUNT) { ins->declaration.count = *p++; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 8385d8cb623..b011ccf44f9 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -512,6 +512,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER WINED3DSIH_DCL, WINED3DSIH_DCL_CONSTANT_BUFFER, WINED3DSIH_DCL_GLOBAL_FLAGS, + WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT, WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER, WINED3DSIH_DCL_INPUT, WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT,