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/shader | |
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 'src/video_core/shader')
-rw-r--r-- | src/video_core/shader/async_shaders.cpp | 9 | ||||
-rw-r--r-- | src/video_core/shader/async_shaders.h | 3 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/video_core/shader/async_shaders.cpp b/src/video_core/shader/async_shaders.cpp index 91d1b6bbd..6c19eaf07 100644 --- a/src/video_core/shader/async_shaders.cpp +++ b/src/video_core/shader/async_shaders.cpp @@ -128,7 +128,7 @@ void AsyncShaders::QueueOpenGLShader(const OpenGL::Device& device, .code_b = std::move(code_b), .main_offset = main_offset, .compiler_settings = compiler_settings, - .registry = ®istry, + .registry = registry, .cpu_address = cpu_addr, }; std::unique_lock lock(queue_mutex); @@ -144,7 +144,6 @@ void AsyncShaders::QueueVulkanShader(Vulkan::VKPipelineCache* pp_cache, std::vector<VkDescriptorSetLayoutBinding> bindings, Vulkan::SPIRVProgram program, Vulkan::GraphicsPipelineCacheKey key) { - WorkerParams params{ .backend = Backend::Vulkan, .pp_cache = pp_cache, @@ -186,11 +185,10 @@ void AsyncShaders::ShaderCompilerThread(Core::Frontend::GraphicsContext* context lock.unlock(); if (work.backend == Backend::OpenGL || work.backend == Backend::GLASM) { - VideoCommon::Shader::Registry registry = *work.registry; - const ShaderIR ir(work.code, work.main_offset, work.compiler_settings, registry); + const ShaderIR ir(work.code, work.main_offset, work.compiler_settings, *work.registry); const auto scope = context->Acquire(); auto program = - OpenGL::BuildShader(*work.device, work.shader_type, work.uid, ir, registry); + OpenGL::BuildShader(*work.device, work.shader_type, work.uid, ir, *work.registry); Result result{}; result.backend = work.backend; result.cpu_address = work.cpu_address; @@ -210,7 +208,6 @@ void AsyncShaders::ShaderCompilerThread(Core::Frontend::GraphicsContext* context finished_work.push_back(std::move(result)); } } else if (work.backend == Backend::Vulkan) { - auto pipeline = std::make_unique<Vulkan::VKGraphicsPipeline>( *work.vk_device, *work.scheduler, *work.descriptor_pool, *work.update_descriptor_queue, *work.renderpass_cache, work.key, work.bindings, diff --git a/src/video_core/shader/async_shaders.h b/src/video_core/shader/async_shaders.h index 5b58dd9bd..d5ae814d5 100644 --- a/src/video_core/shader/async_shaders.h +++ b/src/video_core/shader/async_shaders.h @@ -55,7 +55,6 @@ public: std::vector<u64> code; std::vector<u64> code_b; Tegra::Engines::ShaderType shader_type; - std::unique_ptr<Vulkan::VKGraphicsPipeline> pipeline; }; explicit AsyncShaders(Core::Frontend::EmuWindow& emu_window); @@ -110,7 +109,7 @@ private: std::vector<u64> code_b; u32 main_offset; VideoCommon::Shader::CompilerSettings compiler_settings; - const VideoCommon::Shader::Registry* registry; + std::optional<VideoCommon::Shader::Registry> registry; VAddr cpu_address; // For Vulkan |