wined3d: Store the register type in struct wined3d_shader_dst_param.

This commit is contained in:
Henri Verbeet 2009-04-07 11:09:11 +02:00 committed by Alexandre Julliard
parent f7f61a58f4
commit 0f92bbc6bc
4 changed files with 6 additions and 3 deletions

View File

@ -1019,7 +1019,7 @@ static void shader_hw_mov(const struct wined3d_shader_instruction *ins)
if ((WINED3DSHADER_VERSION_MAJOR(ins->reg_maps->shader_version) == 1
&& !shader_is_pshader_version(ins->reg_maps->shader_version)
&& shader_get_regtype(ins->dst[0].token) == WINED3DSPR_ADDR)
&& ins->dst[0].register_type == WINED3DSPR_ADDR)
|| ins->handler_idx == WINED3DSIH_MOVA)
{
SHADER_BUFFER *buffer = ins->buffer;

View File

@ -850,6 +850,8 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
{
dst_param.addr_token = 0;
pToken += shader_get_param(pToken, shader_version, &dst_param.token, &dst_param.addr_token);
dst_param.register_type = ((dst_param.token & WINED3DSP_REGTYPE_MASK) >> WINED3DSP_REGTYPE_SHIFT)
| ((dst_param.token & WINED3DSP_REGTYPE_MASK2) >> WINED3DSP_REGTYPE_SHIFT2);
dst_param.register_idx = dst_param.token & WINED3DSP_REGNUM_MASK;
dst_param.write_mask = dst_param.token & WINED3DSP_WRITEMASK_ALL;
dst_param.modifiers = dst_param.token & WINED3DSP_DSTMOD_MASK;

View File

@ -1601,7 +1601,7 @@ static void shader_glsl_mov(const struct wined3d_shader_instruction *ins)
* shader versions WINED3DSIO_MOVA is used for this. */
if ((WINED3DSHADER_VERSION_MAJOR(ins->reg_maps->shader_version) == 1
&& !shader_is_pshader_version(ins->reg_maps->shader_version)
&& shader_get_regtype(ins->dst[0].token) == WINED3DSPR_ADDR))
&& ins->dst[0].register_type == WINED3DSPR_ADDR))
{
/* This is a simple floor() */
unsigned int mask_size = shader_glsl_get_write_mask_size(write_mask);
@ -1920,7 +1920,7 @@ static void shader_glsl_cmp(const struct wined3d_shader_instruction *ins)
DWORD src1regtype = shader_get_regtype(ins->src[1]);
DWORD src2regtype = shader_get_regtype(ins->src[2]);
DWORD dstreg = ins->dst[0].register_idx;
DWORD dstregtype = shader_get_regtype(ins->dst[0].token);
DWORD dstregtype = ins->dst[0].register_type;
/* Cycle through all source0 channels */
for (i=0; i<4; i++) {

View File

@ -452,6 +452,7 @@ typedef struct SHADER_OPCODE
struct wined3d_shader_dst_param
{
WINED3DSHADER_PARAM_REGISTER_TYPE register_type;
UINT register_idx;
DWORD write_mask;
DWORD modifiers;