wined3d: Use the texture dimensions in swapchain_blit().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
70f1d0efdc
commit
62a766f75c
|
@ -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;
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue