wined3d: gl_FragDepth is a float, so fixup the write mask.

This commit is contained in:
H. Verbeet 2007-01-18 23:41:51 +01:00 committed by Alexandre Julliard
parent 4352934b84
commit efed4c33c2
1 changed files with 4 additions and 2 deletions

View File

@ -711,9 +711,11 @@ static void shader_glsl_get_register_name(
static DWORD shader_glsl_get_write_mask(const DWORD param, char *write_mask) {
char *ptr = write_mask;
DWORD mask = param & WINED3DSP_WRITEMASK_ALL;
DWORD reg_type = shader_get_regtype(param);
/* gl_FogFragCoord and glPointSize are floats, fixup the write mask. */
if ((shader_get_regtype(param) == WINED3DSPR_RASTOUT) && ((param & WINED3DSP_REGNUM_MASK) != 0)) {
/* gl_FogFragCoord, gl_PointSize and gl_FragDepth are floats, fixup the write mask. */
if (((reg_type == WINED3DSPR_RASTOUT) && ((param & WINED3DSP_REGNUM_MASK) != 0))
|| reg_type == WINED3DSPR_DEPTHOUT) {
mask = WINED3DSP_WRITEMASK_0;
} else {
*ptr++ = '.';