summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_draw_arrays.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-24 14:34:40 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-24 14:34:40 -0600
commit11ce6244a79106c592364b30434b6ddade3fd6bb (patch)
treecd46d9357503d6cbd32133f5b037ad569974d505 /src/mesa/pipe/softpipe/sp_draw_arrays.c
parent3733b1f2e95642b47218604aee6a34eacb0c7293 (diff)
Undo indexOffset change (I think, git???)
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_draw_arrays.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_draw_arrays.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/pipe/softpipe/sp_draw_arrays.c b/src/mesa/pipe/softpipe/sp_draw_arrays.c
index 64a4fbe333..d5cd6beae8 100644
--- a/src/mesa/pipe/softpipe/sp_draw_arrays.c
+++ b/src/mesa/pipe/softpipe/sp_draw_arrays.c
@@ -75,7 +75,7 @@ boolean
softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
unsigned start, unsigned count)
{
- return softpipe_draw_elements(pipe, NULL, 0, mode, start, count);
+ return softpipe_draw_elements(pipe, NULL, 0, 0, mode, start, count);
}
@@ -90,7 +90,7 @@ softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
boolean
softpipe_draw_elements(struct pipe_context *pipe,
struct pipe_buffer_handle *indexBuffer,
- unsigned indexSize,
+ unsigned indexSize, unsigned indexOffset,
unsigned mode, unsigned start, unsigned count)
{
struct softpipe_context *sp = softpipe_context(pipe);
@@ -130,9 +130,10 @@ softpipe_draw_elements(struct pipe_context *pipe,
}
/* Map index buffer, if present */
if (indexBuffer) {
- void *mapped_indexes
+ ubyte *mapped_indexes
= pipe->winsys->buffer_map(pipe->winsys, indexBuffer,
PIPE_BUFFER_FLAG_READ);
+ mapped_indexes += indexOffset;
draw_set_mapped_element_buffer(draw, indexSize, mapped_indexes);
}
else {