Vulkan: Add reset method to resource access info.

Resource access info contains lists in a future setup the resource access info
will be kept in the VKContext and reused. This requires a reset function to
cleanup the instance for reuse.

Pull Request: https://projects.blender.org/blender/blender/pulls/120962
This commit is contained in:
Jeroen Bakker
2024-04-23 08:23:12 +02:00
parent edfba89d1e
commit 07dd09aa55
2 changed files with 11 additions and 0 deletions

View File

@@ -76,4 +76,10 @@ void VKResourceAccessInfo::build_links(VKResourceStateTracker &resources,
}
}
void VKResourceAccessInfo::reset()
{
images.clear();
buffers.clear();
}
} // namespace blender::gpu::render_graph

View File

@@ -49,6 +49,11 @@ struct VKResourceAccessInfo : NonCopyable {
* Extract read/write resource dependencies and add them to `node_links`.
*/
void build_links(VKResourceStateTracker &resources, VKRenderGraphNodeLinks &node_links) const;
/**
* Reset the instance for reuse.
*/
void reset();
};
} // namespace blender::gpu::render_graph