summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/rbug
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/rbug')
-rw-r--r--src/gallium/drivers/rbug/rbug_context.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
index 5d002076b49..91b1ac66ebe 100644
--- a/src/gallium/drivers/rbug/rbug_context.c
+++ b/src/gallium/drivers/rbug/rbug_context.c
@@ -778,8 +778,11 @@ rbug_set_vertex_buffers(struct pipe_context *_pipe,
if (num_buffers && _buffers) {
memcpy(unwrapped_buffers, _buffers, num_buffers * sizeof(*_buffers));
- for (i = 0; i < num_buffers; i++)
- unwrapped_buffers[i].buffer = rbug_resource_unwrap(_buffers[i].buffer);
+ for (i = 0; i < num_buffers; i++) {
+ if (!_buffers[i].is_user_buffer)
+ unwrapped_buffers[i].buffer.resource =
+ rbug_resource_unwrap(_buffers[i].buffer.resource);
+ }
buffers = unwrapped_buffers;
}