From: Eric Anholt Date: Thu, 13 May 2010 17:13:52 +0000 (-0700) Subject: intel: Don't update window system renderbuffers on TexImage. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=61aa9c86c20b1bc9957aa9fe9976703a93cc4d3c;p=mesa.git intel: Don't update window system renderbuffers on TexImage. While sometimes rendering occurs in the form of blits for TexImage, it doesn't interact with the window system renderbuffers, so skip it. --- diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 7d83e52f640..0369942b39e 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -409,6 +409,10 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable) driUpdateFramebufferSize(&intel->ctx, drawable); } +/** + * intel_prepare_render should be called anywhere that curent read/drawbuffer + * state is required. + */ void intel_prepare_render(struct intel_context *intel) { diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 7784223abba..06bf2627049 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -240,7 +240,7 @@ try_pbo_upload(struct intel_context *intel, if (drm_intel_bo_references(intel->batch->buf, dst_buffer)) intel_flush(&intel->ctx); - intel_prepare_render(intel); + { dri_bo *src_buffer = intel_bufferobj_buffer(intel, pbo, INTEL_READ); @@ -473,8 +473,6 @@ intelTexImage(GLcontext * ctx, pixels, unpack, "glTexImage"); } - intel_prepare_render(intel); - if (intelImage->mt) { if (pixels != NULL) { /* Flush any queued rendering with the texture before mapping. */