v3dv/descriptor_set: added support for samplers
authorAlejandro Piñeiro <apinheiro@igalia.com>
Sun, 29 Mar 2020 14:29:55 +0000 (16:29 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:29 +0000 (21:21 +0000)
commit272f0d9cfbd1c03c48c2ccdf8af6af967d0727f1
tree6795fa92dbf015ef48983e645ddbadb4824ff54c
parent34910532fd736f355e0659652073cf9f7f36c228
v3dv/descriptor_set: added support for samplers

This include SAMPLER, COMBINED_IMAGE_SAMPLER and SAMPLED_IMAGE
descriptors.

In order to support them we do the pre-packing of TEXTURE_SHADER_STATE
and SAMPLER_STATE when Images and Samplers (respectively) are
created. Those packets doesn't need to be tweaked later, so we upload
them to an bo.

A possible improvement of this would be that the descriptor pool
manages a bo for all descriptors, that suballocate for each descriptor
allocated. This is what other drivers do (and as far as I understand,
one of the reasons of having a descriptor pool).

Immutable samplers are not supported, will be handled on a following
patch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
src/broadcom/vulkan/v3dv_descriptor_set.c
src/broadcom/vulkan/v3dv_device.c
src/broadcom/vulkan/v3dv_image.c
src/broadcom/vulkan/v3dv_private.h
src/broadcom/vulkan/v3dv_uniforms.c