Mesa (master): intel: Fix intel_texsubimage_tiled_memcpy to skip GL_EXT_unpack_subimage case

Chad Versace chadversary at kemper.freedesktop.org
Wed Oct 3 23:45:39 UTC 2012


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

Author: Rob Bradford <rob at linux.intel.com>
Date:   Tue Oct  2 14:18:39 2012 +0100

intel: Fix intel_texsubimage_tiled_memcpy to skip GL_EXT_unpack_subimage case

413c49141 added an optimisation to improve the performance of teximage
under a limited set of circumstances. If GL_EXT_unpack_subimage has been
used then we we must also skip this optimisation since the optimised
codepath does not take the packing values into consideration.

Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

---

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

diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
index 55d0bae..ba6267a 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
@@ -205,7 +205,10 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
        texImage->TexObject->Target != GL_TEXTURE_2D ||
        texImage->Level != 0 ||
        pixels == NULL ||
-       packing->Alignment > 4)
+       packing->Alignment > 4 ||
+       packing->SkipPixels > 0 ||
+       packing->SkipRows > 0 ||
+       packing->RowLength != width)
       return false;
 
    if (for_glTexImage)




More information about the mesa-commit mailing list