wined3d: Add the general combiner limit to wined3d_gl_info.

This commit is contained in:
Henri Verbeet 2010-02-04 18:30:04 +01:00 committed by Alexandre Julliard
parent 8350aafd54
commit b59dd0e4e8
3 changed files with 4 additions and 1 deletions

View File

@ -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
{

View File

@ -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;

View File

@ -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;