From: Ben Skeggs Date: Sun, 3 Feb 2008 14:37:07 +0000 (+1100) Subject: nv40: the 0x4497 version of curie doesn't support index buffers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63923b8c9568520981ecdb46569f5ce626b584e6;p=mesa.git nv40: the 0x4497 version of curie doesn't support index buffers. --- diff --git a/src/mesa/pipe/nv40/nv40_vbo.c b/src/mesa/pipe/nv40/nv40_vbo.c index 3fa8ddcb81b..0bb54c7610e 100644 --- a/src/mesa/pipe/nv40/nv40_vbo.c +++ b/src/mesa/pipe/nv40/nv40_vbo.c @@ -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);