From b59dd0e4e8b0ed172b093c1cf3a7cd945b88f2f0 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 4 Feb 2010 18:30:04 +0100 Subject: [PATCH] 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 deletion(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 8ba33ba523..1215414ae2 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 56e2ee72ce..64bb883d6c 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 07ce7af525..5a3fbb4363 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;