summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_blit.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-04-21 12:53:16 +0200
committerMarek Olšák <maraeo@gmail.com>2011-04-21 15:51:18 +0200
commit883d8a0b449b53d83cc5970d2ce50df536aef55f (patch)
tree10b09a02971b2b1194e5406e67c1c7927f2ae143 /src/gallium/drivers/r300/r300_blit.c
parent64f55216e4c11e8acb787bfe40e6dd25e862cd43 (diff)
downloadexternal_mesa3d-883d8a0b449b53d83cc5970d2ce50df536aef55f.zip
external_mesa3d-883d8a0b449b53d83cc5970d2ce50df536aef55f.tar.gz
external_mesa3d-883d8a0b449b53d83cc5970d2ce50df536aef55f.tar.bz2
gallium: add fallback for copying buffers to all drivers
Just to keep drivers working. Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'src/gallium/drivers/r300/r300_blit.c')
-rw-r--r--src/gallium/drivers/r300/r300_blit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index 62d90af..1217488 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -26,6 +26,7 @@
#include "util/u_format.h"
#include "util/u_pack_color.h"
+#include "util/u_surface.h"
enum r300_blitter_op /* bitmask */
{
@@ -415,6 +416,13 @@ static void r300_resource_copy_region(struct pipe_context *pipe,
util_format_description(dst->format);
struct pipe_box box;
+ /* 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;
+ }
+
if (r300->zmask_in_use && !r300->hyperz_locked) {
if (fb->zsbuf->texture == src ||
fb->zsbuf->texture == dst) {