diff options
| author | 2019-06-01 17:41:55 -0300 | |
|---|---|---|
| committer | 2019-07-06 00:37:55 -0300 | |
| commit | 02ab8449349fa9bb6d4f8b8403fff84ed85790c7 (patch) | |
| tree | 240cff2aeb5d67e5fe8bc22f591a05280b82f0b5 /src | |
| parent | gl_buffer_cache: Implement flushing (diff) | |
| download | yuzu-02ab8449349fa9bb6d4f8b8403fff84ed85790c7.tar.gz yuzu-02ab8449349fa9bb6d4f8b8403fff84ed85790c7.tar.xz yuzu-02ab8449349fa9bb6d4f8b8403fff84ed85790c7.zip | |
gl_device: Query SSBO alignment
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_device.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_device.h | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index a48e14d2e..6238ddaaa 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp | |||
| @@ -24,6 +24,7 @@ T GetInteger(GLenum pname) { | |||
| 24 | 24 | ||
| 25 | Device::Device() { | 25 | Device::Device() { |
| 26 | uniform_buffer_alignment = GetInteger<std::size_t>(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT); | 26 | uniform_buffer_alignment = GetInteger<std::size_t>(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT); |
| 27 | shader_storage_alignment = GetInteger<std::size_t>(GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT); | ||
| 27 | max_vertex_attributes = GetInteger<u32>(GL_MAX_VERTEX_ATTRIBS); | 28 | max_vertex_attributes = GetInteger<u32>(GL_MAX_VERTEX_ATTRIBS); |
| 28 | max_varyings = GetInteger<u32>(GL_MAX_VARYING_VECTORS); | 29 | max_varyings = GetInteger<u32>(GL_MAX_VARYING_VECTORS); |
| 29 | has_variable_aoffi = TestVariableAoffi(); | 30 | has_variable_aoffi = TestVariableAoffi(); |
diff --git a/src/video_core/renderer_opengl/gl_device.h b/src/video_core/renderer_opengl/gl_device.h index 8c8c93760..939edb440 100644 --- a/src/video_core/renderer_opengl/gl_device.h +++ b/src/video_core/renderer_opengl/gl_device.h | |||
| @@ -18,6 +18,10 @@ public: | |||
| 18 | return uniform_buffer_alignment; | 18 | return uniform_buffer_alignment; |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | std::size_t GetShaderStorageBufferAlignment() const { | ||
| 22 | return shader_storage_alignment; | ||
| 23 | } | ||
| 24 | |||
| 21 | u32 GetMaxVertexAttributes() const { | 25 | u32 GetMaxVertexAttributes() const { |
| 22 | return max_vertex_attributes; | 26 | return max_vertex_attributes; |
| 23 | } | 27 | } |
| @@ -39,6 +43,7 @@ private: | |||
| 39 | static bool TestComponentIndexingBug(); | 43 | static bool TestComponentIndexingBug(); |
| 40 | 44 | ||
| 41 | std::size_t uniform_buffer_alignment{}; | 45 | std::size_t uniform_buffer_alignment{}; |
| 46 | std::size_t shader_storage_alignment{}; | ||
| 42 | u32 max_vertex_attributes{}; | 47 | u32 max_vertex_attributes{}; |
| 43 | u32 max_varyings{}; | 48 | u32 max_varyings{}; |
| 44 | bool has_variable_aoffi{}; | 49 | bool has_variable_aoffi{}; |