v3d/tex: avoid to ask back for a sampler state if not needed
authorAlejandro Piñeiro <apinheiro@igalia.com>
Mon, 22 Jun 2020 23:52:48 +0000 (01:52 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:31 +0000 (21:21 +0000)
commitb9dd7e30a69d1ae8fabc0ae7133021b5b4c22bab
tree1796fc762d85125c4a73c19d3d8ebec9328c5292
parent0dbf04086341574e5f2f5e72aab6c94a07609cfe
v3d/tex: avoid to ask back for a sampler state if not needed

So far we were not asking the driver for the sampler state if we could
just use the default P1 values. But even if we need to fill P1 (for
example to fill up the output type of the format), if the texture
operation doesn't need a sampler, we can let that field as NULL (so
default values) and avoid calling back the driver for a sampler.

This is not mandatory for OpenGL (as we always have a sampler object),
although still a good to have. For Vulkan this is needed, as we don't
have a sampler object in that case.

v2: reword comment (Eric)

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