aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl/gl_device.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-06-02 14:58:50 -0400
committerGitHub <noreply@github.com>2020-06-02 14:58:50 -0400
commit597d8b4bd457ff0aa1293ff4ac7761e2eefc9150 (patch)
treef16a61443b947bf5cc336d51e32111c8f67eb6b3 /src/video_core/renderer_opengl/gl_device.h
parent9a0c1456e3a1d54abf73a6b0a3d68652e9ec620b (diff)
parentee21e4ecd372d6a191244dffbc5ac5c7b80150c1 (diff)
Merge pull request #4006 from ReinUsesLisp/squash-ubos
glsl: Squash constant buffers into a single SSBO when we hit the limit
Diffstat (limited to 'src/video_core/renderer_opengl/gl_device.h')
-rw-r--r--src/video_core/renderer_opengl/gl_device.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.h b/src/video_core/renderer_opengl/gl_device.h
index 683ed9002..98cca0254 100644
--- a/src/video_core/renderer_opengl/gl_device.h
+++ b/src/video_core/renderer_opengl/gl_device.h
@@ -24,6 +24,10 @@ public:
explicit Device();
explicit Device(std::nullptr_t);
+ u32 GetMaxUniformBuffers(Tegra::Engines::ShaderType shader_type) const noexcept {
+ return max_uniform_buffers[static_cast<std::size_t>(shader_type)];
+ }
+
const BaseBindings& GetBaseBindings(std::size_t stage_index) const noexcept {
return base_bindings[stage_index];
}
@@ -92,7 +96,8 @@ private:
static bool TestVariableAoffi();
static bool TestPreciseBug();
- std::array<BaseBindings, Tegra::Engines::MaxShaderTypes> base_bindings;
+ std::array<u32, Tegra::Engines::MaxShaderTypes> max_uniform_buffers{};
+ std::array<BaseBindings, Tegra::Engines::MaxShaderTypes> base_bindings{};
std::size_t uniform_buffer_alignment{};
std::size_t shader_storage_alignment{};
u32 max_vertex_attributes{};