From 02f20458d1dd48fc4589734fc4b3e0c8bea1ce5c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 27 Jan 2010 19:02:21 +0000 Subject: [PATCH] drm-i915: Ensure surface size for clone is initialized. If the surface had a snapshot, then we would have not initialized the surface size and so compute a bogus normalization matrix. --- src/drm/cairo-drm-i915-shader.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/drm/cairo-drm-i915-shader.c b/src/drm/cairo-drm-i915-shader.c index afcbd42be..30f722a55 100644 --- a/src/drm/cairo-drm-i915-shader.c +++ b/src/drm/cairo-drm-i915-shader.c @@ -1484,13 +1484,12 @@ i915_shader_acquire_surface (i915_shader_t *shader, src_y = -extents->y; } - surface_width = image->width; - surface_height = image->height; - _cairo_surface_release_source_image (surface, image, image_extra); - if (unlikely (status)) return status; + + surface_width = s->intel.drm.width; + surface_height = s->intel.drm.height; } src->type.fragment = FS_TEXTURE;