common: Correct texture init for meta pbo uploads and downloads.
authorLaura Ekstrand <laura@jlekstrand.net>
Tue, 24 Feb 2015 21:29:11 +0000 (13:29 -0800)
committerLaura Ekstrand <laura@jlekstrand.net>
Wed, 25 Feb 2015 01:27:52 +0000 (17:27 -0800)
commit06084652fefe49c3d6bf1b476ff74ff602fdc22a
tree0bff53535c1dac8e12dcdf3e25db0ae93e73dd04
parent88ff8dee02d43a55d72a22a0172b92e7cd988bbf
common: Correct texture init for meta pbo uploads and downloads.

This moves the line setting immutability for the texture to after
_mesa_initialize_texture_object so that the initializer function will not
cancel it out. Moreover, because of the ARB_texture_view extension, immutable
textures must have NumLayers > 0, or depth will equal (0-1)=0xFFFFFFFF during
SURFACE_STATE setup, which triggers assertions.

v2: Review from Kenneth Graunke:
   - Include more explanation in the commit message.
   - Make texture setup bug fixes into a separate patch.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Cc: "10.4, 10.5" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/common/meta_tex_subimage.c