Henri Verbeet : wined3d: Add the general combiner limit to wined3d_gl_info.

Alexandre Julliard julliard at winehq.org
Fri Feb 5 08:42:30 CST 2010


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Feb  4 18:30:04 2010 +0100

wined3d: Add the general combiner limit to wined3d_gl_info.

---

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

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 8ba33ba..1215414 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1923,7 +1923,9 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter)
         {
             GLint tmp;
             glGetIntegerv(GL_MAX_GENERAL_COMBINERS_NV, &tmp);
+            gl_info->limits.general_combiners = tmp;
             gl_info->limits.texture_stages = min(MAX_TEXTURES, tmp);
+            TRACE_(d3d_caps)("Max general combiners: %d.\n", tmp);
         }
         else
         {
diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c
index 56e2ee7..64bb883 100644
--- a/dlls/wined3d/nvidia_texture_shader.c
+++ b/dlls/wined3d/nvidia_texture_shader.c
@@ -670,7 +670,7 @@ static void nvrc_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct
             WINED3DTEXOPCAPS_PREMODULATE */
 #endif
 
-    pCaps->MaxTextureBlendStages = gl_info->limits.texture_stages;
+    pCaps->MaxTextureBlendStages = min(MAX_TEXTURES, gl_info->limits.general_combiners);
     pCaps->MaxSimultaneousTextures = gl_info->limits.textures;
 
     pCaps->PrimitiveMiscCaps |=  WINED3DPMISCCAPS_TSSARGTEMP;
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h
index 07ce7af..5a3fbb4 100644
--- a/dlls/wined3d/wined3d_gl.h
+++ b/dlls/wined3d/wined3d_gl.h
@@ -4619,6 +4619,7 @@ struct wined3d_gl_limits
     UINT fragment_samplers;
     UINT vertex_samplers;
     UINT combined_samplers;
+    UINT general_combiners;
     UINT sampler_stages;
     UINT clipplanes;
     UINT texture_size;




More information about the wine-cvs mailing list