diff options
author | Roland Scheidegger <[email protected]> | 2013-02-28 01:25:24 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-02-28 03:39:54 +0100 |
commit | c8eb2d0e829d0d2aea6a982620da0d3cfb5982e2 (patch) | |
tree | 8ed27e8c5f72175689c56730bf5d80dd9eaa859e /src/gallium/drivers/llvmpipe/lp_surface.c | |
parent | 686f6c69bd36c537573f6e8095aaf24ec0ae4047 (diff) |
llvmpipe: check buffers in llvmpipe_is_resource_referenced.
Now that buffers can be used as textures or render targets
make sure they aren't skipped.
Fix suggested by Jose Fonseca.
v2: added a couple of assertions so we can actually guarantee
we check the resources and don't skip them. Also added some comments
that this is actually a lie due to the way the opengl buffer api works.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_surface.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_surface.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_surface.c b/src/gallium/drivers/llvmpipe/lp_surface.c index a83a9033c40..5e6a6ebb340 100644 --- a/src/gallium/drivers/llvmpipe/lp_surface.c +++ b/src/gallium/drivers/llvmpipe/lp_surface.c @@ -65,13 +65,6 @@ lp_resource_copy(struct pipe_context *pipe, unsigned depth = src_box->depth; unsigned 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; - } - llvmpipe_flush_resource(pipe, dst, dst_level, FALSE, /* read_only */ @@ -86,6 +79,13 @@ lp_resource_copy(struct pipe_context *pipe, FALSE, /* do_not_block */ "blit src"); + /* 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; + } + /* printf("surface copy from %u lvl %u to %u lvl %u: %u,%u,%u to %u,%u,%u %u x %u x %u\n", src_tex->id, src_level, dst_tex->id, dst_level, |