wined3d: GL_MAX_TEXTURE_COORDS_ARB is not available without ARB_fragment_program.

This commit is contained in:
Henri Verbeet 2012-03-11 22:03:11 +01:00 committed by Alexandre Julliard
parent 112e2e219f
commit 6396ad9e45
1 changed files with 4 additions and 3 deletions

View File

@ -2542,20 +2542,21 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_max);
gl_info->limits.textures = min(MAX_TEXTURES, gl_max);
TRACE_(d3d_caps)("Max textures: %d.\n", gl_info->limits.textures);
glGetIntegerv(GL_MAX_TEXTURE_COORDS_ARB, &gl_max);
gl_info->limits.texture_coords = min(MAX_TEXTURES, gl_max);
TRACE_(d3d_caps)("Max texture coords: %d.\n", gl_info->limits.texture_coords);
if (gl_info->supported[ARB_FRAGMENT_PROGRAM])
{
GLint tmp;
glGetIntegerv(GL_MAX_TEXTURE_COORDS_ARB, &gl_max);
gl_info->limits.texture_coords = min(MAX_TEXTURES, gl_max);
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &tmp);
gl_info->limits.fragment_samplers = min(MAX_FRAGMENT_SAMPLERS, tmp);
}
else
{
gl_info->limits.texture_coords = max(gl_info->limits.texture_coords, gl_max);
gl_info->limits.fragment_samplers = max(gl_info->limits.fragment_samplers, gl_max);
}
TRACE_(d3d_caps)("Max texture coords: %d.\n", gl_info->limits.texture_coords);
TRACE_(d3d_caps)("Max fragment samplers: %d.\n", gl_info->limits.fragment_samplers);
if (gl_info->supported[ARB_VERTEX_SHADER])