diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-06-20 07:00:38 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:39 +0200 |
commit | 218dedca1f8572bc0e43f8e7ea577f4ece28c4c2 (patch) | |
tree | aa3e02b6c5491661caa5a59df0ceff9194b4bd15 /src/video_core/renderer_opengl/gl_graphics_pipeline.h | |
parent | emit_glsl_special: Skip initialization of frag_color0 (diff) | |
download | yuzu-218dedca1f8572bc0e43f8e7ea577f4ece28c4c2.tar yuzu-218dedca1f8572bc0e43f8e7ea577f4ece28c4c2.tar.gz yuzu-218dedca1f8572bc0e43f8e7ea577f4ece28c4c2.tar.bz2 yuzu-218dedca1f8572bc0e43f8e7ea577f4ece28c4c2.tar.lz yuzu-218dedca1f8572bc0e43f8e7ea577f4ece28c4c2.tar.xz yuzu-218dedca1f8572bc0e43f8e7ea577f4ece28c4c2.tar.zst yuzu-218dedca1f8572bc0e43f8e7ea577f4ece28c4c2.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_graphics_pipeline.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_graphics_pipeline.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.h b/src/video_core/renderer_opengl/gl_graphics_pipeline.h index 58deafd3c..a3546daa8 100644 --- a/src/video_core/renderer_opengl/gl_graphics_pipeline.h +++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.h @@ -75,7 +75,9 @@ public: const std::array<const Shader::Info*, 5>& infos, const VideoCommon::TransformFeedbackState* xfb_state); - void Configure(bool is_indexed); + void Configure(bool is_indexed) { + configure_func(this, is_indexed); + } void ConfigureTransformFeedback() const { if (num_xfb_attribs != 0) { @@ -91,11 +93,21 @@ public: return is_built.load(std::memory_order::relaxed); } + template <typename Spec> + static auto MakeConfigureSpecFunc() { + return [](GraphicsPipeline* pipeline, bool is_indexed) { + pipeline->ConfigureImpl<Spec>(is_indexed); + }; + } + private: - void GenerateTransformFeedbackState(const VideoCommon::TransformFeedbackState& xfb_state); + template <typename Spec> + void ConfigureImpl(bool is_indexed); void ConfigureTransformFeedbackImpl() const; + void GenerateTransformFeedbackState(const VideoCommon::TransformFeedbackState& xfb_state); + TextureCache& texture_cache; BufferCache& buffer_cache; Tegra::MemoryManager& gpu_memory; @@ -103,6 +115,8 @@ private: ProgramManager& program_manager; StateTracker& state_tracker; + void (*configure_func)(GraphicsPipeline*, bool){}; + OGLProgram program; std::array<OGLAssemblyProgram, 5> assembly_programs; u32 enabled_stages_mask{}; |