mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
intel: Check aperture size when doing a blit glClear.
Fixes failure in cairo-gl firefox-planet-gnome.
This commit is contained in:
parent
12d0721ae1
commit
67e5fd7397
1 changed files with 10 additions and 0 deletions
|
|
@ -250,6 +250,7 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
|
|||
uint32_t clear_val;
|
||||
uint32_t BR13, CMD;
|
||||
int pitch, cpp;
|
||||
drm_intel_bo *aper_array[2];
|
||||
|
||||
if (!(mask & bufBit))
|
||||
continue;
|
||||
|
|
@ -340,6 +341,15 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
|
|||
assert(x1 < x2);
|
||||
assert(y1 < y2);
|
||||
|
||||
/* do space check before going any further */
|
||||
aper_array[0] = intel->batch->buf;
|
||||
aper_array[1] = write_buffer;
|
||||
|
||||
if (drm_intel_bufmgr_check_aperture_space(aper_array,
|
||||
ARRAY_SIZE(aper_array)) != 0) {
|
||||
intel_batchbuffer_flush(intel->batch);
|
||||
}
|
||||
|
||||
BEGIN_BATCH(6);
|
||||
OUT_BATCH(CMD);
|
||||
OUT_BATCH(BR13);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue