diff options
author | Dave Airlie <[email protected]> | 2010-10-01 11:13:02 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2010-10-01 11:15:13 +1000 |
commit | 35cfe286d69206d3108c7a8702bd4be6521b5706 (patch) | |
tree | bd71e0abadecb6eaa01a691d04c4eaf55f05164f /src/gallium/drivers/r600 | |
parent | a3e9998614da6bd10d9015134bc19f5b8cf6e518 (diff) |
r600g: realign evergreen code with r600 code.
fixes segfault in depth-tex-modes-glsl and OA startup.
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 55eede98d53..06dc8407a18 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -1341,14 +1341,13 @@ void evergreen_draw(struct pipe_context *ctx, const struct pipe_draw_info *info) struct r600_pipe_state vgt; struct r600_drawl draw; - assert(info->index_bias == 0); - if (rctx->any_user_vbs) { r600_upload_user_buffers(rctx); rctx->any_user_vbs = FALSE; } memset(&draw, 0, sizeof(struct r600_drawl)); + draw.ctx = ctx; draw.mode = info->mode; draw.start = info->start; draw.count = info->count; @@ -1364,7 +1363,7 @@ void evergreen_draw(struct pipe_context *ctx, const struct pipe_draw_info *info) info->count); draw.index_size = rctx->index_buffer.index_size; - draw.index_buffer = rctx->index_buffer.buffer; + pipe_resource_reference(&draw.index_buffer, rctx->index_buffer.buffer); draw.index_buffer_offset = draw.start * draw.index_size; draw.start = 0; r600_upload_index_buffer(rctx, &draw); @@ -1505,6 +1504,8 @@ void evergreen_draw(struct pipe_context *ctx, const struct pipe_draw_info *info) rdraw.indices_bo_offset = draw.index_buffer_offset; } evergreen_context_draw(&rctx->ctx, &rdraw); + + pipe_resource_reference(&draw.index_buffer, NULL); } void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader *shader) |