summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_device.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_opengl/gl_device.h')
-rw-r--r--src/video_core/renderer_opengl/gl_device.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.h b/src/video_core/renderer_opengl/gl_device.h
index 6c86fe207..e7d3c48b0 100644
--- a/src/video_core/renderer_opengl/gl_device.h
+++ b/src/video_core/renderer_opengl/gl_device.h
@@ -6,14 +6,32 @@
#include <cstddef>
#include "common/common_types.h"
+#include "video_core/engines/shader_type.h"
namespace OpenGL {
-class Device {
+static constexpr u32 EmulationUniformBlockBinding = 0;
+
+class Device final {
public:
+ struct BaseBindings final {
+ u32 uniform_buffer{};
+ u32 shader_storage_buffer{};
+ u32 sampler{};
+ u32 image{};
+ };
+
explicit Device();
explicit Device(std::nullptr_t);
+ const BaseBindings& GetBaseBindings(std::size_t stage_index) const noexcept {
+ return base_bindings[stage_index];
+ }
+
+ const BaseBindings& GetBaseBindings(Tegra::Engines::ShaderType shader_type) const noexcept {
+ return GetBaseBindings(static_cast<std::size_t>(shader_type));
+ }
+
std::size_t GetUniformBufferAlignment() const {
return uniform_buffer_alignment;
}
@@ -67,6 +85,7 @@ private:
static bool TestComponentIndexingBug();
static bool TestPreciseBug();
+ std::array<BaseBindings, Tegra::Engines::MaxShaderTypes> base_bindings;
std::size_t uniform_buffer_alignment{};
std::size_t shader_storage_alignment{};
u32 max_vertex_attributes{};