diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index ba6c457d150..87418e1e44e 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -2853,7 +2853,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info, struct } gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_TEXTURE_SIZE, &gl_max); - gl_info->limits.texture_size = gl_max; + d3d_info->limits.texture_size = gl_max; TRACE("Maximum texture size support - max texture size %d.\n", gl_max); gl_info->gl_ops.gl.p_glGetFloatv(gl_info->supported[WINED3D_GL_LEGACY_CONTEXT] @@ -3143,8 +3143,8 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info, struct } else { - gl_info->limits.framebuffer_width = gl_info->limits.texture_size; - gl_info->limits.framebuffer_height = gl_info->limits.texture_size; + gl_info->limits.framebuffer_width = d3d_info->limits.texture_size; + gl_info->limits.framebuffer_height = d3d_info->limits.texture_size; } gl_info->limits.samplers[WINED3D_SHADER_TYPE_PIXEL] = diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 2d1368a8553..a6184862d1d 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2136,8 +2136,8 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte * idea how generating the smoothing alpha values works; the result is different */ - caps->MaxTextureWidth = gl_info->limits.texture_size; - caps->MaxTextureHeight = gl_info->limits.texture_size; + caps->MaxTextureWidth = d3d_info->limits.texture_size; + caps->MaxTextureHeight = d3d_info->limits.texture_size; if (gl_info->supported[EXT_TEXTURE3D]) caps->MaxVolumeExtent = gl_info->limits.texture3d_size; @@ -2145,7 +2145,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte caps->MaxVolumeExtent = 0; caps->MaxTextureRepeat = 32768; - caps->MaxTextureAspectRatio = gl_info->limits.texture_size; + caps->MaxTextureAspectRatio = d3d_info->limits.texture_size; caps->MaxVertexW = 1.0f; caps->GuardBandLeft = 0.0f; diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index fdf26512b91..c0bdddcaa09 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -2687,7 +2687,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc texture->pow2_width = pow2_width; texture->pow2_height = pow2_height; - if ((pow2_width > gl_info->limits.texture_size || pow2_height > gl_info->limits.texture_size) + if ((pow2_width > d3d_info->limits.texture_size || pow2_height > d3d_info->limits.texture_size) && (desc->usage & WINED3DUSAGE_TEXTURE)) { /* One of four options: diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 46b47ddbf15..941bfa68fad 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -166,6 +166,7 @@ struct wined3d_d3d_limits unsigned int max_rt_count; unsigned int max_clip_distances; + unsigned int texture_size; float pointsize_max; }; @@ -2540,7 +2541,6 @@ struct wined3d_gl_limits unsigned int combined_samplers; UINT general_combiners; UINT user_clip_distances; - UINT texture_size; UINT texture3d_size; UINT anisotropy; float shininess;