H. Verbeet : wined3d: Boolean constants use up only a single uniform each.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Feb 28 08:19:03 CST 2007


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

Author: H. Verbeet <hverbeet at gmail.com>
Date:   Tue Feb 27 20:51:43 2007 +0100

wined3d: Boolean constants use up only a single uniform each.

---

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

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 58b00d7..095b0e9 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -285,7 +285,7 @@ void select_shader_max_constants(
     switch (vs_selected_mode) {
         case SHADER_GLSL:
             /* Subtract the other potential uniforms from the max available (bools, ints, and 1 row of projection matrix) */
-            gl_info->max_vshader_constantsF = gl_info->vs_glsl_constantsF - MAX_CONST_B - MAX_CONST_I - 1;
+            gl_info->max_vshader_constantsF = gl_info->vs_glsl_constantsF - (MAX_CONST_B / 4) - MAX_CONST_I - 1;
             break;
         case SHADER_ARB:
             /* We have to subtract any other PARAMs that we might use in our shader programs.
@@ -308,7 +308,7 @@ void select_shader_max_constants(
              * that a sm <= 1.3 shader does not need all the uniforms provided by a glsl-capable card,
              * and lets not take away a uniform needlessly from all other shaders.
              */
-            gl_info->max_pshader_constantsF = gl_info->ps_glsl_constantsF - MAX_CONST_B - MAX_CONST_I;
+            gl_info->max_pshader_constantsF = gl_info->ps_glsl_constantsF - (MAX_CONST_B / 4) - MAX_CONST_I;
             break;
         case SHADER_ARB:
             /* The arb shader only loads the bump mapping environment matrix into the shader if it finds




More information about the wine-cvs mailing list