i965: use pack/unpackDouble lowering
[mesa.git] / src / gallium / drivers / i915 / i915_surface.c
index 7317e3a27e374076cf1e2cc1f1f17507ad6353b0..b2a639cb0f18812f0c4130e5965508652f57ac3e 100644 (file)
@@ -89,10 +89,19 @@ i915_surface_copy_render(struct pipe_context *pipe,
    struct pipe_box dstbox;
    struct pipe_sampler_view src_templ, *src_view;
    struct pipe_surface dst_templ, *dst_view;
+   const struct util_format_description *desc;
 
-   /* Fallback for buffers and npot. */
-   if ((dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER) ||
-       !util_is_power_of_two(src_width0) || !util_is_power_of_two(src_height0))
+   /* Fallback for buffers. */
+   if (dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER)
+      goto fallback;
+
+   /* Fallback for depth&stencil. XXX: see if we can use a proxy format */
+   desc = util_format_description(src->format);
+   if (desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS)
+      goto fallback;
+
+   desc = util_format_description(dst->format);
+   if (desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS)
       goto fallback;
 
    util_blitter_default_dst_texture(&dst_templ, dst, dst_level, dstz);
@@ -111,7 +120,8 @@ i915_surface_copy_render(struct pipe_context *pipe,
 
    util_blitter_blit_generic(i915->blitter, dst_view, &dstbox,
                              src_view, src_box, src_width0, src_height0,
-                             PIPE_MASK_RGBAZS, PIPE_TEX_FILTER_NEAREST, NULL);
+                             PIPE_MASK_RGBAZS, PIPE_TEX_FILTER_NEAREST, NULL,
+                             FALSE);
    return;
 
 fallback: