}
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);
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);