diff options
author | ameerj <aj662@drexel.edu> | 2020-08-16 22:33:21 +0200 |
---|---|---|
committer | ameerj <aj662@drexel.edu> | 2020-08-16 22:33:21 +0200 |
commit | fde8102a415c546e88346258bf42de2a248113b1 (patch) | |
tree | 779cea4b53392250383420318a111b075621f48a /src/video_core/renderer_vulkan | |
parent | Morph: Update worker allocation comment (diff) | |
download | yuzu-fde8102a415c546e88346258bf42de2a248113b1.tar yuzu-fde8102a415c546e88346258bf42de2a248113b1.tar.gz yuzu-fde8102a415c546e88346258bf42de2a248113b1.tar.bz2 yuzu-fde8102a415c546e88346258bf42de2a248113b1.tar.lz yuzu-fde8102a415c546e88346258bf42de2a248113b1.tar.xz yuzu-fde8102a415c546e88346258bf42de2a248113b1.tar.zst yuzu-fde8102a415c546e88346258bf42de2a248113b1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | 7 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_graphics_pipeline.h | 2 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 5dc4cd5af..2e46c6278 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -78,15 +78,14 @@ VKGraphicsPipeline::VKGraphicsPipeline(const VKDevice& device, VKScheduler& sche const GraphicsPipelineCacheKey& key, vk::Span<VkDescriptorSetLayoutBinding> bindings, const SPIRVProgram& program) - : device{device}, scheduler{scheduler}, hash{key.Hash()}, cache_key{key}, + : device{device}, scheduler{scheduler}, cache_key{key}, hash{cache_key.Hash()}, descriptor_set_layout{CreateDescriptorSetLayout(bindings)}, descriptor_allocator{descriptor_pool, *descriptor_set_layout}, update_descriptor_queue{update_descriptor_queue}, layout{CreatePipelineLayout()}, descriptor_template{CreateDescriptorUpdateTemplate(program)}, modules{CreateShaderModules( program)}, - renderpass{renderpass_cache.GetRenderPass(key.renderpass_params)}, pipeline{CreatePipeline( - key.renderpass_params, - program)} {} + renderpass{renderpass_cache.GetRenderPass(cache_key.renderpass_params)}, + pipeline{CreatePipeline(cache_key.renderpass_params, program)} {} VKGraphicsPipeline::~VKGraphicsPipeline() = default; diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.h b/src/video_core/renderer_vulkan/vk_graphics_pipeline.h index 9d462db0a..58aa35efd 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.h +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.h @@ -94,8 +94,8 @@ private: const VKDevice& device; VKScheduler& scheduler; + const GraphicsPipelineCacheKey cache_key; const u64 hash; - GraphicsPipelineCacheKey cache_key; vk::DescriptorSetLayout descriptor_set_layout; DescriptorAllocator descriptor_allocator; diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 20ffbeb38..cfdcdd6ab 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -298,9 +298,9 @@ VKComputePipeline& VKPipelineCache::GetComputePipeline(const ComputePipelineCach } void VKPipelineCache::EmplacePipeline(std::unique_ptr<VKGraphicsPipeline> pipeline) { + system.GPU().ShaderNotify().MarkShaderComplete(); std::unique_lock lock{pipeline_cache}; graphics_cache.at(pipeline->GetCacheKey()) = std::move(pipeline); - system.GPU().ShaderNotify().MarkShaderComplete(); } void VKPipelineCache::OnShaderRemoval(Shader* shader) { |