| 440 | } |
| 441 | |
| 442 | auto daxa_cmd_clear_buffer(daxa_CommandRecorder self, daxa_BufferClearInfo const * info) -> daxa_Result |
| 443 | { |
| 444 | DAXA_CHECK_UNCOMPLETED(self) |
| 445 | daxa_cmd_flush_barriers(self); |
| 446 | DAXA_CHECK_AND_REMEMBER_IDS(self, info->buffer) |
| 447 | ImplBufferSlot const & dst_slot = self->device->slot(info->buffer); |
| 448 | bool const in_bounds = ((static_cast<u64>(info->offset) + static_cast<u64>(info->size)) <= static_cast<u64>(dst_slot.info.size)); |
| 449 | if (!in_bounds) |
| 450 | { |
| 451 | _DAXA_RETURN_IF_ERROR(DAXA_RESULT_ERROR_COPY_OUT_OF_BOUNDS, DAXA_RESULT_ERROR_COPY_OUT_OF_BOUNDS); |
| 452 | } |
| 453 | vkCmdFillBuffer( |
| 454 | self->command_arena->vk_command_buffer, |
| 455 | self->device->hot_slot(info->buffer).vk_buffer, |
| 456 | static_cast<VkDeviceSize>(info->offset), |
| 457 | static_cast<VkDeviceSize>(info->size), |
| 458 | info->clear_value); |
| 459 | return DAXA_RESULT_SUCCESS; |
| 460 | } |
| 461 | |
| 462 | auto daxa_cmd_clear_image(daxa_CommandRecorder self, daxa_ImageClearInfo const * info) -> daxa_Result |
| 463 | { |
nothing calls this directly
no test coverage detected