mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-18 22:00:25 +01:00
i915tex: Take into account various mapping states when dropping the
batch buffer after a resolution / rotation switch.
This commit is contained in:
parent
1e6688742e
commit
bc82b44db9
1 changed files with 13 additions and 2 deletions
|
|
@ -643,7 +643,9 @@ intelContendedLock(struct intel_context *intel, GLuint flags)
|
|||
if (sarea->width != intel->width ||
|
||||
sarea->height != intel->height ||
|
||||
sarea->rotation != intel->current_rotation) {
|
||||
|
||||
|
||||
void *batchMap = intel->batch->map;
|
||||
|
||||
/*
|
||||
* FIXME: Really only need to do this when drawing to a
|
||||
* common back- or front buffer.
|
||||
|
|
@ -653,9 +655,18 @@ intelContendedLock(struct intel_context *intel, GLuint flags)
|
|||
* This will drop the outstanding batchbuffer on the floor
|
||||
*/
|
||||
|
||||
driBOUnmap(intel->batch->buffer);
|
||||
if (batchMap != NULL) {
|
||||
driBOUnmap(intel->batch->buffer);
|
||||
intel->batch->map = NULL;
|
||||
}
|
||||
|
||||
intel_batchbuffer_reset(intel->batch);
|
||||
|
||||
if (batchMap == NULL) {
|
||||
driBOUnmap(intel->batch->buffer);
|
||||
intel->batch->map = NULL;
|
||||
}
|
||||
|
||||
/* lose all primitives */
|
||||
intel->prim.primitive = ~0;
|
||||
intel->prim.start_ptr = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue