cso: fix broken optimization for sampler state lookups
authorMarek Olšák <marek.olsak@amd.com>
Sun, 7 Aug 2022 23:59:48 +0000 (19:59 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 19 Oct 2022 04:56:55 +0000 (04:56 +0000)
commit94240f561c8665fba780ac7c1a68bf076de64231
treed466ab2f570636e9ef8fb43f15e7d325d5dd55f8
parent224735abaf9352249df0902c442115ead304921d
cso: fix broken optimization for sampler state lookups

Since the key size wasn't a constant expression, all the function inlining
didn't do much. This makes it a constant expression.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: c4e18cd4dd1 - mesa/st: add PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_FREEDRENO
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19129>
src/gallium/auxiliary/cso_cache/cso_context.c