radv: make sizes & offsets 32 bit in radv_descriptor_update_template_entry.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 13 Apr 2017 21:49:00 +0000 (23:49 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 14 Apr 2017 12:14:07 +0000 (14:14 +0200)
v2: Also convert the calculations.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
src/amd/vulkan/radv_descriptor_set.c
src/amd/vulkan/radv_private.h

index c048a4c7f531e65e03e0cf2def59e15c96feaa2a..f585061b4f49a9d352e94025d985b5d5060bbf58 100644 (file)
@@ -775,8 +775,8 @@ VkResult radv_CreateDescriptorUpdateTemplateKHR(VkDevice _device,
                const uint32_t buffer_offset = binding_layout->buffer_offset +
                        binding_layout->buffer_count * entry->dstArrayElement;
                const uint32_t *immutable_samplers = NULL;
-               uint16_t dst_offset;
-               uint16_t dst_stride;
+               uint32_t dst_offset;
+               uint32_t dst_stride;
 
                /* dst_offset is an offset into dynamic_descriptors when the descriptor
                   is dynamic, and an offset into mapped_ptr otherwise */
index 00190e7eee0d47ca7d5c5f8f9c328124608f67b6..2afc0cbedfc01bc1f209173940c5e79aa3c214b3 100644 (file)
@@ -576,16 +576,16 @@ struct radv_descriptor_update_template_entry {
        VkDescriptorType descriptor_type;
 
        /* The number of descriptors to update */
-       uint16_t descriptor_count;
+       uint32_t descriptor_count;
 
        /* Into mapped_ptr or dynamic_descriptors, in units of the respective array */
-       uint16_t dst_offset;
+       uint32_t dst_offset;
 
        /* In dwords. Not valid/used for dynamic descriptors */
-       uint16_t dst_stride;
+       uint32_t dst_stride;
 
-       uint16_t buffer_offset;
-       uint16_t buffer_count;
+       uint32_t buffer_offset;
+       uint32_t buffer_count;
 
        /* Only valid for combined image samplers and samplers */
        uint16_t has_sampler;