diff options
author | Bas Nieuwenhuizen <[email protected]> | 2020-04-08 13:53:47 +0200 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2020-04-09 14:23:55 -0700 |
commit | 019bb88019bf5f9cdb7b1574fdf0c82fdeeec1ac (patch) | |
tree | 65783b508f77edc8cab9d391e617af49bf29c9ea /src/amd | |
parent | abdb320af446226e23ccb1f0b6a271d19596e2a9 (diff) |
radv: Use correct buffer count with variable descriptor set sizes.
Fixes dEQP-VK.binding_model.descriptorset_random.sets16.noarray.ubolimitlow.sbolimitlow.imglimitlow.iublimitlow.frag.ialimitlow.0
CC: <[email protected]>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2607
Reviewed-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4489>
(cherry picked from commit a7e2efa7c95b78373d8a4b7b88ceb7b3769e6eaa)
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 2 | ||||
-rw-r--r-- | src/amd/vulkan/radv_descriptor_set.c | 1 | ||||
-rw-r--r-- | src/amd/vulkan/radv_private.h | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index f0067b6ed1d..4069ca5343f 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -3513,7 +3513,7 @@ radv_bind_descriptor_set(struct radv_cmd_buffer *cmd_buffer, assert(!(set->layout->flags & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR)); if (!cmd_buffer->device->use_global_bo_list) { - for (unsigned j = 0; j < set->layout->buffer_count; ++j) + for (unsigned j = 0; j < set->buffer_count; ++j) if (set->descriptors[j]) radv_cs_add_buffer(ws, cmd_buffer->cs, set->descriptors[j]); } diff --git a/src/amd/vulkan/radv_descriptor_set.c b/src/amd/vulkan/radv_descriptor_set.c index 473503b9789..33947ea3726 100644 --- a/src/amd/vulkan/radv_descriptor_set.c +++ b/src/amd/vulkan/radv_descriptor_set.c @@ -512,6 +512,7 @@ radv_descriptor_set_create(struct radv_device *device, } set->layout = layout; + set->buffer_count = buffer_count; uint32_t layout_size = layout->size; if (variable_count) { assert(layout->has_variable_descriptors); diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index ca7d9a084f5..d1785f39de9 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -878,6 +878,7 @@ struct radv_descriptor_range { struct radv_descriptor_set { const struct radv_descriptor_set_layout *layout; uint32_t size; + uint32_t buffer_count; struct radeon_winsys_bo *bo; uint64_t va; |