diff options
| author | Ben Skeggs <skeggsb@gmail.com> | 2008-02-04 01:37:07 +1100 | 
|---|---|---|
| committer | Ben Skeggs <skeggsb@gmail.com> | 2008-02-15 13:50:29 +1100 | 
| commit | b111d266a0edf334e8c315129482005a224cb899 (patch) | |
| tree | 1ee01e7adef8a1e7228d271c00096270a132abbc /src | |
| parent | 705022f98c32c44b94411ea13dfe4cbc899f5a77 (diff) | |
nv40: the 0x4497 version of curie doesn't support index buffers.
Diffstat (limited to 'src')
| -rw-r--r-- | src/mesa/pipe/nv40/nv40_vbo.c | 13 | 
1 files changed, 9 insertions, 4 deletions
| diff --git a/src/mesa/pipe/nv40/nv40_vbo.c b/src/mesa/pipe/nv40/nv40_vbo.c index 3fa8ddcb81..0bb54c7610 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); | 
