OSDN Git Service

i965/miptree: Enforce that height == 1 for 1-D array textures
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 19 Jul 2016 01:46:43 +0000 (18:46 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 21 Jul 2016 13:32:33 +0000 (14:32 +0100)
commit57c1d0ea075dac313b31e84eee0b447bd5ab8e71
treeeacfa03177f00ddc744d62c5dea7ec9b29f09b9a
parentfb8b548ac1d9e0b39fc550c5cff9e704e032803d
i965/miptree: Enforce that height == 1 for 1-D array textures

The GL API and mesa internals do this differently than we do.  In GL, there
is no depth parameter for 1-D arrays and height is used.  In the i965
miptree code we do the sane thing and make height == 1 and use depth for
number of slices.  This makes for a mismatch every time we create a 1-D
array texture from GL.  Instead of actually solving this problem, we just
said "1-D is hard, let's make sure it works no matter which way we pass the
parameters" and called it a day.

This commit fixes the one GL -> i965 transition point where we weren't
already handling 1-D array textures to do the right thing and then replaces
the magic fixup code with an assert that you're doing the right thing.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Cc: "12.0 11.2 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit d4d505d0b04b9bce7c346fe0710df9921861edd6)
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_tex.c