summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/i915/i915_surface.c')
-rw-r--r--src/gallium/drivers/i915/i915_surface.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/i915/i915_surface.c b/src/gallium/drivers/i915/i915_surface.c
index d02c420f6c2..ac6e94500c8 100644
--- a/src/gallium/drivers/i915/i915_surface.c
+++ b/src/gallium/drivers/i915/i915_surface.c
@@ -37,6 +37,7 @@
#include "util/u_format.h"
#include "util/u_memory.h"
#include "util/u_pack_color.h"
+#include "util/u_surface.h"
/*
* surface functions using the render engine
@@ -51,6 +52,13 @@ i915_surface_copy_render(struct pipe_context *pipe,
{
struct i915_context *i915 = i915_context(pipe);
+ /* Fallback for buffers. */
+ if (dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER) {
+ util_resource_copy_region(pipe, dst, dst_level, dstx, dsty, dstz,
+ src, src_level, src_box);
+ return;
+ }
+
util_blitter_save_blend(i915->blitter, (void *)i915->blend);
util_blitter_save_depth_stencil_alpha(i915->blitter, (void *)i915->depth_stencil);
util_blitter_save_stencil_ref(i915->blitter, &i915->stencil_ref);
@@ -158,6 +166,13 @@ i915_surface_copy_blitter(struct pipe_context *pipe,
struct pipe_resource *spt = &src_tex->b.b;
unsigned dst_offset, src_offset; /* in bytes */
+ /* Fallback for buffers. */
+ if (dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER) {
+ util_resource_copy_region(pipe, dst, dst_level, dstx, dsty, dstz,
+ src, src_level, src_box);
+ return;
+ }
+
/* XXX cannot copy 3d regions at this time */
assert(src_box->depth == 1);
if (dst->target != PIPE_TEXTURE_CUBE &&