summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/state_trackers/dri/common/dri_drawable.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c b/src/gallium/state_trackers/dri/common/dri_drawable.c
index 00ae1daed8a..cd4a36a139f 100644
--- a/src/gallium/state_trackers/dri/common/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/common/dri_drawable.c
@@ -435,7 +435,8 @@ dri_flush(__DRIcontext *cPriv,
}
/* Flush the drawable. */
- if (flags & __DRI2_FLUSH_DRAWABLE) {
+ if ((flags & __DRI2_FLUSH_DRAWABLE) &&
+ drawable->textures[ST_ATTACHMENT_BACK_LEFT]) {
/* Resolve MSAA buffers. */
if (drawable->stvis.samples > 1) {
dri_msaa_resolve(ctx, drawable, ST_ATTACHMENT_BACK_LEFT);