wined3d: Recognize the SM4 dcl_maxOutputVertexCount opcode.
This commit is contained in:
parent
0a17173bc2
commit
d574d639a4
|
@ -5099,6 +5099,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
|
||||||
/* WINED3DSIH_CRS */ shader_hw_map2gl,
|
/* WINED3DSIH_CRS */ shader_hw_map2gl,
|
||||||
/* WINED3DSIH_CUT */ NULL,
|
/* WINED3DSIH_CUT */ NULL,
|
||||||
/* WINED3DSIH_DCL */ shader_hw_nop,
|
/* WINED3DSIH_DCL */ shader_hw_nop,
|
||||||
|
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_hw_nop,
|
||||||
/* WINED3DSIH_DEF */ shader_hw_nop,
|
/* WINED3DSIH_DEF */ shader_hw_nop,
|
||||||
/* WINED3DSIH_DEFB */ shader_hw_nop,
|
/* WINED3DSIH_DEFB */ shader_hw_nop,
|
||||||
/* WINED3DSIH_DEFI */ shader_hw_nop,
|
/* WINED3DSIH_DEFI */ shader_hw_nop,
|
||||||
|
|
|
@ -5031,6 +5031,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
|
||||||
/* WINED3DSIH_CRS */ shader_glsl_cross,
|
/* WINED3DSIH_CRS */ shader_glsl_cross,
|
||||||
/* WINED3DSIH_CUT */ NULL,
|
/* WINED3DSIH_CUT */ NULL,
|
||||||
/* WINED3DSIH_DCL */ shader_glsl_nop,
|
/* WINED3DSIH_DCL */ shader_glsl_nop,
|
||||||
|
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_glsl_nop,
|
||||||
/* WINED3DSIH_DEF */ shader_glsl_nop,
|
/* WINED3DSIH_DEF */ shader_glsl_nop,
|
||||||
/* WINED3DSIH_DEFB */ shader_glsl_nop,
|
/* WINED3DSIH_DEFB */ shader_glsl_nop,
|
||||||
/* WINED3DSIH_DEFI */ shader_glsl_nop,
|
/* WINED3DSIH_DEFI */ shader_glsl_nop,
|
||||||
|
|
|
@ -50,6 +50,7 @@ static const char * const shader_opcode_names[] =
|
||||||
/* WINED3DSIH_CRS */ "crs",
|
/* WINED3DSIH_CRS */ "crs",
|
||||||
/* WINED3DSIH_CUT */ "cut",
|
/* WINED3DSIH_CUT */ "cut",
|
||||||
/* WINED3DSIH_DCL */ "dcl",
|
/* WINED3DSIH_DCL */ "dcl",
|
||||||
|
/* WINED3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount",
|
||||||
/* WINED3DSIH_DEF */ "def",
|
/* WINED3DSIH_DEF */ "def",
|
||||||
/* WINED3DSIH_DEFB */ "defb",
|
/* WINED3DSIH_DEFB */ "defb",
|
||||||
/* WINED3DSIH_DEFI */ "defi",
|
/* WINED3DSIH_DEFI */ "defi",
|
||||||
|
@ -1321,6 +1322,10 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
|
||||||
TRACE(" ");
|
TRACE(" ");
|
||||||
shader_dump_dst_param(&ins.declaration.semantic.reg, &shader_version);
|
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)
|
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),
|
TRACE("def c%u = %f, %f, %f, %f", shader_get_float_offset(ins.dst[0].reg.type, ins.dst[0].reg.idx),
|
||||||
|
|
|
@ -98,6 +98,7 @@ enum wined3d_sm4_opcode
|
||||||
WINED3D_SM4_OP_USHR = 0x55,
|
WINED3D_SM4_OP_USHR = 0x55,
|
||||||
WINED3D_SM4_OP_UTOF = 0x56,
|
WINED3D_SM4_OP_UTOF = 0x56,
|
||||||
WINED3D_SM4_OP_XOR = 0x57,
|
WINED3D_SM4_OP_XOR = 0x57,
|
||||||
|
WINED3D_SM4_OP_DCL_VERTICES_OUT = 0x5e,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum wined3d_sm4_register_type
|
enum wined3d_sm4_register_type
|
||||||
|
@ -199,6 +200,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
|
||||||
{WINED3D_SM4_OP_USHR, WINED3DSIH_USHR, "U", "UU"},
|
{WINED3D_SM4_OP_USHR, WINED3DSIH_USHR, "U", "UU"},
|
||||||
{WINED3D_SM4_OP_UTOF, WINED3DSIH_UTOF, "F", "U"},
|
{WINED3D_SM4_OP_UTOF, WINED3DSIH_UTOF, "F", "U"},
|
||||||
{WINED3D_SM4_OP_XOR, WINED3DSIH_XOR, "U", "UU"},
|
{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[] =
|
static const enum wined3d_shader_register_type register_type_table[] =
|
||||||
|
@ -534,6 +536,12 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
|
||||||
FIXME("Skipping modifier 0x%08x.\n", modifier);
|
FIXME("Skipping modifier 0x%08x.\n", modifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opcode == WINED3D_SM4_OP_DCL_VERTICES_OUT)
|
||||||
|
{
|
||||||
|
ins->declaration.count = *p++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
for (i = 0; i < ins->dst_count; ++i)
|
for (i = 0; i < ins->dst_count; ++i)
|
||||||
{
|
{
|
||||||
shader_sm4_read_dst_param(priv, &p, map_data_type(opcode_info->dst_info[i]),
|
shader_sm4_read_dst_param(priv, &p, map_data_type(opcode_info->dst_info[i]),
|
||||||
|
@ -546,6 +554,7 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
|
||||||
&priv->src_param[i], &priv->src_rel_addr[i]);
|
&priv->src_param[i], &priv->src_rel_addr[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void shader_sm4_read_comment(const DWORD **ptr, const char **comment, UINT *comment_size)
|
static void shader_sm4_read_comment(const DWORD **ptr, const char **comment, UINT *comment_size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -439,6 +439,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
|
||||||
WINED3DSIH_CRS,
|
WINED3DSIH_CRS,
|
||||||
WINED3DSIH_CUT,
|
WINED3DSIH_CUT,
|
||||||
WINED3DSIH_DCL,
|
WINED3DSIH_DCL,
|
||||||
|
WINED3DSIH_DCL_VERTICES_OUT,
|
||||||
WINED3DSIH_DEF,
|
WINED3DSIH_DEF,
|
||||||
WINED3DSIH_DEFB,
|
WINED3DSIH_DEFB,
|
||||||
WINED3DSIH_DEFI,
|
WINED3DSIH_DEFI,
|
||||||
|
@ -666,6 +667,7 @@ struct wined3d_shader_instruction
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
struct wined3d_shader_semantic semantic;
|
struct wined3d_shader_semantic semantic;
|
||||||
|
UINT count;
|
||||||
} declaration;
|
} declaration;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue