mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 00:38:48 +02:00
radv: use radv_fill_memory() in the accel struct path
It's now possible to remove the NULL BO check. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34556>
This commit is contained in:
parent
6d70ec449f
commit
0fa43b5bfb
3 changed files with 7 additions and 5 deletions
|
|
@ -263,6 +263,9 @@ void radv_meta_decode_astc(struct radv_cmd_buffer *cmd_buffer, struct radv_image
|
|||
uint32_t radv_fill_buffer(struct radv_cmd_buffer *cmd_buffer, const struct radv_image *image,
|
||||
struct radeon_winsys_bo *bo, uint64_t va, uint64_t size, uint32_t value);
|
||||
|
||||
uint32_t radv_fill_memory(struct radv_cmd_buffer *cmd_buffer, const struct radv_image *image, uint64_t va,
|
||||
uint64_t size, uint32_t value);
|
||||
|
||||
void radv_copy_memory(struct radv_cmd_buffer *cmd_buffer, uint64_t src_va, uint64_t dst_va, uint64_t size);
|
||||
|
||||
void radv_cmd_buffer_clear_attachment(struct radv_cmd_buffer *cmd_buffer, const VkClearAttachment *attachment);
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ radv_compute_copy_memory(struct radv_cmd_buffer *cmd_buffer, uint64_t src_va, ui
|
|||
radv_meta_restore(&saved_state, cmd_buffer);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
uint32_t
|
||||
radv_fill_memory(struct radv_cmd_buffer *cmd_buffer, const struct radv_image *image, uint64_t va, uint64_t size,
|
||||
uint32_t value)
|
||||
{
|
||||
|
|
@ -220,8 +220,7 @@ radv_fill_buffer(struct radv_cmd_buffer *cmd_buffer, const struct radv_image *im
|
|||
{
|
||||
struct radv_device *device = radv_cmd_buffer_device(cmd_buffer);
|
||||
|
||||
if (bo)
|
||||
radv_cs_add_buffer(device->ws, cmd_buffer->cs, bo);
|
||||
radv_cs_add_buffer(device->ws, cmd_buffer->cs, bo);
|
||||
|
||||
return radv_fill_memory(cmd_buffer, image, va, size, value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -580,7 +580,7 @@ radv_init_update_scratch(VkCommandBuffer commandBuffer, VkDeviceAddress scratch,
|
|||
radv_get_scratch_layout(device, leaf_count, &layout);
|
||||
|
||||
/* Prepare ready counts for internal nodes */
|
||||
radv_fill_buffer(cmd_buffer, NULL, NULL, scratch + layout.internal_ready_count_offset,
|
||||
radv_fill_memory(cmd_buffer, NULL, scratch + layout.internal_ready_count_offset,
|
||||
layout.update_size - layout.internal_ready_count_offset, 0x0);
|
||||
}
|
||||
|
||||
|
|
@ -721,7 +721,7 @@ static void
|
|||
radv_cmd_fill_buffer_addr(VkCommandBuffer commandBuffer, VkDeviceAddress addr, VkDeviceSize size, uint32_t data)
|
||||
{
|
||||
VK_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
|
||||
radv_fill_buffer(cmd_buffer, NULL, NULL, addr, size, data);
|
||||
radv_fill_memory(cmd_buffer, NULL, addr, size, data);
|
||||
}
|
||||
|
||||
VkResult
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue