i965/tex_subimage: Use the fast tiled path for rectangle textures
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 3 Jan 2015 02:22:04 +0000 (18:22 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 27 Jan 2015 01:29:34 +0000 (17:29 -0800)
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@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
src/mesa/drivers/dri/i965/intel_tex_subimage.c

index b96ad50ab647c4e9d659eee5ea3e9d4280f485ce..1c6310f300628fa5c836e3a011fe98df7dc740d9 100644 (file)
@@ -467,7 +467,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 ||