[Mesa-dev] [PATCH 1/4] i965/tex_subimage: Use the fast tiled path for rectangle textures

Jason Ekstrand jason at jlekstrand.net
Sat Jan 3 11:54:12 PST 2015


There's no reason why we should be doing this for 2D textures and not
rectangles.  Just a matter of adding another hunk to the condition.

Signed-off-by: Jason Ekstrand <jason.ekstrand at intel.com>
---
 src/mesa/drivers/dri/i965/intel_tex_subimage.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
index 3e4ed1b..b9f2153 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
@@ -556,7 +556,8 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
     */
    if (!brw->has_llc ||
        !(type == GL_UNSIGNED_BYTE || type == GL_UNSIGNED_INT_8_8_8_8_REV) ||
-       texImage->TexObject->Target != GL_TEXTURE_2D ||
+       !(texImage->TexObject->Target == GL_TEXTURE_2D ||
+         texImage->TexObject->Target == GL_TEXTURE_RECTANGLE) ||
        pixels == NULL ||
        _mesa_is_bufferobj(packing->BufferObj) ||
        packing->Alignment > 4 ||
-- 
2.2.0



More information about the mesa-dev mailing list