summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 7d83e52f64..0369942b39 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 7784223abb..06bf262704 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. */