mesa: Prefer non-swizzled formats for most sized internalformats
authorChris Forbes <chrisf@ijw.co.nz>
Mon, 10 Mar 2014 08:36:22 +0000 (21:36 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Thu, 10 Apr 2014 06:27:40 +0000 (18:27 +1200)
commit61e264f4fcdba3623781a0a339426672f0d431e4
treebff1e9aca0578875812697aa6b31b66094eab9a3
parent58790043bb9e222f54994eba6ec78429d0d23625
mesa: Prefer non-swizzled formats for most sized internalformats

These formats can be cast to others (with different component types or
sizes) via ARB_texture_view or ARB_shader_image_load_store. We want
them to be laid out consistently so that we can just reinterpret the
memory with a different format.

In V1, this was done conditionally on a 'prefer_no_swizzle' flag which
was set in TexStorage/TextureView paths, but we need the same behavior
for ARB_shader_image_load_store (which also works with images created
via TexImage, so we don't want it to be conditional.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Eric Anholt <eric@anholt.net>
src/mesa/main/texformat.c