diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2019-09-16 14:55:13 +0200 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-10-18 09:56:11 -0700 |
commit | 62f9ba1bf2eaad056104ffa63128bf1face4b60d (patch) | |
tree | 1614d85b383177ce466cad1b28f05192b8afb8dd | |
parent | 306e82acb6c2c4a7f01aa3426e4572feec366b4e (diff) |
rbug: unwrap index buffer resource
All resources passed to the drivers below rbug need to be unwrapped before
being passed down. We missed to do this for the index buffer resource when
this was made part of the draw_info structure.
Fixes: 330d0607ed60 (gallium: remove pipe_index_buffer and set_index_buffer)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
(cherry picked from commit a75eb888e0ceeaa61b3583668c05cc1f5f5786ce)
-rw-r--r-- | src/gallium/auxiliary/driver_rbug/rbug_context.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/driver_rbug/rbug_context.c b/src/gallium/auxiliary/driver_rbug/rbug_context.c index adf3493aab5..436fd8bd83e 100644 --- a/src/gallium/auxiliary/driver_rbug/rbug_context.c +++ b/src/gallium/auxiliary/driver_rbug/rbug_context.c @@ -114,10 +114,15 @@ rbug_draw_block_locked(struct rbug_context *rb_pipe, int flag) } static void -rbug_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info) +rbug_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *_info) { struct rbug_context *rb_pipe = rbug_context(_pipe); struct pipe_context *pipe = rb_pipe->pipe; + struct pipe_draw_info info; + + info = *_info; + if(_info->index_size && !_info->has_user_indices) + info.index.resource = rbug_resource_unwrap(_info->index.resource); mtx_lock(&rb_pipe->draw_mutex); rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_BEFORE); @@ -127,7 +132,7 @@ rbug_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info) if (!(rb_pipe->curr.shader[PIPE_SHADER_FRAGMENT] && rb_pipe->curr.shader[PIPE_SHADER_FRAGMENT]->disabled) && !(rb_pipe->curr.shader[PIPE_SHADER_GEOMETRY] && rb_pipe->curr.shader[PIPE_SHADER_GEOMETRY]->disabled) && !(rb_pipe->curr.shader[PIPE_SHADER_VERTEX] && rb_pipe->curr.shader[PIPE_SHADER_VERTEX]->disabled)) - pipe->draw_vbo(pipe, info); + pipe->draw_vbo(pipe, &info); mtx_unlock(&rb_pipe->call_mutex); rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_AFTER); |