Avoid using a shared_ptr reference to cycle for command buffer submission

Somehow without this we can sometimes get crashes during appending to circular queue
This commit is contained in:
Billy Laws 2022-10-09 13:14:04 +01:00
parent 0428e8c7da
commit 34db5097da
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ namespace skyline::gpu {
return {pool->buffers.emplace_back(gpu.vkDevice, commandBuffer, pool->vkCommandPool)};
}
void CommandScheduler::SubmitCommandBuffer(const vk::raii::CommandBuffer &commandBuffer, const std::shared_ptr<FenceCycle> &cycle) {
void CommandScheduler::SubmitCommandBuffer(const vk::raii::CommandBuffer &commandBuffer, std::shared_ptr<FenceCycle> cycle) {
{
std::scoped_lock lock(gpu.queueMutex);
gpu.vkQueue.submit(vk::SubmitInfo{

View File

@ -114,7 +114,7 @@ namespace skyline::gpu {
* @note The supplied command buffer and cycle **must** be from AllocateCommandBuffer()
* @note Any cycle submitted via this method does not need to destroy dependencies manually, the waiter thread will handle this
*/
void SubmitCommandBuffer(const vk::raii::CommandBuffer &commandBuffer, const std::shared_ptr<FenceCycle> &cycle);
void SubmitCommandBuffer(const vk::raii::CommandBuffer &commandBuffer, std::shared_ptr<FenceCycle> cycle);
/**
* @brief Submits a command buffer recorded with the supplied function synchronously