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

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jan 19 06:29:32 CST 2007


Module: wine
Branch: master
Commit: efed4c33c2c85154168c473fabf879754838947a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=efed4c33c2c85154168c473fabf879754838947a

Author: H. Verbeet <hverbeet at gmail.com>
Date:   Thu Jan 18 23:41:51 2007 +0100

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

---

 dlls/wined3d/glsl_shader.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 9a11b5b..5fd6c5a 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -711,9 +711,11 @@ static void shader_glsl_get_register_nam
 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++ = '.';




More information about the wine-cvs mailing list