Module: wine Branch: master Commit: 55165bf6d0d178613039121caf62f5a50b7d6390 URL: http://source.winehq.org/git/wine.git/?a=commit;h=55165bf6d0d178613039121caf...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Mar 16 18:16:57 2016 +0100
wined3d: Get resource info from the texture in wined3d_surface_upload_data().
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/surface.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index a1a2782..6b0a582 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1273,6 +1273,7 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point, BOOL srgb, const struct wined3d_const_bo_address *data) { + struct wined3d_texture *texture = surface->container; UINT update_w = src_rect->right - src_rect->left; UINT update_h = src_rect->bottom - src_rect->top;
@@ -1283,7 +1284,7 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w if (surface->resource.map_count) { WARN("Uploading a surface that is currently mapped, setting WINED3D_TEXTURE_PIN_SYSMEM.\n"); - surface->container->flags |= WINED3D_TEXTURE_PIN_SYSMEM; + texture->flags |= WINED3D_TEXTURE_PIN_SYSMEM; }
if (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_HEIGHT_SCALE) @@ -1310,8 +1311,8 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w
if (srgb) internal = format->glGammaInternal; - else if (surface->resource.usage & WINED3DUSAGE_RENDERTARGET - && wined3d_resource_is_offscreen(&surface->container->resource)) + else if (texture->resource.usage & WINED3DUSAGE_RENDERTARGET + && wined3d_resource_is_offscreen(&texture->resource)) internal = format->rtInternal; else internal = format->glInternal; @@ -1370,7 +1371,7 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w
if (gl_info->quirks & WINED3D_QUIRK_FBO_TEX_UPDATE) { - struct wined3d_device *device = surface->resource.device; + struct wined3d_device *device = texture->resource.device; unsigned int i;
for (i = 0; i < device->context_count; ++i)