Stefan Dösinger : wined3d: Remove the conditional from texdepth.

Alexandre Julliard julliard at winehq.org
Thu Nov 8 07:07:35 CST 2007


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Sun Oct 28 00:02:14 2007 +0200

wined3d: Remove the conditional from texdepth.

---

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

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 4083d56..98cbcf8 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -2230,7 +2230,7 @@ void pshader_glsl_texdepth(SHADER_OPCODE_ARG* arg) {
      * too is irrelevant, since if x = 0, any y value < 1.0 (and > 1.0 is not allowed) results in a result
      * >= 1.0 or < 0.0
      */
-    shader_addline(arg->buffer, "gl_FragDepth = (%s.y == 0.0) ? 1.0 : clamp((%s.x / min(%s.y, 1.0)), 0.0, 1.0);\n", dst_param.reg_name, dst_param.reg_name, dst_param.reg_name);
+    shader_addline(arg->buffer, "gl_FragDepth = clamp((%s.x / min(%s.y, 1.0)), 0.0, 1.0);\n", dst_param.reg_name, dst_param.reg_name, dst_param.reg_name);
 }
 
 /** Process the WINED3DSIO_TEXM3X2DEPTH instruction in GLSL:




More information about the wine-cvs mailing list