summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvfx/nvfx_vbo.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-04-19 18:18:28 +0200
committerJosé Fonseca <jfonseca@vmware.com>2010-04-19 18:18:28 +0200
commit7c785c0d2c2b5f3ead4b3cf31ad6af02bd90f3a5 (patch)
tree35ef72f5a424dc928a2e5580185f2de035f58848 /src/gallium/drivers/nvfx/nvfx_vbo.c
parentf6f7324bbf03494dc26e266d96919fec6a1f08ba (diff)
nvfx: Adapt for index bias interface change.
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_vbo.c')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_vbo.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_vbo.c b/src/gallium/drivers/nvfx/nvfx_vbo.c
index 5ffbdfcb2a..d441d032d9 100644
--- a/src/gallium/drivers/nvfx/nvfx_vbo.c
+++ b/src/gallium/drivers/nvfx/nvfx_vbo.c
@@ -167,7 +167,7 @@ nvfx_draw_arrays(struct pipe_context *pipe,
nvfx_vbo_set_idxbuf(nvfx, NULL, 0);
if (nvfx->screen->force_swtnl || !nvfx_state_validate(nvfx)) {
- nvfx_draw_elements_swtnl(pipe, NULL, 0,
+ nvfx_draw_elements_swtnl(pipe, NULL, 0, 0,
mode, start, count);
return;
}
@@ -372,7 +372,8 @@ nvfx_draw_elements_u32(struct nvfx_context *nvfx, void *ib,
static void
nvfx_draw_elements_inline(struct pipe_context *pipe,
- struct pipe_resource *ib, unsigned ib_size,
+ struct pipe_resource *ib,
+ unsigned ib_size, int ib_bias,
unsigned mode, unsigned start, unsigned count)
{
struct nvfx_context *nvfx = nvfx_context(pipe);
@@ -385,6 +386,8 @@ nvfx_draw_elements_inline(struct pipe_context *pipe,
return;
}
+ assert(ib_bias == 0);
+
switch (ib_size) {
case 1:
nvfx_draw_elements_u08(nvfx, map, mode, start, count);
@@ -460,7 +463,8 @@ nvfx_draw_elements_vbo(struct pipe_context *pipe,
void
nvfx_draw_elements(struct pipe_context *pipe,
- struct pipe_resource *indexBuffer, unsigned indexSize,
+ struct pipe_resource *indexBuffer,
+ unsigned indexSize, int indexBias,
unsigned mode, unsigned start, unsigned count)
{
struct nvfx_context *nvfx = nvfx_context(pipe);
@@ -468,15 +472,17 @@ nvfx_draw_elements(struct pipe_context *pipe,
idxbuf = nvfx_vbo_set_idxbuf(nvfx, indexBuffer, indexSize);
if (nvfx->screen->force_swtnl || !nvfx_state_validate(nvfx)) {
- nvfx_draw_elements_swtnl(pipe, indexBuffer, indexSize,
- mode, start, count);
+ nvfx_draw_elements_swtnl(pipe,
+ indexBuffer, indexSize, indexBias,
+ mode, start, count);
return;
}
if (idxbuf) {
nvfx_draw_elements_vbo(pipe, mode, start, count);
} else {
- nvfx_draw_elements_inline(pipe, indexBuffer, indexSize,
+ nvfx_draw_elements_inline(pipe,
+ indexBuffer, indexSize, indexBias,
mode, start, count);
}