summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_graphics_pipeline.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-04-01 06:36:22 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:25 +0200
commit2fc698b040e7e25223ba6ebe31abb04b1fc65f06 (patch)
treedad5321dd5fd829a6493dd3f26b7c18bc6ec08ca /src/video_core/renderer_vulkan/vk_graphics_pipeline.h
parentshader: Fix dependency on identity removal pass (diff)
downloadyuzu-2fc698b040e7e25223ba6ebe31abb04b1fc65f06.tar
yuzu-2fc698b040e7e25223ba6ebe31abb04b1fc65f06.tar.gz
yuzu-2fc698b040e7e25223ba6ebe31abb04b1fc65f06.tar.bz2
yuzu-2fc698b040e7e25223ba6ebe31abb04b1fc65f06.tar.lz
yuzu-2fc698b040e7e25223ba6ebe31abb04b1fc65f06.tar.xz
yuzu-2fc698b040e7e25223ba6ebe31abb04b1fc65f06.tar.zst
yuzu-2fc698b040e7e25223ba6ebe31abb04b1fc65f06.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_vulkan/vk_graphics_pipeline.h31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.h b/src/video_core/renderer_vulkan/vk_graphics_pipeline.h
index ba1d34a83..4e0583157 100644
--- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.h
+++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.h
@@ -5,13 +5,15 @@
#pragma once
#include <array>
+#include <atomic>
+#include "common/thread_worker.h"
#include "shader_recompiler/shader_info.h"
#include "video_core/engines/maxwell_3d.h"
#include "video_core/renderer_vulkan/fixed_pipeline_state.h"
+#include "video_core/renderer_vulkan/vk_buffer_cache.h"
#include "video_core/renderer_vulkan/vk_descriptor_pool.h"
#include "video_core/renderer_vulkan/vk_texture_cache.h"
-#include "video_core/renderer_vulkan/vk_buffer_cache.h"
#include "video_core/vulkan_common/vulkan_wrapper.h"
namespace Vulkan {
@@ -25,34 +27,34 @@ class GraphicsPipeline {
static constexpr size_t NUM_STAGES = Tegra::Engines::Maxwell3D::Regs::MaxShaderStage;
public:
- explicit GraphicsPipeline() = default;
explicit GraphicsPipeline(Tegra::Engines::Maxwell3D& maxwell3d,
Tegra::MemoryManager& gpu_memory, VKScheduler& scheduler,
- BufferCache& buffer_cache,
- TextureCache& texture_cache, const Device& device, VKDescriptorPool& descriptor_pool,
+ BufferCache& buffer_cache, TextureCache& texture_cache,
+ const Device& device, VKDescriptorPool& descriptor_pool,
VKUpdateDescriptorQueue& update_descriptor_queue,
+ Common::ThreadWorker* worker_thread,
RenderPassCache& render_pass_cache, const FixedPipelineState& state,
std::array<vk::ShaderModule, NUM_STAGES> stages,
const std::array<const Shader::Info*, NUM_STAGES>& infos);
void Configure(bool is_indexed);
- GraphicsPipeline& operator=(GraphicsPipeline&&) noexcept = default;
- GraphicsPipeline(GraphicsPipeline&&) noexcept = default;
+ GraphicsPipeline& operator=(GraphicsPipeline&&) noexcept = delete;
+ GraphicsPipeline(GraphicsPipeline&&) noexcept = delete;
GraphicsPipeline& operator=(const GraphicsPipeline&) = delete;
GraphicsPipeline(const GraphicsPipeline&) = delete;
private:
- void MakePipeline(const Device& device, const FixedPipelineState& state,
- VkRenderPass render_pass);
+ void MakePipeline(const Device& device, VkRenderPass render_pass);
- Tegra::Engines::Maxwell3D* maxwell3d{};
- Tegra::MemoryManager* gpu_memory{};
- TextureCache* texture_cache{};
- BufferCache* buffer_cache{};
- VKScheduler* scheduler{};
- VKUpdateDescriptorQueue* update_descriptor_queue{};
+ Tegra::Engines::Maxwell3D& maxwell3d;
+ Tegra::MemoryManager& gpu_memory;
+ TextureCache& texture_cache;
+ BufferCache& buffer_cache;
+ VKScheduler& scheduler;
+ VKUpdateDescriptorQueue& update_descriptor_queue;
+ const FixedPipelineState state;
std::array<vk::ShaderModule, NUM_STAGES> spv_modules;
std::array<Shader::Info, NUM_STAGES> stage_infos;
@@ -61,6 +63,7 @@ private:
vk::PipelineLayout pipeline_layout;
vk::DescriptorUpdateTemplateKHR descriptor_update_template;
vk::Pipeline pipeline;
+ std::atomic_flag building_flag{};
};
} // namespace Vulkan