From: Li Peng Date: Thu, 8 Apr 2010 17:52:55 +0000 (-0400) Subject: intel: Call intel_prepare_render() in intelClear() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9599da33742b727ba714618d2d14c0486e0408f6;p=mesa.git intel: Call intel_prepare_render() in intelClear() Make sure we have up to date buffers before we start looking at the tiling bits to determine how to clear. --- diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c index 167140d274a..7d9f302dca6 100644 --- a/src/mesa/drivers/dri/intel/intel_blit.c +++ b/src/mesa/drivers/dri/intel/intel_blit.c @@ -233,8 +233,6 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask) GLuint buf; all = (cw == fb->Width && ch == fb->Height); - intel_prepare_render(intel); - /* Loop over all renderbuffers */ for (buf = 0; buf < BUFFER_COUNT && mask; buf++) { const GLbitfield bufBit = 1 << buf; diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c index 03b24e2b51f..3c221188660 100644 --- a/src/mesa/drivers/dri/intel/intel_clear.c +++ b/src/mesa/drivers/dri/intel/intel_clear.c @@ -90,6 +90,10 @@ intelClear(GLcontext *ctx, GLbitfield mask) tri_mask |= (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT)); } + /* Make sure we have up to date buffers before we start looking at + * the tiling bits to determine how to clear. */ + intel_prepare_render(intel); + /* HW stencil */ if (mask & BUFFER_BIT_STENCIL) { const struct intel_region *stencilRegion