radv: Hash the immutable samplers.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 11 Apr 2017 22:40:36 +0000 (00:40 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 12 Apr 2017 05:43:38 +0000 (07:43 +0200)
Since the shader code can include them.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_descriptor_set.c

index ba5d5eb75e539fe192aa09c147d53a2dde3a80c4..c048a4c7f531e65e03e0cf2def59e15c96feaa2a 100644 (file)
@@ -214,6 +214,9 @@ VkResult radv_CreatePipelineLayout(
                layout->set[set].dynamic_offset_start = dynamic_offset_count;
                for (uint32_t b = 0; b < set_layout->binding_count; b++) {
                        dynamic_offset_count += set_layout->binding[b].array_size * set_layout->binding[b].dynamic_offset_count;
+                       if (set_layout->binding[b].immutable_samplers_offset)
+                               _mesa_sha1_update(&ctx, radv_immutable_samplers(set_layout, set_layout->binding + b),
+                                                 set_layout->binding[b].array_size * 4 * sizeof(uint32_t));
                }
                _mesa_sha1_update(&ctx, set_layout->binding,
                                  sizeof(set_layout->binding[0]) * set_layout->binding_count);