wined3d: Handle the destination modifier shift in the frontend rather than the backend.
This commit is contained in:
parent
7448a09258
commit
fc60083ed2
|
@ -1000,10 +1000,10 @@ static void shader_hw_map2gl(const struct wined3d_shader_instruction *ins)
|
||||||
partialprecision = mask & WINED3DSPDM_PARTIALPRECISION;
|
partialprecision = mask & WINED3DSPDM_PARTIALPRECISION;
|
||||||
mask &= ~(WINED3DSPDM_MSAMPCENTROID | WINED3DSPDM_PARTIALPRECISION | WINED3DSPDM_SATURATE);
|
mask &= ~(WINED3DSPDM_MSAMPCENTROID | WINED3DSPDM_PARTIALPRECISION | WINED3DSPDM_SATURATE);
|
||||||
if (mask)
|
if (mask)
|
||||||
FIXME("Unrecognized modifier(%#x)\n", mask >> WINED3DSP_DSTMOD_SHIFT);
|
FIXME("Unrecognized modifier(%#x)\n", mask);
|
||||||
|
|
||||||
if (centroid)
|
if (centroid)
|
||||||
FIXME("Unhandled modifier(%#x)\n", mask >> WINED3DSP_DSTMOD_SHIFT);
|
FIXME("Unhandled modifier(%#x)\n", mask);
|
||||||
}
|
}
|
||||||
shift = dst->shift;
|
shift = dst->shift;
|
||||||
modifier = (saturate && !shift) ? "_SAT" : "";
|
modifier = (saturate && !shift) ? "_SAT" : "";
|
||||||
|
|
|
@ -234,7 +234,7 @@ static void shader_parse_dst_param(DWORD param, const struct wined3d_shader_src_
|
||||||
| ((param & WINED3DSP_REGTYPE_MASK2) >> WINED3DSP_REGTYPE_SHIFT2);
|
| ((param & WINED3DSP_REGTYPE_MASK2) >> WINED3DSP_REGTYPE_SHIFT2);
|
||||||
dst->register_idx = param & WINED3DSP_REGNUM_MASK;
|
dst->register_idx = param & WINED3DSP_REGNUM_MASK;
|
||||||
dst->write_mask = param & WINED3DSP_WRITEMASK_ALL;
|
dst->write_mask = param & WINED3DSP_WRITEMASK_ALL;
|
||||||
dst->modifiers = param & WINED3DSP_DSTMOD_MASK;
|
dst->modifiers = (param & WINED3DSP_DSTMOD_MASK) >> WINED3DSP_DSTMOD_SHIFT;
|
||||||
dst->shift = (param & WINED3DSP_DSTSHIFT_MASK) >> WINED3DSP_DSTSHIFT_SHIFT;
|
dst->shift = (param & WINED3DSP_DSTSHIFT_MASK) >> WINED3DSP_DSTSHIFT_SHIFT;
|
||||||
dst->rel_addr = rel_addr;
|
dst->rel_addr = rel_addr;
|
||||||
}
|
}
|
||||||
|
@ -966,7 +966,7 @@ static void shader_dump_ins_modifiers(const DWORD output)
|
||||||
|
|
||||||
mmask &= ~(WINED3DSPDM_SATURATE | WINED3DSPDM_PARTIALPRECISION | WINED3DSPDM_MSAMPCENTROID);
|
mmask &= ~(WINED3DSPDM_SATURATE | WINED3DSPDM_PARTIALPRECISION | WINED3DSPDM_MSAMPCENTROID);
|
||||||
if (mmask)
|
if (mmask)
|
||||||
FIXME("_unrecognized_modifier(%#x)", mmask >> WINED3DSP_DSTMOD_SHIFT);
|
FIXME("_unrecognized_modifier(%#x)", mmask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void shader_trace_init(const DWORD *pFunction, const SHADER_OPCODE *opcode_table)
|
void shader_trace_init(const DWORD *pFunction, const SHADER_OPCODE *opcode_table)
|
||||||
|
|
|
@ -136,10 +136,10 @@ typedef enum _WINED3DSHADER_PARAM_SRCMOD_TYPE {
|
||||||
#define WINED3DSP_DSTMOD_MASK (0xF << WINED3DSP_DSTMOD_SHIFT)
|
#define WINED3DSP_DSTMOD_MASK (0xF << WINED3DSP_DSTMOD_SHIFT)
|
||||||
|
|
||||||
typedef enum _WINED3DSHADER_PARAM_DSTMOD_TYPE {
|
typedef enum _WINED3DSHADER_PARAM_DSTMOD_TYPE {
|
||||||
WINED3DSPDM_NONE = 0 << WINED3DSP_DSTMOD_SHIFT,
|
WINED3DSPDM_NONE = 0,
|
||||||
WINED3DSPDM_SATURATE = 1 << WINED3DSP_DSTMOD_SHIFT,
|
WINED3DSPDM_SATURATE = 1,
|
||||||
WINED3DSPDM_PARTIALPRECISION = 2 << WINED3DSP_DSTMOD_SHIFT,
|
WINED3DSPDM_PARTIALPRECISION = 2,
|
||||||
WINED3DSPDM_MSAMPCENTROID = 4 << WINED3DSP_DSTMOD_SHIFT,
|
WINED3DSPDM_MSAMPCENTROID = 4,
|
||||||
|
|
||||||
WINED3DSPDM_FORCE_DWORD = 0x7FFFFFFF
|
WINED3DSPDM_FORCE_DWORD = 0x7FFFFFFF
|
||||||
} WINED3DSHADER_PARAM_DSTMOD_TYPE;
|
} WINED3DSHADER_PARAM_DSTMOD_TYPE;
|
||||||
|
|
Loading…
Reference in New Issue