diff options
Diffstat (limited to 'src/mesa')
| -rw-r--r-- | src/mesa/drivers/dri/intel/intel_clear.c | 10 | 
1 files changed, 7 insertions, 3 deletions
| diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c index cfddabd318..630d2adab8 100644 --- a/src/mesa/drivers/dri/intel/intel_clear.c +++ b/src/mesa/drivers/dri/intel/intel_clear.c @@ -150,14 +150,18 @@ intelClear(GLcontext *ctx, GLbitfield mask)     /* SW fallback clearing */     swrast_mask = mask & ~tri_mask & ~blit_mask; -   for (i = 0; i < BUFFER_COUNT; i++) { -      GLuint bufBit = 1 << i; -      if ((blit_mask | tri_mask) & bufBit) { +   { +      /* look for non-Intel renderbuffers (clear them with swrast) */ +      GLbitfield blit_or_tri = blit_mask | tri_mask; +      while (blit_or_tri) { +         GLuint i = _mesa_ffs(blit_or_tri) - 1; +         GLbitfield bufBit = 1 << i;           if (!fb->Attachment[i].Renderbuffer->ClassID) {              blit_mask &= ~bufBit;              tri_mask &= ~bufBit;              swrast_mask |= bufBit;           } +         blit_or_tri ^= bufBit;        }     } | 
