mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
hk: Use aligned vector fill in hk_CmdFillBuffer if possible
30% faster with 16KB buffers, more than twice as fast with 8MB and larger buffers. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39780>
This commit is contained in:
parent
5c2d62c030
commit
651a321ee2
1 changed files with 6 additions and 1 deletions
|
|
@ -1493,7 +1493,12 @@ hk_CmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer,
|
|||
uint64_t addr =
|
||||
vk_meta_buffer_address(&dev->vk, dstBuffer, dstOffset, dstRange);
|
||||
|
||||
libagx_fill(cmd, agx_1d(range / 4), AGX_BARRIER_ALL, addr, data);
|
||||
if (util_is_aligned(addr, 16) && util_is_aligned(range, 16)) {
|
||||
libagx_fill_uint4(cmd, agx_2d(range / 16, 1), AGX_BARRIER_ALL,
|
||||
addr, 0, data, data, data, data);
|
||||
} else {
|
||||
libagx_fill(cmd, agx_1d(range / 4), AGX_BARRIER_ALL, addr, data);
|
||||
}
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue