Module: wine Branch: master Commit: 62a766f75ce068313b2a3ad2691154a78491158c URL: http://source.winehq.org/git/wine.git/?a=commit;h=62a766f75ce068313b2a3ad269...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Tue Apr 19 18:34:07 2016 +0200
wined3d: Use the texture dimensions in swapchain_blit().
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/surface.c | 2 -- dlls/wined3d/swapchain.c | 10 +++++----- dlls/wined3d/texture.c | 2 -- dlls/wined3d/wined3d_private.h | 2 -- 4 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index f358805..c32a1f7 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4351,8 +4351,6 @@ HRESULT wined3d_surface_init(struct wined3d_surface *surface, struct wined3d_tex surface->resource.access_flags = container->resource.access_flags;
surface->container = container; - surface->pow2Width = wined3d_texture_get_level_pow2_width(container, level); - surface->pow2Height = wined3d_texture_get_level_pow2_height(container, level); surface->texture_target = target; surface->texture_level = level; surface->texture_layer = layer; diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index bd0a089..202a890 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -361,12 +361,12 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain, context2 = context_acquire(device, back_buffer); context_apply_blit_state(context2, device);
- if (back_buffer->container->flags & WINED3D_TEXTURE_NORMALIZED_COORDS) + if (texture->flags & WINED3D_TEXTURE_NORMALIZED_COORDS) { - tex_left /= back_buffer->pow2Width; - tex_right /= back_buffer->pow2Width; - tex_top /= back_buffer->pow2Height; - tex_bottom /= back_buffer->pow2Height; + tex_left /= texture->pow2_width; + tex_right /= texture->pow2_width; + tex_top /= texture->pow2_height; + tex_bottom /= texture->pow2_height; }
if (is_complex_fixup(texture->resource.format->color_fixup)) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 2990e44..ada571c 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -987,8 +987,6 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT texture->pow2_width = width; texture->pow2_height = height; } - surface->pow2Width = texture->pow2_width; - surface->pow2Height = texture->pow2_height;
sub_resource->locations = 0;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 5623a62..1f04484 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2651,8 +2651,6 @@ struct wined3d_surface struct wined3d_resource resource; struct wined3d_texture *container;
- UINT pow2Width; - UINT pow2Height; GLenum texture_target; unsigned int texture_level; unsigned int texture_layer;