| 1214 | } |
| 1215 | |
| 1216 | void TaskGraph::request_persistent_buffer_clear(TaskBufferView const & task_buffer) |
| 1217 | { |
| 1218 | ImplTaskGraph & impl = *reinterpret_cast<ImplTaskGraph *>(this->object); |
| 1219 | |
| 1220 | DAXA_DBG_ASSERT_TRUE_M(impl.compiled, "ERROR: Persistent resource clear requests can ONLY be done outside of graph recording. Hint: all persistent resources are automatically cleared before the first execution."); |
| 1221 | |
| 1222 | u32 const resource_index = validate_and_translate_view(impl, task_buffer).index; |
| 1223 | ImplTaskResource & resource = impl.resources[resource_index]; |
| 1224 | |
| 1225 | if (resource.clear_request_index == ~0u) |
| 1226 | { |
| 1227 | u32 const clear_request_index = impl.resource_clear_request_count; |
| 1228 | DAXA_DBG_ASSERT_TRUE_M(clear_request_index < impl.resource_clear_requests.size(), "IMPOSSIBLE CASE! THE CODE SHOULD BE SET UP IN A WAY THAT THE CLEAR REQUEST SPAN SIZE CAN NEVER BE EXCEEDED!"); |
| 1229 | |
| 1230 | impl.resource_clear_requests[clear_request_index] = { &resource, resource_index }; |
| 1231 | resource.clear_request_index = clear_request_index; |
| 1232 | |
| 1233 | impl.resource_clear_request_count += 1; |
| 1234 | } |
| 1235 | } |
| 1236 | |
| 1237 | void TaskGraph::request_persistent_image_clear(TaskImageView const & task_image) |
| 1238 | { |
nothing calls this directly
no test coverage detected