anv: Implement write_buffer_cp callback

Rework: (Kevin)
 - Fix pointer arithmatic calculation.
 - Add assertion for a 4B alignment

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
This commit is contained in:
Sagar Ghuge
2024-05-17 22:26:22 -07:00
committed by Marge Bot
parent 8817ff26fc
commit b2cffdb1ed
4 changed files with 44 additions and 0 deletions
+11
View File
@@ -1544,3 +1544,14 @@ anv_cmd_buffer_restore_state(struct anv_cmd_buffer *cmd_buffer,
anv_CmdPushConstants2KHR(cmd_buffer_, &push_info);
}
}
void
anv_cmd_write_buffer_cp(VkCommandBuffer commandBuffer,
VkDeviceAddress dstAddr,
void *data,
uint32_t size)
{
ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
anv_genX(cmd_buffer->device->info, cmd_write_buffer_cp)(cmd_buffer, dstAddr,
data, size);
}