diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-05-30 07:57:42 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:34 +0200 |
commit | a7e9756671be5bb99566277709e5becdea774f34 (patch) | |
tree | 060a277d1150fb671c0365fb51490584939993b9 /src/video_core/renderer_opengl | |
parent | shader: Always initialize up reference in structure control flow (diff) | |
download | yuzu-a7e9756671be5bb99566277709e5becdea774f34.tar yuzu-a7e9756671be5bb99566277709e5becdea774f34.tar.gz yuzu-a7e9756671be5bb99566277709e5becdea774f34.tar.bz2 yuzu-a7e9756671be5bb99566277709e5becdea774f34.tar.lz yuzu-a7e9756671be5bb99566277709e5becdea774f34.tar.xz yuzu-a7e9756671be5bb99566277709e5becdea774f34.tar.zst yuzu-a7e9756671be5bb99566277709e5becdea774f34.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_graphics_pipeline.cpp | 4 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_graphics_pipeline.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp index 38ec88b13..976897067 100644 --- a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp +++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp @@ -100,6 +100,8 @@ GraphicsPipeline::GraphicsPipeline(const Device& device, TextureCache& texture_c base_uniform_bindings[stage + 1] += AccumulateCount(info.constant_buffer_descriptors); base_storage_bindings[stage + 1] += AccumulateCount(info.storage_buffers_descriptors); } + enabled_uniform_buffers[stage] = info.constant_buffer_mask; + const u32 num_tex_buffer_bindings{AccumulateCount(info.texture_buffer_descriptors)}; num_texture_buffers[stage] += num_tex_buffer_bindings; num_textures += num_tex_buffer_bindings; @@ -145,6 +147,7 @@ void GraphicsPipeline::Configure(bool is_indexed) { texture_cache.SynchronizeGraphicsDescriptors(); + buffer_cache.SetEnabledUniformBuffers(enabled_uniform_buffers); buffer_cache.runtime.SetBaseUniformBindings(base_uniform_bindings); buffer_cache.runtime.SetBaseStorageBindings(base_storage_bindings); buffer_cache.runtime.SetEnableStorageBuffers(use_storage_buffers); @@ -153,7 +156,6 @@ void GraphicsPipeline::Configure(bool is_indexed) { const bool via_header_index{regs.sampler_index == Maxwell::SamplerIndex::ViaHeaderIndex}; const auto config_stage{[&](size_t stage) { const Shader::Info& info{stage_infos[stage]}; - buffer_cache.SetEnabledUniformBuffers(stage, info.constant_buffer_mask); buffer_cache.UnbindGraphicsStorageBuffers(stage); if constexpr (Spec::has_storage_buffers) { size_t ssbo_index{}; diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.h b/src/video_core/renderer_opengl/gl_graphics_pipeline.h index c1113e180..bf33ce604 100644 --- a/src/video_core/renderer_opengl/gl_graphics_pipeline.h +++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.h @@ -99,6 +99,7 @@ private: u32 enabled_stages_mask{}; std::array<Shader::Info, 5> stage_infos{}; + std::array<u32, 5> enabled_uniform_buffers{}; std::array<u32, 5> base_uniform_bindings{}; std::array<u32, 5> base_storage_bindings{}; std::array<u32, 5> num_texture_buffers{}; |