Browse Source

nv40: the 0x4497 version of curie doesn't support index buffers.

tags/mesa_20090313
Ben Skeggs 17 years ago
parent
commit
b111d266a0
1 changed files with 9 additions and 4 deletions
  1. 9
    4
      src/mesa/pipe/nv40/nv40_vbo.c

+ 9
- 4
src/mesa/pipe/nv40/nv40_vbo.c View File

@@ -391,12 +391,17 @@ nv40_draw_elements(struct pipe_context *pipe,
struct pipe_buffer *indexBuffer, unsigned indexSize,
unsigned mode, unsigned start, unsigned count)
{
if (indexSize != 1) {
nv40_draw_elements_vbo(pipe, indexBuffer, indexSize,
mode, start, count);
} else {
struct nv40_context *nv40 = nv40_context(pipe);

/* 0x4497 doesn't support real index buffers, and there doesn't appear
* to be support on any chipset for 8-bit indices.
*/
if (nv40->curie->grclass == NV44TCL || indexSize == 1) {
nv40_draw_elements_inline(pipe, indexBuffer, indexSize,
mode, start, count);
} else {
nv40_draw_elements_vbo(pipe, indexBuffer, indexSize,
mode, start, count);
}

pipe->flush(pipe, 0);

Loading…
Cancel
Save