Commit d574d639 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Recognize the SM4 dcl_maxOutputVertexCount opcode.

parent 0a17173b
......@@ -5085,113 +5085,114 @@ static void shader_arb_add_instruction_modifiers(const struct wined3d_shader_ins
static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABLE_SIZE] =
{
/* WINED3DSIH_ABS */ shader_hw_map2gl,
/* WINED3DSIH_ADD */ shader_hw_map2gl,
/* WINED3DSIH_AND */ NULL,
/* WINED3DSIH_BEM */ pshader_hw_bem,
/* WINED3DSIH_BREAK */ shader_hw_break,
/* WINED3DSIH_BREAKC */ shader_hw_breakc,
/* WINED3DSIH_BREAKP */ NULL,
/* WINED3DSIH_CALL */ shader_hw_call,
/* WINED3DSIH_CALLNZ */ NULL,
/* WINED3DSIH_CMP */ pshader_hw_cmp,
/* WINED3DSIH_CND */ pshader_hw_cnd,
/* WINED3DSIH_CRS */ shader_hw_map2gl,
/* WINED3DSIH_CUT */ NULL,
/* WINED3DSIH_DCL */ shader_hw_nop,
/* WINED3DSIH_DEF */ shader_hw_nop,
/* WINED3DSIH_DEFB */ shader_hw_nop,
/* WINED3DSIH_DEFI */ shader_hw_nop,
/* WINED3DSIH_DIV */ NULL,
/* WINED3DSIH_DP2ADD */ pshader_hw_dp2add,
/* WINED3DSIH_DP3 */ shader_hw_map2gl,
/* WINED3DSIH_DP4 */ shader_hw_map2gl,
/* WINED3DSIH_DST */ shader_hw_map2gl,
/* WINED3DSIH_DSX */ shader_hw_map2gl,
/* WINED3DSIH_DSY */ shader_hw_dsy,
/* WINED3DSIH_ELSE */ shader_hw_else,
/* WINED3DSIH_EMIT */ NULL,
/* WINED3DSIH_ENDIF */ shader_hw_endif,
/* WINED3DSIH_ENDLOOP */ shader_hw_endloop,
/* WINED3DSIH_ENDREP */ shader_hw_endrep,
/* WINED3DSIH_EQ */ NULL,
/* WINED3DSIH_EXP */ shader_hw_scalar_op,
/* WINED3DSIH_EXPP */ shader_hw_scalar_op,
/* WINED3DSIH_FRC */ shader_hw_map2gl,
/* WINED3DSIH_FTOI */ NULL,
/* WINED3DSIH_GE */ NULL,
/* WINED3DSIH_IADD */ NULL,
/* WINED3DSIH_IEQ */ NULL,
/* WINED3DSIH_IF */ NULL /* Hardcoded into the shader */,
/* WINED3DSIH_IFC */ shader_hw_ifc,
/* WINED3DSIH_IGE */ NULL,
/* WINED3DSIH_IMUL */ NULL,
/* WINED3DSIH_ITOF */ NULL,
/* WINED3DSIH_LABEL */ shader_hw_label,
/* WINED3DSIH_LD */ NULL,
/* WINED3DSIH_LIT */ shader_hw_map2gl,
/* WINED3DSIH_LOG */ shader_hw_log,
/* WINED3DSIH_LOGP */ shader_hw_log,
/* WINED3DSIH_LOOP */ shader_hw_loop,
/* WINED3DSIH_LRP */ shader_hw_lrp,
/* WINED3DSIH_LT */ NULL,
/* WINED3DSIH_M3x2 */ shader_hw_mnxn,
/* WINED3DSIH_M3x3 */ shader_hw_mnxn,
/* WINED3DSIH_M3x4 */ shader_hw_mnxn,
/* WINED3DSIH_M4x3 */ shader_hw_mnxn,
/* WINED3DSIH_M4x4 */ shader_hw_mnxn,
/* WINED3DSIH_MAD */ shader_hw_map2gl,
/* WINED3DSIH_MAX */ shader_hw_map2gl,
/* WINED3DSIH_MIN */ shader_hw_map2gl,
/* WINED3DSIH_MOV */ shader_hw_mov,
/* WINED3DSIH_MOVA */ shader_hw_mov,
/* WINED3DSIH_MOVC */ NULL,
/* WINED3DSIH_MUL */ shader_hw_map2gl,
/* WINED3DSIH_NOP */ shader_hw_nop,
/* WINED3DSIH_NRM */ shader_hw_nrm,
/* WINED3DSIH_PHASE */ shader_hw_nop,
/* WINED3DSIH_POW */ shader_hw_pow,
/* WINED3DSIH_RCP */ shader_hw_rcp,
/* WINED3DSIH_REP */ shader_hw_rep,
/* WINED3DSIH_RET */ shader_hw_ret,
/* WINED3DSIH_ROUND_NI */ NULL,
/* WINED3DSIH_RSQ */ shader_hw_scalar_op,
/* WINED3DSIH_SAMPLE */ NULL,
/* WINED3DSIH_SAMPLE_GRAD */ NULL,
/* WINED3DSIH_SAMPLE_LOD */ NULL,
/* WINED3DSIH_SETP */ NULL,
/* WINED3DSIH_SGE */ shader_hw_map2gl,
/* WINED3DSIH_SGN */ shader_hw_sgn,
/* WINED3DSIH_SINCOS */ shader_hw_sincos,
/* WINED3DSIH_SLT */ shader_hw_map2gl,
/* WINED3DSIH_SQRT */ NULL,
/* WINED3DSIH_SUB */ shader_hw_map2gl,
/* WINED3DSIH_TEX */ pshader_hw_tex,
/* WINED3DSIH_TEXBEM */ pshader_hw_texbem,
/* WINED3DSIH_TEXBEML */ pshader_hw_texbem,
/* WINED3DSIH_TEXCOORD */ pshader_hw_texcoord,
/* WINED3DSIH_TEXDEPTH */ pshader_hw_texdepth,
/* WINED3DSIH_TEXDP3 */ pshader_hw_texdp3,
/* WINED3DSIH_TEXDP3TEX */ pshader_hw_texdp3tex,
/* WINED3DSIH_TEXKILL */ pshader_hw_texkill,
/* WINED3DSIH_TEXLDD */ shader_hw_texldd,
/* WINED3DSIH_TEXLDL */ shader_hw_texldl,
/* WINED3DSIH_TEXM3x2DEPTH */ pshader_hw_texm3x2depth,
/* WINED3DSIH_TEXM3x2PAD */ pshader_hw_texm3x2pad,
/* WINED3DSIH_TEXM3x2TEX */ pshader_hw_texm3x2tex,
/* WINED3DSIH_TEXM3x3 */ pshader_hw_texm3x3,
/* WINED3DSIH_TEXM3x3DIFF */ NULL,
/* WINED3DSIH_TEXM3x3PAD */ pshader_hw_texm3x3pad,
/* WINED3DSIH_TEXM3x3SPEC */ pshader_hw_texm3x3spec,
/* WINED3DSIH_TEXM3x3TEX */ pshader_hw_texm3x3tex,
/* WINED3DSIH_TEXM3x3VSPEC */ pshader_hw_texm3x3vspec,
/* WINED3DSIH_TEXREG2AR */ pshader_hw_texreg2ar,
/* WINED3DSIH_TEXREG2GB */ pshader_hw_texreg2gb,
/* WINED3DSIH_TEXREG2RGB */ pshader_hw_texreg2rgb,
/* WINED3DSIH_UDIV */ NULL,
/* WINED3DSIH_USHR */ NULL,
/* WINED3DSIH_UTOF */ NULL,
/* WINED3DSIH_XOR */ NULL,
/* WINED3DSIH_ABS */ shader_hw_map2gl,
/* WINED3DSIH_ADD */ shader_hw_map2gl,
/* WINED3DSIH_AND */ NULL,
/* WINED3DSIH_BEM */ pshader_hw_bem,
/* WINED3DSIH_BREAK */ shader_hw_break,
/* WINED3DSIH_BREAKC */ shader_hw_breakc,
/* WINED3DSIH_BREAKP */ NULL,
/* WINED3DSIH_CALL */ shader_hw_call,
/* WINED3DSIH_CALLNZ */ NULL,
/* WINED3DSIH_CMP */ pshader_hw_cmp,
/* WINED3DSIH_CND */ pshader_hw_cnd,
/* WINED3DSIH_CRS */ shader_hw_map2gl,
/* WINED3DSIH_CUT */ NULL,
/* WINED3DSIH_DCL */ shader_hw_nop,
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_hw_nop,
/* WINED3DSIH_DEF */ shader_hw_nop,
/* WINED3DSIH_DEFB */ shader_hw_nop,
/* WINED3DSIH_DEFI */ shader_hw_nop,
/* WINED3DSIH_DIV */ NULL,
/* WINED3DSIH_DP2ADD */ pshader_hw_dp2add,
/* WINED3DSIH_DP3 */ shader_hw_map2gl,
/* WINED3DSIH_DP4 */ shader_hw_map2gl,
/* WINED3DSIH_DST */ shader_hw_map2gl,
/* WINED3DSIH_DSX */ shader_hw_map2gl,
/* WINED3DSIH_DSY */ shader_hw_dsy,
/* WINED3DSIH_ELSE */ shader_hw_else,
/* WINED3DSIH_EMIT */ NULL,
/* WINED3DSIH_ENDIF */ shader_hw_endif,
/* WINED3DSIH_ENDLOOP */ shader_hw_endloop,
/* WINED3DSIH_ENDREP */ shader_hw_endrep,
/* WINED3DSIH_EQ */ NULL,
/* WINED3DSIH_EXP */ shader_hw_scalar_op,
/* WINED3DSIH_EXPP */ shader_hw_scalar_op,
/* WINED3DSIH_FRC */ shader_hw_map2gl,
/* WINED3DSIH_FTOI */ NULL,
/* WINED3DSIH_GE */ NULL,
/* WINED3DSIH_IADD */ NULL,
/* WINED3DSIH_IEQ */ NULL,
/* WINED3DSIH_IF */ NULL /* Hardcoded into the shader */,
/* WINED3DSIH_IFC */ shader_hw_ifc,
/* WINED3DSIH_IGE */ NULL,
/* WINED3DSIH_IMUL */ NULL,
/* WINED3DSIH_ITOF */ NULL,
/* WINED3DSIH_LABEL */ shader_hw_label,
/* WINED3DSIH_LD */ NULL,
/* WINED3DSIH_LIT */ shader_hw_map2gl,
/* WINED3DSIH_LOG */ shader_hw_log,
/* WINED3DSIH_LOGP */ shader_hw_log,
/* WINED3DSIH_LOOP */ shader_hw_loop,
/* WINED3DSIH_LRP */ shader_hw_lrp,
/* WINED3DSIH_LT */ NULL,
/* WINED3DSIH_M3x2 */ shader_hw_mnxn,
/* WINED3DSIH_M3x3 */ shader_hw_mnxn,
/* WINED3DSIH_M3x4 */ shader_hw_mnxn,
/* WINED3DSIH_M4x3 */ shader_hw_mnxn,
/* WINED3DSIH_M4x4 */ shader_hw_mnxn,
/* WINED3DSIH_MAD */ shader_hw_map2gl,
/* WINED3DSIH_MAX */ shader_hw_map2gl,
/* WINED3DSIH_MIN */ shader_hw_map2gl,
/* WINED3DSIH_MOV */ shader_hw_mov,
/* WINED3DSIH_MOVA */ shader_hw_mov,
/* WINED3DSIH_MOVC */ NULL,
/* WINED3DSIH_MUL */ shader_hw_map2gl,
/* WINED3DSIH_NOP */ shader_hw_nop,
/* WINED3DSIH_NRM */ shader_hw_nrm,
/* WINED3DSIH_PHASE */ shader_hw_nop,
/* WINED3DSIH_POW */ shader_hw_pow,
/* WINED3DSIH_RCP */ shader_hw_rcp,
/* WINED3DSIH_REP */ shader_hw_rep,
/* WINED3DSIH_RET */ shader_hw_ret,
/* WINED3DSIH_ROUND_NI */ NULL,
/* WINED3DSIH_RSQ */ shader_hw_scalar_op,
/* WINED3DSIH_SAMPLE */ NULL,
/* WINED3DSIH_SAMPLE_GRAD */ NULL,
/* WINED3DSIH_SAMPLE_LOD */ NULL,
/* WINED3DSIH_SETP */ NULL,
/* WINED3DSIH_SGE */ shader_hw_map2gl,
/* WINED3DSIH_SGN */ shader_hw_sgn,
/* WINED3DSIH_SINCOS */ shader_hw_sincos,
/* WINED3DSIH_SLT */ shader_hw_map2gl,
/* WINED3DSIH_SQRT */ NULL,
/* WINED3DSIH_SUB */ shader_hw_map2gl,
/* WINED3DSIH_TEX */ pshader_hw_tex,
/* WINED3DSIH_TEXBEM */ pshader_hw_texbem,
/* WINED3DSIH_TEXBEML */ pshader_hw_texbem,
/* WINED3DSIH_TEXCOORD */ pshader_hw_texcoord,
/* WINED3DSIH_TEXDEPTH */ pshader_hw_texdepth,
/* WINED3DSIH_TEXDP3 */ pshader_hw_texdp3,
/* WINED3DSIH_TEXDP3TEX */ pshader_hw_texdp3tex,
/* WINED3DSIH_TEXKILL */ pshader_hw_texkill,
/* WINED3DSIH_TEXLDD */ shader_hw_texldd,
/* WINED3DSIH_TEXLDL */ shader_hw_texldl,
/* WINED3DSIH_TEXM3x2DEPTH */ pshader_hw_texm3x2depth,
/* WINED3DSIH_TEXM3x2PAD */ pshader_hw_texm3x2pad,
/* WINED3DSIH_TEXM3x2TEX */ pshader_hw_texm3x2tex,
/* WINED3DSIH_TEXM3x3 */ pshader_hw_texm3x3,
/* WINED3DSIH_TEXM3x3DIFF */ NULL,
/* WINED3DSIH_TEXM3x3PAD */ pshader_hw_texm3x3pad,
/* WINED3DSIH_TEXM3x3SPEC */ pshader_hw_texm3x3spec,
/* WINED3DSIH_TEXM3x3TEX */ pshader_hw_texm3x3tex,
/* WINED3DSIH_TEXM3x3VSPEC */ pshader_hw_texm3x3vspec,
/* WINED3DSIH_TEXREG2AR */ pshader_hw_texreg2ar,
/* WINED3DSIH_TEXREG2GB */ pshader_hw_texreg2gb,
/* WINED3DSIH_TEXREG2RGB */ pshader_hw_texreg2rgb,
/* WINED3DSIH_UDIV */ NULL,
/* WINED3DSIH_USHR */ NULL,
/* WINED3DSIH_UTOF */ NULL,
/* WINED3DSIH_XOR */ NULL,
};
static BOOL get_bool_const(const struct wined3d_shader_instruction *ins,
......
......@@ -5017,113 +5017,114 @@ static BOOL shader_glsl_color_fixup_supported(struct color_fixup_desc fixup)
static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TABLE_SIZE] =
{
/* WINED3DSIH_ABS */ shader_glsl_map2gl,
/* WINED3DSIH_ADD */ shader_glsl_arith,
/* WINED3DSIH_AND */ NULL,
/* WINED3DSIH_BEM */ shader_glsl_bem,
/* WINED3DSIH_BREAK */ shader_glsl_break,
/* WINED3DSIH_BREAKC */ shader_glsl_breakc,
/* WINED3DSIH_BREAKP */ NULL,
/* WINED3DSIH_CALL */ shader_glsl_call,
/* WINED3DSIH_CALLNZ */ shader_glsl_callnz,
/* WINED3DSIH_CMP */ shader_glsl_cmp,
/* WINED3DSIH_CND */ shader_glsl_cnd,
/* WINED3DSIH_CRS */ shader_glsl_cross,
/* WINED3DSIH_CUT */ NULL,
/* WINED3DSIH_DCL */ shader_glsl_nop,
/* WINED3DSIH_DEF */ shader_glsl_nop,
/* WINED3DSIH_DEFB */ shader_glsl_nop,
/* WINED3DSIH_DEFI */ shader_glsl_nop,
/* WINED3DSIH_DIV */ NULL,
/* WINED3DSIH_DP2ADD */ shader_glsl_dp2add,
/* WINED3DSIH_DP3 */ shader_glsl_dot,
/* WINED3DSIH_DP4 */ shader_glsl_dot,
/* WINED3DSIH_DST */ shader_glsl_dst,
/* WINED3DSIH_DSX */ shader_glsl_map2gl,
/* WINED3DSIH_DSY */ shader_glsl_map2gl,
/* WINED3DSIH_ELSE */ shader_glsl_else,
/* WINED3DSIH_EMIT */ NULL,
/* WINED3DSIH_ENDIF */ shader_glsl_end,
/* WINED3DSIH_ENDLOOP */ shader_glsl_end,
/* WINED3DSIH_ENDREP */ shader_glsl_end,
/* WINED3DSIH_EQ */ NULL,
/* WINED3DSIH_EXP */ shader_glsl_map2gl,
/* WINED3DSIH_EXPP */ shader_glsl_expp,
/* WINED3DSIH_FRC */ shader_glsl_map2gl,
/* WINED3DSIH_FTOI */ NULL,
/* WINED3DSIH_GE */ NULL,
/* WINED3DSIH_IADD */ NULL,
/* WINED3DSIH_IEQ */ NULL,
/* WINED3DSIH_IF */ shader_glsl_if,
/* WINED3DSIH_IFC */ shader_glsl_ifc,
/* WINED3DSIH_IGE */ NULL,
/* WINED3DSIH_IMUL */ NULL,
/* WINED3DSIH_ITOF */ NULL,
/* WINED3DSIH_LABEL */ shader_glsl_label,
/* WINED3DSIH_LD */ NULL,
/* WINED3DSIH_LIT */ shader_glsl_lit,
/* WINED3DSIH_LOG */ shader_glsl_log,
/* WINED3DSIH_LOGP */ shader_glsl_log,
/* WINED3DSIH_LOOP */ shader_glsl_loop,
/* WINED3DSIH_LRP */ shader_glsl_lrp,
/* WINED3DSIH_LT */ NULL,
/* WINED3DSIH_M3x2 */ shader_glsl_mnxn,
/* WINED3DSIH_M3x3 */ shader_glsl_mnxn,
/* WINED3DSIH_M3x4 */ shader_glsl_mnxn,
/* WINED3DSIH_M4x3 */ shader_glsl_mnxn,
/* WINED3DSIH_M4x4 */ shader_glsl_mnxn,
/* WINED3DSIH_MAD */ shader_glsl_mad,
/* WINED3DSIH_MAX */ shader_glsl_map2gl,
/* WINED3DSIH_MIN */ shader_glsl_map2gl,
/* WINED3DSIH_MOV */ shader_glsl_mov,
/* WINED3DSIH_MOVA */ shader_glsl_mov,
/* WINED3DSIH_MOVC */ NULL,
/* WINED3DSIH_MUL */ shader_glsl_arith,
/* WINED3DSIH_NOP */ shader_glsl_nop,
/* WINED3DSIH_NRM */ shader_glsl_nrm,
/* WINED3DSIH_PHASE */ shader_glsl_nop,
/* WINED3DSIH_POW */ shader_glsl_pow,
/* WINED3DSIH_RCP */ shader_glsl_rcp,
/* WINED3DSIH_REP */ shader_glsl_rep,
/* WINED3DSIH_RET */ shader_glsl_ret,
/* WINED3DSIH_ROUND_NI */ NULL,
/* WINED3DSIH_RSQ */ shader_glsl_rsq,
/* WINED3DSIH_SAMPLE */ NULL,
/* WINED3DSIH_SAMPLE_GRAD */ NULL,
/* WINED3DSIH_SAMPLE_LOD */ NULL,
/* WINED3DSIH_SETP */ NULL,
/* WINED3DSIH_SGE */ shader_glsl_compare,
/* WINED3DSIH_SGN */ shader_glsl_sgn,
/* WINED3DSIH_SINCOS */ shader_glsl_sincos,
/* WINED3DSIH_SLT */ shader_glsl_compare,
/* WINED3DSIH_SQRT */ NULL,
/* WINED3DSIH_SUB */ shader_glsl_arith,
/* WINED3DSIH_TEX */ shader_glsl_tex,
/* WINED3DSIH_TEXBEM */ shader_glsl_texbem,
/* WINED3DSIH_TEXBEML */ shader_glsl_texbem,
/* WINED3DSIH_TEXCOORD */ shader_glsl_texcoord,
/* WINED3DSIH_TEXDEPTH */ shader_glsl_texdepth,
/* WINED3DSIH_TEXDP3 */ shader_glsl_texdp3,
/* WINED3DSIH_TEXDP3TEX */ shader_glsl_texdp3tex,
/* WINED3DSIH_TEXKILL */ shader_glsl_texkill,
/* WINED3DSIH_TEXLDD */ shader_glsl_texldd,
/* WINED3DSIH_TEXLDL */ shader_glsl_texldl,
/* WINED3DSIH_TEXM3x2DEPTH */ shader_glsl_texm3x2depth,
/* WINED3DSIH_TEXM3x2PAD */ shader_glsl_texm3x2pad,
/* WINED3DSIH_TEXM3x2TEX */ shader_glsl_texm3x2tex,
/* WINED3DSIH_TEXM3x3 */ shader_glsl_texm3x3,
/* WINED3DSIH_TEXM3x3DIFF */ NULL,
/* WINED3DSIH_TEXM3x3PAD */ shader_glsl_texm3x3pad,
/* WINED3DSIH_TEXM3x3SPEC */ shader_glsl_texm3x3spec,
/* WINED3DSIH_TEXM3x3TEX */ shader_glsl_texm3x3tex,
/* WINED3DSIH_TEXM3x3VSPEC */ shader_glsl_texm3x3vspec,
/* WINED3DSIH_TEXREG2AR */ shader_glsl_texreg2ar,
/* WINED3DSIH_TEXREG2GB */ shader_glsl_texreg2gb,
/* WINED3DSIH_TEXREG2RGB */ shader_glsl_texreg2rgb,
/* WINED3DSIH_UDIV */ NULL,
/* WINED3DSIH_USHR */ NULL,
/* WINED3DSIH_UTOF */ NULL,
/* WINED3DSIH_XOR */ NULL,
/* WINED3DSIH_ABS */ shader_glsl_map2gl,
/* WINED3DSIH_ADD */ shader_glsl_arith,
/* WINED3DSIH_AND */ NULL,
/* WINED3DSIH_BEM */ shader_glsl_bem,
/* WINED3DSIH_BREAK */ shader_glsl_break,
/* WINED3DSIH_BREAKC */ shader_glsl_breakc,
/* WINED3DSIH_BREAKP */ NULL,
/* WINED3DSIH_CALL */ shader_glsl_call,
/* WINED3DSIH_CALLNZ */ shader_glsl_callnz,
/* WINED3DSIH_CMP */ shader_glsl_cmp,
/* WINED3DSIH_CND */ shader_glsl_cnd,
/* WINED3DSIH_CRS */ shader_glsl_cross,
/* WINED3DSIH_CUT */ NULL,
/* WINED3DSIH_DCL */ shader_glsl_nop,
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_glsl_nop,
/* WINED3DSIH_DEF */ shader_glsl_nop,
/* WINED3DSIH_DEFB */ shader_glsl_nop,
/* WINED3DSIH_DEFI */ shader_glsl_nop,
/* WINED3DSIH_DIV */ NULL,
/* WINED3DSIH_DP2ADD */ shader_glsl_dp2add,
/* WINED3DSIH_DP3 */ shader_glsl_dot,
/* WINED3DSIH_DP4 */ shader_glsl_dot,
/* WINED3DSIH_DST */ shader_glsl_dst,
/* WINED3DSIH_DSX */ shader_glsl_map2gl,
/* WINED3DSIH_DSY */ shader_glsl_map2gl,
/* WINED3DSIH_ELSE */ shader_glsl_else,
/* WINED3DSIH_EMIT */ NULL,
/* WINED3DSIH_ENDIF */ shader_glsl_end,
/* WINED3DSIH_ENDLOOP */ shader_glsl_end,
/* WINED3DSIH_ENDREP */ shader_glsl_end,
/* WINED3DSIH_EQ */ NULL,
/* WINED3DSIH_EXP */ shader_glsl_map2gl,
/* WINED3DSIH_EXPP */ shader_glsl_expp,
/* WINED3DSIH_FRC */ shader_glsl_map2gl,
/* WINED3DSIH_FTOI */ NULL,
/* WINED3DSIH_GE */ NULL,
/* WINED3DSIH_IADD */ NULL,
/* WINED3DSIH_IEQ */ NULL,
/* WINED3DSIH_IF */ shader_glsl_if,
/* WINED3DSIH_IFC */ shader_glsl_ifc,
/* WINED3DSIH_IGE */ NULL,
/* WINED3DSIH_IMUL */ NULL,
/* WINED3DSIH_ITOF */ NULL,
/* WINED3DSIH_LABEL */ shader_glsl_label,
/* WINED3DSIH_LD */ NULL,
/* WINED3DSIH_LIT */ shader_glsl_lit,
/* WINED3DSIH_LOG */ shader_glsl_log,
/* WINED3DSIH_LOGP */ shader_glsl_log,
/* WINED3DSIH_LOOP */ shader_glsl_loop,
/* WINED3DSIH_LRP */ shader_glsl_lrp,
/* WINED3DSIH_LT */ NULL,
/* WINED3DSIH_M3x2 */ shader_glsl_mnxn,
/* WINED3DSIH_M3x3 */ shader_glsl_mnxn,
/* WINED3DSIH_M3x4 */ shader_glsl_mnxn,
/* WINED3DSIH_M4x3 */ shader_glsl_mnxn,
/* WINED3DSIH_M4x4 */ shader_glsl_mnxn,
/* WINED3DSIH_MAD */ shader_glsl_mad,
/* WINED3DSIH_MAX */ shader_glsl_map2gl,
/* WINED3DSIH_MIN */ shader_glsl_map2gl,
/* WINED3DSIH_MOV */ shader_glsl_mov,
/* WINED3DSIH_MOVA */ shader_glsl_mov,
/* WINED3DSIH_MOVC */ NULL,
/* WINED3DSIH_MUL */ shader_glsl_arith,
/* WINED3DSIH_NOP */ shader_glsl_nop,
/* WINED3DSIH_NRM */ shader_glsl_nrm,
/* WINED3DSIH_PHASE */ shader_glsl_nop,
/* WINED3DSIH_POW */ shader_glsl_pow,
/* WINED3DSIH_RCP */ shader_glsl_rcp,
/* WINED3DSIH_REP */ shader_glsl_rep,
/* WINED3DSIH_RET */ shader_glsl_ret,
/* WINED3DSIH_ROUND_NI */ NULL,
/* WINED3DSIH_RSQ */ shader_glsl_rsq,
/* WINED3DSIH_SAMPLE */ NULL,
/* WINED3DSIH_SAMPLE_GRAD */ NULL,
/* WINED3DSIH_SAMPLE_LOD */ NULL,
/* WINED3DSIH_SETP */ NULL,
/* WINED3DSIH_SGE */ shader_glsl_compare,
/* WINED3DSIH_SGN */ shader_glsl_sgn,
/* WINED3DSIH_SINCOS */ shader_glsl_sincos,
/* WINED3DSIH_SLT */ shader_glsl_compare,
/* WINED3DSIH_SQRT */ NULL,
/* WINED3DSIH_SUB */ shader_glsl_arith,
/* WINED3DSIH_TEX */ shader_glsl_tex,
/* WINED3DSIH_TEXBEM */ shader_glsl_texbem,
/* WINED3DSIH_TEXBEML */ shader_glsl_texbem,
/* WINED3DSIH_TEXCOORD */ shader_glsl_texcoord,
/* WINED3DSIH_TEXDEPTH */ shader_glsl_texdepth,
/* WINED3DSIH_TEXDP3 */ shader_glsl_texdp3,
/* WINED3DSIH_TEXDP3TEX */ shader_glsl_texdp3tex,
/* WINED3DSIH_TEXKILL */ shader_glsl_texkill,
/* WINED3DSIH_TEXLDD */ shader_glsl_texldd,
/* WINED3DSIH_TEXLDL */ shader_glsl_texldl,
/* WINED3DSIH_TEXM3x2DEPTH */ shader_glsl_texm3x2depth,
/* WINED3DSIH_TEXM3x2PAD */ shader_glsl_texm3x2pad,
/* WINED3DSIH_TEXM3x2TEX */ shader_glsl_texm3x2tex,
/* WINED3DSIH_TEXM3x3 */ shader_glsl_texm3x3,
/* WINED3DSIH_TEXM3x3DIFF */ NULL,
/* WINED3DSIH_TEXM3x3PAD */ shader_glsl_texm3x3pad,
/* WINED3DSIH_TEXM3x3SPEC */ shader_glsl_texm3x3spec,
/* WINED3DSIH_TEXM3x3TEX */ shader_glsl_texm3x3tex,
/* WINED3DSIH_TEXM3x3VSPEC */ shader_glsl_texm3x3vspec,
/* WINED3DSIH_TEXREG2AR */ shader_glsl_texreg2ar,
/* WINED3DSIH_TEXREG2GB */ shader_glsl_texreg2gb,
/* WINED3DSIH_TEXREG2RGB */ shader_glsl_texreg2rgb,
/* WINED3DSIH_UDIV */ NULL,
/* WINED3DSIH_USHR */ NULL,
/* WINED3DSIH_UTOF */ NULL,
/* WINED3DSIH_XOR */ NULL,
};
static void shader_glsl_handle_instruction(const struct wined3d_shader_instruction *ins) {
......
......@@ -36,113 +36,114 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d);
static const char * const shader_opcode_names[] =
{
/* WINED3DSIH_ABS */ "abs",
/* WINED3DSIH_ADD */ "add",
/* WINED3DSIH_AND */ "and",
/* WINED3DSIH_BEM */ "bem",
/* WINED3DSIH_BREAK */ "break",
/* WINED3DSIH_BREAKC */ "breakc",
/* WINED3DSIH_BREAKP */ "breakp",
/* WINED3DSIH_CALL */ "call",
/* WINED3DSIH_CALLNZ */ "callnz",
/* WINED3DSIH_CMP */ "cmp",
/* WINED3DSIH_CND */ "cnd",
/* WINED3DSIH_CRS */ "crs",
/* WINED3DSIH_CUT */ "cut",
/* WINED3DSIH_DCL */ "dcl",
/* WINED3DSIH_DEF */ "def",
/* WINED3DSIH_DEFB */ "defb",
/* WINED3DSIH_DEFI */ "defi",
/* WINED3DSIH_DIV */ "div",
/* WINED3DSIH_DP2ADD */ "dp2add",
/* WINED3DSIH_DP3 */ "dp3",
/* WINED3DSIH_DP4 */ "dp4",
/* WINED3DSIH_DST */ "dst",
/* WINED3DSIH_DSX */ "dsx",
/* WINED3DSIH_DSY */ "dsy",
/* WINED3DSIH_ELSE */ "else",
/* WINED3DSIH_EMIT */ "emit",
/* WINED3DSIH_ENDIF */ "endif",
/* WINED3DSIH_ENDLOOP */ "endloop",
/* WINED3DSIH_ENDREP */ "endrep",
/* WINED3DSIH_EQ */ "eq",
/* WINED3DSIH_EXP */ "exp",
/* WINED3DSIH_EXPP */ "expp",
/* WINED3DSIH_FRC */ "frc",
/* WINED3DSIH_FTOI */ "ftoi",
/* WINED3DSIH_GE */ "ge",
/* WINED3DSIH_IADD */ "iadd",
/* WINED3DSIH_IEQ */ "ieq",
/* WINED3DSIH_IF */ "if",
/* WINED3DSIH_IFC */ "ifc",
/* WINED3DSIH_IGE */ "ige",
/* WINED3DSIH_IMUL */ "imul",
/* WINED3DSIH_ITOF */ "itof",
/* WINED3DSIH_LABEL */ "label",
/* WINED3DSIH_LD */ "ld",
/* WINED3DSIH_LIT */ "lit",
/* WINED3DSIH_LOG */ "log",
/* WINED3DSIH_LOGP */ "logp",
/* WINED3DSIH_LOOP */ "loop",
/* WINED3DSIH_LRP */ "lrp",
/* WINED3DSIH_LT */ "lt",
/* WINED3DSIH_M3x2 */ "m3x2",
/* WINED3DSIH_M3x3 */ "m3x3",
/* WINED3DSIH_M3x4 */ "m3x4",
/* WINED3DSIH_M4x3 */ "m4x3",
/* WINED3DSIH_M4x4 */ "m4x4",
/* WINED3DSIH_MAD */ "mad",
/* WINED3DSIH_MAX */ "max",
/* WINED3DSIH_MIN */ "min",
/* WINED3DSIH_MOV */ "mov",
/* WINED3DSIH_MOVA */ "mova",
/* WINED3DSIH_MOVC */ "movc",
/* WINED3DSIH_MUL */ "mul",
/* WINED3DSIH_NOP */ "nop",
/* WINED3DSIH_NRM */ "nrm",
/* WINED3DSIH_PHASE */ "phase",
/* WINED3DSIH_POW */ "pow",
/* WINED3DSIH_RCP */ "rcp",
/* WINED3DSIH_REP */ "rep",
/* WINED3DSIH_RET */ "ret",
/* WINED3DSIH_ROUND_NI */ "round_ni",
/* WINED3DSIH_RSQ */ "rsq",
/* WINED3DSIH_SAMPLE */ "sample",
/* WINED3DSIH_SAMPLE_GRAD */ "sample_d",
/* WINED3DSIH_SAMPLE_LOD */ "sample_l",
/* WINED3DSIH_SETP */ "setp",
/* WINED3DSIH_SGE */ "sge",
/* WINED3DSIH_SGN */ "sgn",
/* WINED3DSIH_SINCOS */ "sincos",
/* WINED3DSIH_SLT */ "slt",
/* WINED3DSIH_SQRT */ "sqrt",
/* WINED3DSIH_SUB */ "sub",
/* WINED3DSIH_TEX */ "texld",
/* WINED3DSIH_TEXBEM */ "texbem",
/* WINED3DSIH_TEXBEML */ "texbeml",
/* WINED3DSIH_TEXCOORD */ "texcrd",
/* WINED3DSIH_TEXDEPTH */ "texdepth",
/* WINED3DSIH_TEXDP3 */ "texdp3",
/* WINED3DSIH_TEXDP3TEX */ "texdp3tex",
/* WINED3DSIH_TEXKILL */ "texkill",
/* WINED3DSIH_TEXLDD */ "texldd",
/* WINED3DSIH_TEXLDL */ "texldl",
/* WINED3DSIH_TEXM3x2DEPTH */ "texm3x2depth",
/* WINED3DSIH_TEXM3x2PAD */ "texm3x2pad",
/* WINED3DSIH_TEXM3x2TEX */ "texm3x2tex",
/* WINED3DSIH_TEXM3x3 */ "texm3x3",
/* WINED3DSIH_TEXM3x3DIFF */ "texm3x3diff",
/* WINED3DSIH_TEXM3x3PAD */ "texm3x3pad",
/* WINED3DSIH_TEXM3x3SPEC */ "texm3x3spec",
/* WINED3DSIH_TEXM3x3TEX */ "texm3x3tex",
/* WINED3DSIH_TEXM3x3VSPEC */ "texm3x3vspec",
/* WINED3DSIH_TEXREG2AR */ "texreg2ar",
/* WINED3DSIH_TEXREG2GB */ "texreg2gb",
/* WINED3DSIH_TEXREG2RGB */ "texreg2rgb",
/* WINED3DSIH_UDIV */ "udiv",
/* WINED3DSIH_USHR */ "ushr",
/* WINED3DSIH_UTOF */ "utof",
/* WINED3DSIH_XOR */ "xor",
/* WINED3DSIH_ABS */ "abs",
/* WINED3DSIH_ADD */ "add",
/* WINED3DSIH_AND */ "and",
/* WINED3DSIH_BEM */ "bem",
/* WINED3DSIH_BREAK */ "break",
/* WINED3DSIH_BREAKC */ "breakc",
/* WINED3DSIH_BREAKP */ "breakp",
/* WINED3DSIH_CALL */ "call",
/* WINED3DSIH_CALLNZ */ "callnz",
/* WINED3DSIH_CMP */ "cmp",
/* WINED3DSIH_CND */ "cnd",
/* WINED3DSIH_CRS */ "crs",
/* WINED3DSIH_CUT */ "cut",
/* WINED3DSIH_DCL */ "dcl",
/* WINED3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount",
/* WINED3DSIH_DEF */ "def",
/* WINED3DSIH_DEFB */ "defb",
/* WINED3DSIH_DEFI */ "defi",
/* WINED3DSIH_DIV */ "div",
/* WINED3DSIH_DP2ADD */ "dp2add",
/* WINED3DSIH_DP3 */ "dp3",
/* WINED3DSIH_DP4 */ "dp4",
/* WINED3DSIH_DST */ "dst",
/* WINED3DSIH_DSX */ "dsx",
/* WINED3DSIH_DSY */ "dsy",
/* WINED3DSIH_ELSE */ "else",
/* WINED3DSIH_EMIT */ "emit",
/* WINED3DSIH_ENDIF */ "endif",
/* WINED3DSIH_ENDLOOP */ "endloop",
/* WINED3DSIH_ENDREP */ "endrep",
/* WINED3DSIH_EQ */ "eq",
/* WINED3DSIH_EXP */ "exp",
/* WINED3DSIH_EXPP */ "expp",
/* WINED3DSIH_FRC */ "frc",
/* WINED3DSIH_FTOI */ "ftoi",
/* WINED3DSIH_GE */ "ge",
/* WINED3DSIH_IADD */ "iadd",
/* WINED3DSIH_IEQ */ "ieq",
/* WINED3DSIH_IF */ "if",
/* WINED3DSIH_IFC */ "ifc",
/* WINED3DSIH_IGE */ "ige",
/* WINED3DSIH_IMUL */ "imul",
/* WINED3DSIH_ITOF */ "itof",
/* WINED3DSIH_LABEL */ "label",
/* WINED3DSIH_LD */ "ld",
/* WINED3DSIH_LIT */ "lit",
/* WINED3DSIH_LOG */ "log",
/* WINED3DSIH_LOGP */ "logp",
/* WINED3DSIH_LOOP */ "loop",
/* WINED3DSIH_LRP */ "lrp",
/* WINED3DSIH_LT */ "lt",
/* WINED3DSIH_M3x2 */ "m3x2",
/* WINED3DSIH_M3x3 */ "m3x3",
/* WINED3DSIH_M3x4 */ "m3x4",
/* WINED3DSIH_M4x3 */ "m4x3",
/* WINED3DSIH_M4x4 */ "m4x4",
/* WINED3DSIH_MAD */ "mad",
/* WINED3DSIH_MAX */ "max",
/* WINED3DSIH_MIN */ "min",
/* WINED3DSIH_MOV */ "mov",
/* WINED3DSIH_MOVA */ "mova",
/* WINED3DSIH_MOVC */ "movc",
/* WINED3DSIH_MUL */ "mul",
/* WINED3DSIH_NOP */ "nop",
/* WINED3DSIH_NRM */ "nrm",
/* WINED3DSIH_PHASE */ "phase",
/* WINED3DSIH_POW */ "pow",
/* WINED3DSIH_RCP */ "rcp",
/* WINED3DSIH_REP */ "rep",
/* WINED3DSIH_RET */ "ret",
/* WINED3DSIH_ROUND_NI */ "round_ni",
/* WINED3DSIH_RSQ */ "rsq",
/* WINED3DSIH_SAMPLE */ "sample",
/* WINED3DSIH_SAMPLE_GRAD */ "sample_d",
/* WINED3DSIH_SAMPLE_LOD */ "sample_l",
/* WINED3DSIH_SETP */ "setp",
/* WINED3DSIH_SGE */ "sge",
/* WINED3DSIH_SGN */ "sgn",
/* WINED3DSIH_SINCOS */ "sincos",
/* WINED3DSIH_SLT */ "slt",
/* WINED3DSIH_SQRT */ "sqrt",
/* WINED3DSIH_SUB */ "sub",
/* WINED3DSIH_TEX */ "texld",
/* WINED3DSIH_TEXBEM */ "texbem",
/* WINED3DSIH_TEXBEML */ "texbeml",
/* WINED3DSIH_TEXCOORD */ "texcrd",
/* WINED3DSIH_TEXDEPTH */ "texdepth",
/* WINED3DSIH_TEXDP3 */ "texdp3",
/* WINED3DSIH_TEXDP3TEX */ "texdp3tex",
/* WINED3DSIH_TEXKILL */ "texkill",
/* WINED3DSIH_TEXLDD */ "texldd",
/* WINED3DSIH_TEXLDL */ "texldl",
/* WINED3DSIH_TEXM3x2DEPTH */ "texm3x2depth",
/* WINED3DSIH_TEXM3x2PAD */ "texm3x2pad",
/* WINED3DSIH_TEXM3x2TEX */ "texm3x2tex",
/* WINED3DSIH_TEXM3x3 */ "texm3x3",
/* WINED3DSIH_TEXM3x3DIFF */ "texm3x3diff",
/* WINED3DSIH_TEXM3x3PAD */ "texm3x3pad",
/* WINED3DSIH_TEXM3x3SPEC */ "texm3x3spec",
/* WINED3DSIH_TEXM3x3TEX */ "texm3x3tex",
/* WINED3DSIH_TEXM3x3VSPEC */ "texm3x3vspec",
/* WINED3DSIH_TEXREG2AR */ "texreg2ar",
/* WINED3DSIH_TEXREG2GB */ "texreg2gb",
/* WINED3DSIH_TEXREG2RGB */ "texreg2rgb",
/* WINED3DSIH_UDIV */ "udiv",
/* WINED3DSIH_USHR */ "ushr",
/* WINED3DSIH_UTOF */ "utof",
/* WINED3DSIH_XOR */ "xor",
};
static const char * const semantic_names[] =
......@@ -1321,6 +1322,10 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
TRACE(" ");
shader_dump_dst_param(&ins.declaration.semantic.reg, &shader_version);
}
else if (ins.handler_idx == WINED3DSIH_DCL_VERTICES_OUT)
{
TRACE("%s %u", shader_opcode_names[ins.handler_idx], ins.declaration.count);
}
else if (ins.handler_idx == WINED3DSIH_DEF)
{
TRACE("def c%u = %f, %f, %f, %f", shader_get_float_offset(ins.dst[0].reg.type, ins.dst[0].reg.idx),
......
......@@ -52,52 +52,53 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader);
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_DIV = 0x0e,
WINED3D_SM4_OP_DP3 = 0x10,
WINED3D_SM4_OP_DP4 = 0x11,
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_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_IMUL = 0x26,
WINED3D_SM4_OP_ITOF = 0x2b,
WINED3D_SM4_OP_LD = 0x2d,
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_MOV = 0x36,
WINED3D_SM4_OP_MOVC = 0x37,
WINED3D_SM4_OP_MUL = 0x38,
WINED3D_SM4_OP_RET = 0x3e,
WINED3D_SM4_OP_ROUND_NI = 0x41,
WINED3D_SM4_OP_RSQ = 0x44,
WINED3D_SM4_OP_SAMPLE = 0x45,
WINED3D_SM4_OP_SAMPLE_LOD = 0x48,
WINED3D_SM4_OP_SAMPLE_GRAD = 0x49,
WINED3D_SM4_OP_SQRT = 0x4b,
WINED3D_SM4_OP_SINCOS = 0x4d,
WINED3D_SM4_OP_UDIV = 0x4e,
WINED3D_SM4_OP_USHR = 0x55,
WINED3D_SM4_OP_UTOF = 0x56,
WINED3D_SM4_OP_XOR = 0x57,
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_DIV = 0x0e,
WINED3D_SM4_OP_DP3 = 0x10,
WINED3D_SM4_OP_DP4 = 0x11,
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_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_IMUL = 0x26,
WINED3D_SM4_OP_ITOF = 0x2b,
WINED3D_SM4_OP_LD = 0x2d,
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_MOV = 0x36,
WINED3D_SM4_OP_MOVC = 0x37,
WINED3D_SM4_OP_MUL = 0x38,
WINED3D_SM4_OP_RET = 0x3e,
WINED3D_SM4_OP_ROUND_NI = 0x41,
WINED3D_SM4_OP_RSQ = 0x44,
WINED3D_SM4_OP_SAMPLE = 0x45,
WINED3D_SM4_OP_SAMPLE_LOD = 0x48,
WINED3D_SM4_OP_SAMPLE_GRAD = 0x49,
WINED3D_SM4_OP_SQRT = 0x4b,
WINED3D_SM4_OP_SINCOS = 0x4d,
WINED3D_SM4_OP_UDIV = 0x4e,
WINED3D_SM4_OP_USHR = 0x55,
WINED3D_SM4_OP_UTOF = 0x56,
WINED3D_SM4_OP_XOR = 0x57,
WINED3D_SM4_OP_DCL_VERTICES_OUT = 0x5e,
};
enum wined3d_sm4_register_type
......@@ -153,52 +154,53 @@ struct sysval_map
*/
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_DIV, WINED3DSIH_DIV, "F", "FF"},
{WINED3D_SM4_OP_DP3, WINED3DSIH_DP3, "F", "FF"},
{WINED3D_SM4_OP_DP4, WINED3DSIH_DP4, "F", "FF"},
{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_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_IMUL, WINED3DSIH_IMUL, "II", "II"},
{WINED3D_SM4_OP_ITOF, WINED3DSIH_ITOF, "F", "I"},
{WINED3D_SM4_OP_LD, WINED3DSIH_LD, "U", "FR"},
{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_MOV, WINED3DSIH_MOV, "F", "F"},
{WINED3D_SM4_OP_MOVC, WINED3DSIH_MOVC, "F", "UFF"},
{WINED3D_SM4_OP_MUL, WINED3DSIH_MUL, "F", "FF"},
{WINED3D_SM4_OP_RET, WINED3DSIH_RET, "", ""},
{WINED3D_SM4_OP_ROUND_NI, WINED3DSIH_ROUND_NI, "F", "F"},
{WINED3D_SM4_OP_RSQ, WINED3DSIH_RSQ, "F", "F"},
{WINED3D_SM4_OP_SAMPLE, WINED3DSIH_SAMPLE, "U", "FRS"},
{WINED3D_SM4_OP_SAMPLE_LOD, WINED3DSIH_SAMPLE_LOD, "U", "FRSF"},
{WINED3D_SM4_OP_SAMPLE_GRAD,WINED3DSIH_SAMPLE_GRAD, "U", "FRSFF"},
{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_USHR, WINED3DSIH_USHR, "U", "UU"},
{WINED3D_SM4_OP_UTOF, WINED3DSIH_UTOF, "F", "U"},
{WINED3D_SM4_OP_XOR, WINED3DSIH_XOR, "U", "UU"},
{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_DIV, WINED3DSIH_DIV, "F", "FF"},
{WINED3D_SM4_OP_DP3, WINED3DSIH_DP3, "F", "FF"},
{WINED3D_SM4_OP_DP4, WINED3DSIH_DP4, "F", "FF"},
{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_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_IMUL, WINED3DSIH_IMUL, "II", "II"},
{WINED3D_SM4_OP_ITOF, WINED3DSIH_ITOF, "F", "I"},
{WINED3D_SM4_OP_LD, WINED3DSIH_LD, "U", "FR"},
{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_MOV, WINED3DSIH_MOV, "F", "F"},
{WINED3D_SM4_OP_MOVC, WINED3DSIH_MOVC, "F", "UFF"},
{WINED3D_SM4_OP_MUL, WINED3DSIH_MUL, "F", "FF"},
{WINED3D_SM4_OP_RET, WINED3DSIH_RET, "", ""},
{WINED3D_SM4_OP_ROUND_NI, WINED3DSIH_ROUND_NI, "F", "F"},
{WINED3D_SM4_OP_RSQ, WINED3DSIH_RSQ, "F", "F"},
{WINED3D_SM4_OP_SAMPLE, WINED3DSIH_SAMPLE, "U", "FRS"},
{WINED3D_SM4_OP_SAMPLE_LOD, WINED3DSIH_SAMPLE_LOD, "U", "FRSF"},
{WINED3D_SM4_OP_SAMPLE_GRAD, WINED3DSIH_SAMPLE_GRAD, "U", "FRSFF"},
{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_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_VERTICES_OUT, WINED3DSIH_DCL_VERTICES_OUT, "", ""},
};
static const enum wined3d_shader_register_type register_type_table[] =
......@@ -534,16 +536,23 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
FIXME("Skipping modifier 0x%08x.\n", modifier);
}
for (i = 0; i < ins->dst_count; ++i)
if (opcode == WINED3D_SM4_OP_DCL_VERTICES_OUT)
{
shader_sm4_read_dst_param(priv, &p, map_data_type(opcode_info->dst_info[i]),
&priv->dst_param[i], &priv->dst_rel_addr[i]);
ins->declaration.count = *p++;
}
for (i = 0; i < ins->src_count; ++i)
else
{
shader_sm4_read_src_param(priv, &p, map_data_type(opcode_info->src_info[i]),
&priv->src_param[i], &priv->src_rel_addr[i]);
for (i = 0; i < ins->dst_count; ++i)
{
shader_sm4_read_dst_param(priv, &p, map_data_type(opcode_info->dst_info[i]),
&priv->dst_param[i], &priv->dst_rel_addr[i]);
}
for (i = 0; i < ins->src_count; ++i)
{
shader_sm4_read_src_param(priv, &p, map_data_type(opcode_info->src_info[i]),
&priv->src_param[i], &priv->src_rel_addr[i]);
}
}
}
......
......@@ -439,6 +439,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_CRS,
WINED3DSIH_CUT,
WINED3DSIH_DCL,
WINED3DSIH_DCL_VERTICES_OUT,
WINED3DSIH_DEF,
WINED3DSIH_DEFB,
WINED3DSIH_DEFI,
......@@ -666,6 +667,7 @@ struct wined3d_shader_instruction
union
{
struct wined3d_shader_semantic semantic;
UINT count;
} declaration;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment