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.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.h b/src/video_core/renderer_opengl/gl_device.h
index 6c86fe207..d73b099d0 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;
}
@@ -58,15 +76,19 @@ public:
return has_precise_bug;
}
+ bool HasBrokenCompute() const {
+ return has_broken_compute;
+ }
+
bool HasFastBufferSubData() const {
return has_fast_buffer_sub_data;
}
private:
static bool TestVariableAoffi();
- 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{};
@@ -78,6 +100,7 @@ private:
bool has_variable_aoffi{};
bool has_component_indexing_bug{};
bool has_precise_bug{};
+ bool has_broken_compute{};
bool has_fast_buffer_sub_data{};
};