mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-30 23:28:06 +02:00
fix some conflict happenings at context destroy by freeing buffers immediately. array locking can be done with vbos for vtxfmt_a so we dont really need to try to reuse them.
This commit is contained in:
parent
ff2b910dd1
commit
83a43aca23
2 changed files with 14 additions and 8 deletions
|
|
@ -382,7 +382,6 @@ GLboolean r300_run_vb_render(GLcontext *ctx,
|
|||
|
||||
r300UpdateShaders(rmesa);
|
||||
if (rmesa->state.VB.LockCount == 0 || 1) {
|
||||
r300ReleaseArrays(ctx);
|
||||
r300EmitArrays(ctx, GL_FALSE);
|
||||
|
||||
r300UpdateShaderStates(rmesa);
|
||||
|
|
@ -446,6 +445,7 @@ GLboolean r300_run_vb_render(GLcontext *ctx,
|
|||
#ifdef USER_BUFFERS
|
||||
r300UseArrays(ctx);
|
||||
#endif
|
||||
r300ReleaseArrays(ctx);
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ static void radeonDrawElements( GLenum mode, GLsizei count, GLenum type, const G
|
|||
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) {
|
||||
|
|
@ -205,8 +205,8 @@ static void radeonDrawElements( GLenum mode, GLsizei count, GLenum type, const G
|
|||
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++) {
|
||||
|
|
@ -311,8 +311,10 @@ static void radeonDrawElements( GLenum mode, GLsizei count, GLenum type, const G
|
|||
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;
|
||||
}
|
||||
|
|
@ -337,6 +339,7 @@ static void radeonDrawElements( GLenum mode, GLsizei count, GLenum type, const G
|
|||
if(rvb.buf)
|
||||
radeon_mm_use(rmesa, rvb.buf->id);
|
||||
|
||||
r300ReleaseDmaRegion(rmesa, &rvb, __FUNCTION__);
|
||||
return;
|
||||
|
||||
fallback:
|
||||
|
|
@ -355,7 +358,7 @@ static void radeonDrawRangeElements(GLenum mode, GLuint min, GLuint max, GLsizei
|
|||
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) {
|
||||
|
|
@ -381,9 +384,9 @@ static void radeonDrawRangeElements(GLenum mode, GLuint min, GLuint max, GLsizei
|
|||
#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;
|
||||
|
||||
|
|
@ -473,8 +476,10 @@ static void radeonDrawRangeElements(GLenum mode, GLuint min, GLuint max, GLsizei
|
|||
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;
|
||||
}
|
||||
|
|
@ -501,6 +506,7 @@ static void radeonDrawRangeElements(GLenum mode, GLuint min, GLuint max, GLsizei
|
|||
if(rvb.buf)
|
||||
radeon_mm_use(rmesa, rvb.buf->id);
|
||||
|
||||
r300ReleaseDmaRegion(rmesa, &rvb, __FUNCTION__);
|
||||
return ;
|
||||
|
||||
fallback:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue