aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-05-13 10:13:52 -0700
committerEric Anholt <[email protected]>2010-05-13 13:02:09 -0700
commit61aa9c86c20b1bc9957aa9fe9976703a93cc4d3c (patch)
treece1188de49bcbdacbe1708fe9923e8fa7791f68d /src
parent165694ad65374ff4330bd80acb398fe0428ba2e6 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c4
2 files changed, 5 insertions, 3 deletions
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. */