panvk: Round FillBuffer sizes down to a multiple of 4
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16276>
This commit is contained in:
parent
ad05bc9315
commit
5ef9bd5ff2
|
@ -11,6 +11,7 @@ include = [
|
|||
"dEQP-VK.api.command_buffers.render_pass_continue",
|
||||
"dEQP-VK.api.command_buffers.render_pass_continue_no_fb",
|
||||
"dEQP-VK.api.copy_and_blit.core.*",
|
||||
"dEQP-VK.api.fill_and_update_buffer.suballocation.*",
|
||||
"dEQP-VK.binding_model.descriptor_copy.compute.*",
|
||||
"dEQP-VK.compute.builtin_var.*",
|
||||
"dEQP-VK.draw.renderpass.instanced.draw_indexed_vk_*",
|
||||
|
|
|
@ -2000,6 +2000,16 @@ panvk_meta_fill_buf(struct panvk_cmd_buffer *cmdbuf,
|
|||
};
|
||||
size = panvk_buffer_range(dst, offset, size);
|
||||
|
||||
/* From the Vulkan spec:
|
||||
*
|
||||
* "size is the number of bytes to fill, and must be either a multiple
|
||||
* of 4, or VK_WHOLE_SIZE to fill the range from offset to the end of
|
||||
* the buffer. If VK_WHOLE_SIZE is used and the remaining size of the
|
||||
* buffer is not a multiple of 4, then the nearest smaller multiple is
|
||||
* used."
|
||||
*/
|
||||
size &= ~3ull;
|
||||
|
||||
assert(!(offset & 3) && !(size & 3));
|
||||
|
||||
unsigned nwords = size / sizeof(uint32_t);
|
||||
|
|
Loading…
Reference in New Issue