wined3d: Get rid of the "token" field from struct wined3d_shader_dst_param.
This commit is contained in:
parent
18cdcc0b7e
commit
d3fc7dca99
|
@ -1634,7 +1634,6 @@ static void shader_hw_mnxn(const struct wined3d_shader_instruction *ins)
|
||||||
tmp_dst = ins->dst[0];
|
tmp_dst = ins->dst[0];
|
||||||
for (i = 0; i < nComponents; i++) {
|
for (i = 0; i < nComponents; i++) {
|
||||||
tmp_dst.write_mask = WINED3DSP_WRITEMASK_0 << i;
|
tmp_dst.write_mask = WINED3DSP_WRITEMASK_0 << i;
|
||||||
tmp_dst.token = (tmp_dst.token & ~WINED3DSP_WRITEMASK_ALL) | tmp_dst.write_mask;
|
|
||||||
tmp_ins.src[1] = ins->src[1]+i;
|
tmp_ins.src[1] = ins->src[1]+i;
|
||||||
shader_hw_map2gl(&tmp_ins);
|
shader_hw_map2gl(&tmp_ins);
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,7 +221,6 @@ static void shader_parse_dst_param(DWORD param, DWORD addr_param, struct wined3d
|
||||||
dst->modifiers = param & WINED3DSP_DSTMOD_MASK;
|
dst->modifiers = param & WINED3DSP_DSTMOD_MASK;
|
||||||
dst->shift = (param & WINED3DSP_DSTSHIFT_MASK) >> WINED3DSP_DSTSHIFT_SHIFT;
|
dst->shift = (param & WINED3DSP_DSTSHIFT_MASK) >> WINED3DSP_DSTSHIFT_SHIFT;
|
||||||
dst->has_rel_addr = param & WINED3DSHADER_ADDRMODE_RELATIVE;
|
dst->has_rel_addr = param & WINED3DSHADER_ADDRMODE_RELATIVE;
|
||||||
dst->token = param;
|
|
||||||
dst->addr_token = addr_param;
|
dst->addr_token = addr_param;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1505,7 +1505,6 @@ static void shader_glsl_color_correction(const struct wined3d_shader_instruction
|
||||||
|
|
||||||
dst = ins->dst[0];
|
dst = ins->dst[0];
|
||||||
dst.write_mask = mask;
|
dst.write_mask = mask;
|
||||||
dst.token = (dst.token & ~WINED3DSP_WRITEMASK_ALL) | dst.write_mask;
|
|
||||||
shader_glsl_add_dst_param(ins, &dst, &dst_param);
|
shader_glsl_add_dst_param(ins, &dst, &dst_param);
|
||||||
|
|
||||||
arguments[0] = '\0';
|
arguments[0] = '\0';
|
||||||
|
@ -1976,9 +1975,7 @@ static void shader_glsl_cmp(const struct wined3d_shader_instruction *ins)
|
||||||
cmp_channel = WINED3DSP_WRITEMASK_0 << j;
|
cmp_channel = WINED3DSP_WRITEMASK_0 << j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dst.write_mask = dst_mask & write_mask;
|
dst.write_mask = dst_mask & write_mask;
|
||||||
dst.token = (dst.token & ~WINED3DSP_WRITEMASK_ALL) | dst.write_mask;
|
|
||||||
|
|
||||||
/* Splitting the cmp instruction up in multiple lines imposes a problem:
|
/* Splitting the cmp instruction up in multiple lines imposes a problem:
|
||||||
* The first lines may overwrite source parameters of the following lines.
|
* The first lines may overwrite source parameters of the following lines.
|
||||||
|
@ -2059,7 +2056,6 @@ static void shader_glsl_cnd(const struct wined3d_shader_instruction *ins)
|
||||||
}
|
}
|
||||||
|
|
||||||
dst.write_mask = dst_mask & write_mask;
|
dst.write_mask = dst_mask & write_mask;
|
||||||
dst.token = (dst.token & ~WINED3DSP_WRITEMASK_ALL) | dst.write_mask;
|
|
||||||
write_mask = shader_glsl_append_dst_ext(ins->buffer, ins, &dst);
|
write_mask = shader_glsl_append_dst_ext(ins->buffer, ins, &dst);
|
||||||
if (!write_mask) continue;
|
if (!write_mask) continue;
|
||||||
|
|
||||||
|
@ -2140,7 +2136,6 @@ static void shader_glsl_mnxn(const struct wined3d_shader_instruction *ins)
|
||||||
for (i = 0; i < nComponents; ++i)
|
for (i = 0; i < nComponents; ++i)
|
||||||
{
|
{
|
||||||
tmp_dst.write_mask = WINED3DSP_WRITEMASK_0 << i;
|
tmp_dst.write_mask = WINED3DSP_WRITEMASK_0 << i;
|
||||||
tmp_dst.token = (tmp_dst.token & ~WINED3DSP_WRITEMASK_ALL) | tmp_dst.write_mask;
|
|
||||||
tmp_ins.src[1] = ins->src[1] + i;
|
tmp_ins.src[1] = ins->src[1] + i;
|
||||||
shader_glsl_dot(&tmp_ins);
|
shader_glsl_dot(&tmp_ins);
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,10 +174,6 @@ static void vshader_set_input(
|
||||||
unsigned int regnum,
|
unsigned int regnum,
|
||||||
BYTE usage, BYTE usage_idx) {
|
BYTE usage, BYTE usage_idx) {
|
||||||
|
|
||||||
/* Fake register; set reserved bit, regnum, type: input, wmask: all */
|
|
||||||
DWORD reg_token = (0x1 << 31) |
|
|
||||||
WINED3DSP_WRITEMASK_ALL | (WINED3DSPR_INPUT << WINED3DSP_REGTYPE_SHIFT) | regnum;
|
|
||||||
|
|
||||||
This->semantics_in[regnum].usage = usage;
|
This->semantics_in[regnum].usage = usage;
|
||||||
This->semantics_in[regnum].usage_idx = usage_idx;
|
This->semantics_in[regnum].usage_idx = usage_idx;
|
||||||
This->semantics_in[regnum].reg.register_type = WINED3DSPR_INPUT;
|
This->semantics_in[regnum].reg.register_type = WINED3DSPR_INPUT;
|
||||||
|
@ -186,7 +182,6 @@ static void vshader_set_input(
|
||||||
This->semantics_in[regnum].reg.modifiers = 0;
|
This->semantics_in[regnum].reg.modifiers = 0;
|
||||||
This->semantics_in[regnum].reg.shift = 0;
|
This->semantics_in[regnum].reg.shift = 0;
|
||||||
This->semantics_in[regnum].reg.has_rel_addr = FALSE;
|
This->semantics_in[regnum].reg.has_rel_addr = FALSE;
|
||||||
This->semantics_in[regnum].reg.token = reg_token;
|
|
||||||
This->semantics_in[regnum].reg.addr_token = 0;
|
This->semantics_in[regnum].reg.addr_token = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -452,7 +452,6 @@ struct wined3d_shader_dst_param
|
||||||
DWORD modifiers;
|
DWORD modifiers;
|
||||||
DWORD shift;
|
DWORD shift;
|
||||||
BOOL has_rel_addr;
|
BOOL has_rel_addr;
|
||||||
DWORD token;
|
|
||||||
DWORD addr_token;
|
DWORD addr_token;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue