On 7 February 2017 at 22:08, Matteo Bruni mbruni@codeweavers.com wrote:
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index c47052c..bfb018e 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -3405,24 +3405,35 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info) } if (gl_info->supported[ARB_MULTITEXTURE]) {
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_max);
gl_info->limits.textures = min(MAX_TEXTURES, gl_max);
TRACE("Max textures: %d.\n", gl_info->limits.textures);
if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT])
{
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_max);
gl_info->limits.textures = min(MAX_TEXTURES, gl_max);
TRACE("Max textures: %d.\n", gl_info->limits.textures);
if (gl_info->supported[ARB_FRAGMENT_PROGRAM])
if (gl_info->supported[ARB_FRAGMENT_PROGRAM])
{
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_TEXTURE_COORDS_ARB, &gl_max);
gl_info->limits.texture_coords = min(MAX_TEXTURES, gl_max);
}
else
{
gl_info->limits.texture_coords = max(gl_info->limits.texture_coords, gl_max);
}
TRACE("Max texture coords: %d.\n", gl_info->limits.texture_coords);
}
if (gl_info->supported[ARB_FRAGMENT_PROGRAM] || gl_info->supported[ARB_FRAGMENT_SHADER]) { GLint tmp;
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_TEXTURE_COORDS_ARB, &gl_max);
gl_info->limits.texture_coords = min(MAX_TEXTURES, gl_max);
gl_info->gl_ops.gl.p_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("Max texture coords: %d.\n", gl_info->limits.texture_coords); TRACE("Max fragment samplers: %d.\n", gl_info->limits.fragment_samplers); if (gl_info->supported[ARB_VERTEX_SHADER])
This still doesn't really look logical to me.