mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 08:30:10 +01:00
radv: add some asserts for descriptor updating
let's avoid any further issues with descriptor sizing Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12620>
This commit is contained in:
parent
ec44c48945
commit
7aef59ccd2
1 changed files with 3 additions and 0 deletions
|
|
@ -966,6 +966,7 @@ write_buffer_descriptor(struct radv_device *device, struct radv_cmd_buffer *cmd_
|
|||
|
||||
if (buffer_info->range == VK_WHOLE_SIZE)
|
||||
range = buffer->size - buffer_info->offset;
|
||||
assert(buffer->size > 0 && range > 0);
|
||||
|
||||
/* robustBufferAccess is relaxed enough to allow this (in combination
|
||||
* with the alignment/size we return from vkGetBufferMemoryRequirements)
|
||||
|
|
@ -1028,6 +1029,7 @@ write_dynamic_buffer_descriptor(struct radv_device *device, struct radv_descript
|
|||
|
||||
if (buffer_info->range == VK_WHOLE_SIZE)
|
||||
size = buffer->size - buffer_info->offset;
|
||||
assert(buffer->size > 0 && size > 0);
|
||||
|
||||
/* robustBufferAccess is relaxed enough to allow this (in combination
|
||||
* with the alignment/size we return from vkGetBufferMemoryRequirements)
|
||||
|
|
@ -1062,6 +1064,7 @@ write_image_descriptor(struct radv_device *device, struct radv_cmd_buffer *cmd_b
|
|||
} else {
|
||||
descriptor = &iview->descriptor;
|
||||
}
|
||||
assert(size > 0);
|
||||
|
||||
memcpy(dst, descriptor, size);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue