intel: Don't update window system renderbuffers on TexImage.
authorEric Anholt <eric@anholt.net>
Thu, 13 May 2010 17:13:52 +0000 (10:13 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 13 May 2010 20:02:09 +0000 (13:02 -0700)
While sometimes rendering occurs in the form of blits for TexImage, it
doesn't interact with the window system renderbuffers, so skip it.

src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_tex_image.c

index 7d83e52f640deb2e85626218176690466db93952..0369942b39eb66597b811b283089a2baa13c2674 100644 (file)
@@ -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)
 {
index 7784223abba9877efed6473341c2e9f7aada3403..06bf2627049eabc12c9da4866354c69be33f62cb 100644 (file)
@@ -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. */