wined3d: Shift the writemask in the frontend.
This commit is contained in:
parent
2576bf3ddd
commit
699eae0cf7
|
@ -76,6 +76,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader);
|
||||||
#define WINED3DSP_DSTSHIFT_SHIFT 24
|
#define WINED3DSP_DSTSHIFT_SHIFT 24
|
||||||
#define WINED3DSP_DSTSHIFT_MASK (0xf << WINED3DSP_DSTSHIFT_SHIFT)
|
#define WINED3DSP_DSTSHIFT_MASK (0xf << WINED3DSP_DSTSHIFT_SHIFT)
|
||||||
|
|
||||||
|
/* Write mask */
|
||||||
|
#define WINED3D_SM1_WRITEMASK_SHIFT 16
|
||||||
|
#define WINED3D_SM1_WRITEMASK_MASK (0xf << WINED3D_SM1_WRITEMASK_SHIFT)
|
||||||
|
|
||||||
/* Swizzle mask */
|
/* Swizzle mask */
|
||||||
#define WINED3DSP_SWIZZLE_SHIFT 16
|
#define WINED3DSP_SWIZZLE_SHIFT 16
|
||||||
#define WINED3DSP_SWIZZLE_MASK (0xff << WINED3DSP_SWIZZLE_SHIFT)
|
#define WINED3DSP_SWIZZLE_MASK (0xff << WINED3DSP_SWIZZLE_SHIFT)
|
||||||
|
@ -351,7 +355,7 @@ static void shader_parse_dst_param(DWORD param, const struct wined3d_shader_src_
|
||||||
dst->register_type = ((param & WINED3DSP_REGTYPE_MASK) >> WINED3DSP_REGTYPE_SHIFT)
|
dst->register_type = ((param & WINED3DSP_REGTYPE_MASK) >> WINED3DSP_REGTYPE_SHIFT)
|
||||||
| ((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 & WINED3D_SM1_WRITEMASK_MASK) >> WINED3D_SM1_WRITEMASK_SHIFT;
|
||||||
dst->modifiers = (param & WINED3DSP_DSTMOD_MASK) >> WINED3DSP_DSTMOD_SHIFT;
|
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;
|
||||||
|
|
|
@ -351,11 +351,11 @@ typedef enum _WINED3DSHADER_PARAM_SRCMOD_TYPE
|
||||||
WINED3DSPSM_NOT = 13,
|
WINED3DSPSM_NOT = 13,
|
||||||
} WINED3DSHADER_PARAM_SRCMOD_TYPE;
|
} WINED3DSHADER_PARAM_SRCMOD_TYPE;
|
||||||
|
|
||||||
#define WINED3DSP_WRITEMASK_0 0x00010000 /* .x r */
|
#define WINED3DSP_WRITEMASK_0 0x1 /* .x r */
|
||||||
#define WINED3DSP_WRITEMASK_1 0x00020000 /* .y g */
|
#define WINED3DSP_WRITEMASK_1 0x2 /* .y g */
|
||||||
#define WINED3DSP_WRITEMASK_2 0x00040000 /* .z b */
|
#define WINED3DSP_WRITEMASK_2 0x4 /* .z b */
|
||||||
#define WINED3DSP_WRITEMASK_3 0x00080000 /* .w a */
|
#define WINED3DSP_WRITEMASK_3 0x8 /* .w a */
|
||||||
#define WINED3DSP_WRITEMASK_ALL 0x000F0000 /* all */
|
#define WINED3DSP_WRITEMASK_ALL 0xf /* all */
|
||||||
|
|
||||||
typedef enum _WINED3DSHADER_PARAM_DSTMOD_TYPE
|
typedef enum _WINED3DSHADER_PARAM_DSTMOD_TYPE
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue