projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60a77cf
)
r600g: add index_bias to index buffer bounds
author
Marek Olšák
<maraeo@gmail.com>
Mon, 26 Sep 2011 13:03:43 +0000
(15:03 +0200)
committer
Marek Olšák
<maraeo@gmail.com>
Mon, 26 Sep 2011 13:25:05 +0000
(15:25 +0200)
This fixes ARB_draw_elements_base_vertex with max_index != ~0.
NOTE: This is a candidate for the 7.11 branch.
src/gallium/drivers/r600/r600_state_common.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/r600/r600_state_common.c
b/src/gallium/drivers/r600/r600_state_common.c
index bec31ffe9fd2c0ba49277e93218a536138be1bea..3a6298115ae0ec4be5d0ac52e750b29ff1025f21 100644
(file)
--- a/
src/gallium/drivers/r600/r600_state_common.c
+++ b/
src/gallium/drivers/r600/r600_state_common.c
@@
-572,6
+572,11
@@
void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
r600_vertex_buffer_update(rctx);
draw.info = *info;
+ if (draw.info.max_index != ~0) {
+ draw.info.min_index += info->index_bias;
+ draw.info.max_index += info->index_bias;
+ }
+
draw.ctx = ctx;
draw.index_buffer = NULL;
if (info->indexed && rctx->index_buffer.buffer) {