unsigned int min = ~0, max = 0;
struct tnl_prim prim;
static void *ptr = NULL;
- static struct r300_dma_region rvb;
+ struct r300_dma_region rvb;
const GLvoid *indices = c_indices;
if (count > 65535) {
return;
FLUSH_CURRENT( ctx, 0 );
- r300ReleaseDmaRegion(rmesa, &rvb, __FUNCTION__);
+ memset(&rvb, 0, sizeof(rvb));
switch (type) {
case GL_UNSIGNED_BYTE:
for (i=0; i < count; i++) {
return;
}
} else {
- if (setup_arrays(rmesa, min) >= R300_FALLBACK_TCL)
+ if (setup_arrays(rmesa, min) >= R300_FALLBACK_TCL) {
+ r300ReleaseDmaRegion(rmesa, &rvb, __FUNCTION__);
goto fallback;
+ }
rmesa->state.VB.Count = max - min + 1;
}
if(rvb.buf)
radeon_mm_use(rmesa, rvb.buf->id);
+ r300ReleaseDmaRegion(rmesa, &rvb, __FUNCTION__);
return;
fallback:
int elt_size;
int i;
void *ptr = NULL;
- static struct r300_dma_region rvb;
+ struct r300_dma_region rvb;
const GLvoid *indices = c_indices;
if (count > 65535) {
#ifdef OPTIMIZE_ELTS
min = 0;
#endif
- r300ReleaseDmaRegion(rmesa, &rvb, __FUNCTION__);
- switch(type){
+ memset(&rvb, 0, sizeof(rvb));
+ switch (type){
case GL_UNSIGNED_BYTE:
elt_size = 2;
return;
}*/
} else {
- if (setup_arrays(rmesa, min) >= R300_FALLBACK_TCL)
+ if (setup_arrays(rmesa, min) >= R300_FALLBACK_TCL) {
+ r300ReleaseDmaRegion(rmesa, &rvb, __FUNCTION__);
goto fallback;
+ }
rmesa->state.VB.Count = max - min + 1;
}
if(rvb.buf)
radeon_mm_use(rmesa, rvb.buf->id);
+ r300ReleaseDmaRegion(rmesa, &rvb, __FUNCTION__);
return ;
fallback: