Mesa (master): intel: Update renderbuffers before looking up CopyTexImage' s read buffer.

Eric Anholt anholt at kemper.freedesktop.org
Thu Dec 16 18:56:41 UTC 2010


Module: Mesa
Branch: master
Commit: 99c7840b0c10dbc731cad93b02b3865855ad086b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=99c7840b0c10dbc731cad93b02b3865855ad086b

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Dec 15 11:37:45 2010 -0800

intel: Update renderbuffers before looking up CopyTexImage's read buffer.

Not fixing a particular bug, just noticed by code inspection.

---

 src/mesa/drivers/dri/intel/intel_tex_copy.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index 87b31bf..5540c98 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -101,8 +101,11 @@ do_copy_texsubimage(struct intel_context *intel,
                     GLint x, GLint y, GLsizei width, GLsizei height)
 {
    struct gl_context *ctx = &intel->ctx;
-   const struct intel_region *src = get_teximage_source(intel, internalFormat);
+   const struct intel_region *src;
 
+   /* intel_flush(ctx); */
+   intel_prepare_render(intel);
+   src = get_teximage_source(intel, internalFormat);
    if (!intelImage->mt || !src || !src->buffer) {
       if (unlikely(INTEL_DEBUG & DEBUG_FALLBACKS))
 	 fprintf(stderr, "%s fail %p %p (0x%08x)\n",
@@ -116,8 +119,6 @@ do_copy_texsubimage(struct intel_context *intel,
       return GL_FALSE;
    }
 
-   /* intel_flush(ctx); */
-   intel_prepare_render(intel);
    {
       drm_intel_bo *dst_bo = intel_region_buffer(intel,
 						 intelImage->mt->region,




More information about the mesa-commit mailing list