diff options
author | Marek Olšák <[email protected]> | 2011-04-21 12:53:16 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-04-21 15:51:18 +0200 |
commit | 883d8a0b449b53d83cc5970d2ce50df536aef55f (patch) | |
tree | 10b09a02971b2b1194e5406e67c1c7927f2ae143 /src/gallium/drivers/nv50/nv50_surface.c | |
parent | 64f55216e4c11e8acb787bfe40e6dd25e862cd43 (diff) |
gallium: add fallback for copying buffers to all drivers
Just to keep drivers working.
Reviewed-by: Jakob Bornecrantz <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_surface.c')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_surface.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c index dc9e2880f0f..3d7e880ccce 100644 --- a/src/gallium/drivers/nv50/nv50_surface.c +++ b/src/gallium/drivers/nv50/nv50_surface.c @@ -27,6 +27,7 @@ #include "util/u_inlines.h" #include "util/u_pack_color.h" #include "util/u_format.h" +#include "util/u_surface.h" #include "nv50_context.h" #include "nv50_resource.h" @@ -198,6 +199,13 @@ nv50_resource_copy_region(struct pipe_context *pipe, int ret; unsigned dst_layer = dstz, src_layer = src_box->z; + /* 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; + } + assert((src->format == dst->format) || (nv50_2d_format_faithful(src->format) && nv50_2d_format_faithful(dst->format))); |