llvmpipe: Allocate more dummy sample functions for FORMAT_NONE
authorKonstantin Seurer <konstantin.seurer@gmail.com>
Tue, 4 Jul 2023 17:05:08 +0000 (19:05 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 5 Jul 2023 20:52:06 +0000 (20:52 +0000)
commit7b1a1e21632231baa3b386cf6be20a1bf8957708
tree61db62d7367759c79cc159d06e7aa04459ff0d97
parent91d090f0e7fe33c32238822388d2845cb28bf319
llvmpipe: Allocate more dummy sample functions for FORMAT_NONE

When a null texture is sampled with a non-null sampler, having only one
set of sample functions would lead to an OOB read.

Fixes test_null_srv (vkd3d-proton).

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23996>
src/gallium/drivers/llvmpipe/lp_texture_handle.c