summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-04-19 18:14:58 +0200
committerJosé Fonseca <[email protected]>2010-04-19 18:14:58 +0200
commit9ca0f45d8af5aa3152350594093797210d052b6e (patch)
tree015e27d0957ddd0463cca26f2f3f466ac1f350cc /src/gallium/drivers
parent1e7facdd8fbbccbf6f384a4c9bbb394c176f2c4b (diff)
i965g: Implement index bias.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/i965/brw_draw.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/i965/brw_draw.c b/src/gallium/drivers/i965/brw_draw.c
index eb73ec2f272..4625c2048f9 100644
--- a/src/gallium/drivers/i965/brw_draw.c
+++ b/src/gallium/drivers/i965/brw_draw.c
@@ -179,7 +179,7 @@ try_draw_range_elements(struct brw_context *brw,
static void
brw_draw_range_elements(struct pipe_context *pipe,
struct pipe_resource *index_buffer,
- unsigned index_size,
+ unsigned index_size, int index_bias,
unsigned min_index,
unsigned max_index,
unsigned mode, unsigned start, unsigned count)
@@ -194,6 +194,8 @@ brw_draw_range_elements(struct pipe_context *pipe,
debug_printf("PRIM: %s start %d count %d index_buffer %p\n",
u_prim_name(mode), start, count, (void *)index_buffer);
+ assert(index_bias == 0);
+
/* Potentially trigger upload of new index buffer.
*
* XXX: do we need to go through state validation to achieve this?
@@ -233,12 +235,12 @@ brw_draw_range_elements(struct pipe_context *pipe,
static void
brw_draw_elements(struct pipe_context *pipe,
struct pipe_resource *index_buffer,
- unsigned index_size,
+ unsigned index_size, int index_bias,
unsigned mode,
unsigned start, unsigned count)
{
brw_draw_range_elements( pipe, index_buffer,
- index_size,
+ index_size, index_bias,
0, 0xffffffff,
mode,
start, count );
@@ -248,7 +250,7 @@ static void
brw_draw_arrays(struct pipe_context *pipe, unsigned mode,
unsigned start, unsigned count)
{
- brw_draw_elements(pipe, NULL, 0, mode, start, count);
+ brw_draw_elements(pipe, NULL, 0, 0, mode, start, count);
}