mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +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.
(cherry picked from commit 651a321ee2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
This commit is contained in:
parent
1ce5b5b361
commit
3397d3995f
2 changed files with 7 additions and 2 deletions
|
|
@ -2904,7 +2904,7 @@
|
|||
"description": "hk: Use aligned vector fill in hk_CmdFillBuffer if possible",
|
||||
"nominated": false,
|
||||
"nomination_type": 0,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -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