v3d/tex: Configuration Parameter 1 can be only skipped if P2 can be skipped too
authorAlejandro Piñeiro <apinheiro@igalia.com>
Mon, 20 Apr 2020 23:09:00 +0000 (01:09 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 22 Apr 2020 21:39:34 +0000 (23:39 +0200)
commit9967c26ae6c5afffd238a8c33b4e97457283a9ca
tree73e829f2a773aba5b8cde71ab3578e9e87e840cf
parentd0b644d9f9d9673d3fe28c8c200209f553adeda1
v3d/tex: Configuration Parameter 1 can be only skipped if P2 can be skipped too

Configuration Parameter packets 1 and 2 are pointed as optional, but
it is not clearly stated if you can skip only P1 when P2 is needed.

In the practice, it seems that the situation P0 - non-P1 - P2 can
causes problems, and at least on the simulator, it seems that sampler
info are attempted to be accessed. So let's just be conservative, and
only skip P1 configuration if we can skip P2 configuration too.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4677>
src/broadcom/compiler/v3d40_tex.c