virgl: obtain supported number of shader sampler views from host
authorGert Wollny <gert.wollny@collabora.com>
Wed, 3 Nov 2021 13:54:21 +0000 (14:54 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 8 Nov 2021 19:34:30 +0000 (19:34 +0000)
commit63c4c559cbce22102bdac695db1cb1bf229f68c3
tree7be245960edefb87c48aa1b19e4d0198fdcab21d
parent55e1dc8b6482c1c0d6a807abc684506488c4c6e7
virgl: obtain supported number of shader sampler views from host

Modern games may use more than 16 sampler views, so get what the host
actually supports, and default to 16 on old hosts that don't pass the
value.

Since the possible maximal value of PIPE_MAX_SHADER_SAMPLER_VIEWS doesn't
fit into an uint32_t remove the binding flags, they were only used for
releasing the sampler views, and this can be achieved differently.

v2: Fix compilation error

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: John Bates <jbates@chromium.org> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13646>
src/gallium/drivers/virgl/virgl_context.c
src/gallium/drivers/virgl/virgl_context.h
src/gallium/drivers/virgl/virgl_screen.c
src/gallium/drivers/virgl/virgl_winsys.h
src/virtio/virtio-gpu/virgl_hw.h