Skip to content

Commit

Permalink
hotfix: descriptor set lifetime fix
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelthegreat committed Sep 26, 2024
1 parent 50fc5e3 commit cf342e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/video_core/texture_cache/tile_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,12 @@ TileManager::TileManager(const Vulkan::Instance& instance, Vulkan::Scheduler& sc
.bindingCount = static_cast<u32>(bindings.size()),
.pBindings = bindings.data(),
};
auto [desc_layout_result, desc_layout] =
auto desc_layout_result =
instance.GetDevice().createDescriptorSetLayoutUnique(desc_layout_ci);
ASSERT_MSG(desc_layout_result == vk::Result::eSuccess,
"Failed to create descriptor set layout: {}", vk::to_string(desc_layout_result));
ASSERT_MSG(desc_layout_result.result == vk::Result::eSuccess,
"Failed to create descriptor set layout: {}",
vk::to_string(desc_layout_result.result));
desc_layout = std::move(desc_layout_result.value);

const vk::PushConstantRange push_constants = {
.stageFlags = vk::ShaderStageFlagBits::eCompute,
Expand Down
1 change: 1 addition & 0 deletions src/video_core/texture_cache/tile_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class TileManager {
private:
const Vulkan::Instance& instance;
Vulkan::Scheduler& scheduler;
vk::UniqueDescriptorSetLayout desc_layout;
std::array<DetilerContext, DetilerType::Max> detilers;
};

Expand Down

0 comments on commit cf342e7

Please sign in to comment.