mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 08:50:09 +01:00
anv: Check for VK_WHOLE_SIZE in anv_CmdFillBuffer
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. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
6b21728c4a
commit
f17948a30a
1 changed files with 6 additions and 0 deletions
|
|
@ -1012,6 +1012,12 @@ void anv_CmdFillBuffer(
|
|||
|
||||
meta_clear_begin(&saved_state, cmd_buffer);
|
||||
|
||||
if (fillSize == VK_WHOLE_SIZE) {
|
||||
fillSize = dst_buffer->size - dstOffset;
|
||||
/* Make sure fillSize is a multiple of 4 */
|
||||
fillSize -= fillSize & 3;
|
||||
}
|
||||
|
||||
VkFormat format;
|
||||
int bs;
|
||||
if ((fillSize & 15) == 0 && (dstOffset & 15) == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue