Mesa (main): panvk: Don't try to update samplers if they are immutable

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 27 13:54:43 UTC 2021


Module: Mesa
Branch: main
Commit: 498e5f44fa9b3195818b212505fe840777a1ebea
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=498e5f44fa9b3195818b212505fe840777a1ebea

Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date:   Tue Jul  6 11:14:13 2021 +0200

panvk: Don't try to update samplers if they are immutable

Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12019>

---

 src/panfrost/vulkan/panvk_descriptor_set.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/panfrost/vulkan/panvk_descriptor_set.c b/src/panfrost/vulkan/panvk_descriptor_set.c
index 1f4caa5994c..f0c415de0f4 100644
--- a/src/panfrost/vulkan/panvk_descriptor_set.c
+++ b/src/panfrost/vulkan/panvk_descriptor_set.c
@@ -666,9 +666,11 @@ panvk_write_descriptor_set(struct panvk_device *dev,
 
             if (pDescriptorWrite->descriptorType == VK_DESCRIPTOR_TYPE_SAMPLER ||
                 pDescriptorWrite->descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER) {
-               unsigned sampler = binding_layout->sampler_idx + dest_offset + i;
 
-               panvk_set_sampler_desc(&set->samplers[sampler], info);
+               if (binding_layout->immutable_samplers == NULL) {
+                  unsigned sampler = binding_layout->sampler_idx + dest_offset + i;
+                  panvk_set_sampler_desc(&set->samplers[sampler], info);
+               }
             }
 
             if (pDescriptorWrite->descriptorType == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE ||



More information about the mesa-commit mailing list