MCPcopy Create free account
hub / github.com/Ipotrick/Daxa / request_persistent_image_clear

Method request_persistent_image_clear

src/utils/impl_task_graph.cpp:1237–1256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1235 }
1236
1237 void TaskGraph::request_persistent_image_clear(TaskImageView const & task_image)
1238 {
1239 ImplTaskGraph & impl = *reinterpret_cast<ImplTaskGraph *>(this->object);
1240
1241 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.");
1242
1243 u32 const resource_index = validate_and_translate_view(impl, task_image).index;
1244 ImplTaskResource & resource = impl.resources[resource_index];
1245
1246 if (resource.clear_request_index == ~0u)
1247 {
1248 u32 const clear_request_index = impl.resource_clear_request_count;
1249 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!");
1250
1251 impl.resource_clear_requests[clear_request_index] = { &resource, resource_index };
1252 resource.clear_request_index = clear_request_index;
1253
1254 impl.resource_clear_request_count += 1;
1255 }
1256 }
1257
1258 auto initialize_attachment_ids(ImplTaskGraph & impl, ImplTask & task)
1259 {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45

Tested by

no test coverage detected