freedreno: reorder format check
authorFritz Koenig <frkoenig@google.com>
Thu, 5 Dec 2019 00:16:43 +0000 (16:16 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 6 Dec 2019 21:27:10 +0000 (21:27 +0000)
commitc496d442844183968f7c4903c8ed549aa990d15f
tree2f0d0f03466bd594e7cfaa5520ebf4129aafc309
parent21376cffb37018160ad3eef38b5a640ba1675a4f
freedreno: reorder format check

With the addition of the planar formats helper, the
planar formats no longer have a valid block.bits field.
Calling util_format_get_blocksize therefore asserts.

Reorder the check to see if the format is supported
before doing the query to get the blocksize.

Fixes: 20f132e5eff2d ("gallium/util: add planar format layouts and helpers")
Signed-off-by: Fritz Koenig <frkoenig@google.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
src/gallium/drivers/freedreno/a4xx/fd4_screen.c
src/gallium/drivers/freedreno/a5xx/fd5_screen.c
src/gallium/drivers/freedreno/a6xx/fd6_screen.c