From 1957640ea25b34bec9e356a06dadf5937933c4ef Mon Sep 17 00:00:00 2001 From: Subv Date: Sat, 14 Apr 2018 11:45:23 -0500 Subject: GPU: Allow configuring ssbos in the opengl state manager. --- src/video_core/renderer_opengl/gl_rasterizer.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h') diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index 71c21c69b..527866e8a 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -129,6 +129,8 @@ private: std::array hw_vao_enabled_attributes; std::array texture_samplers; + std::array, 5> ssbos; + static constexpr size_t VERTEX_BUFFER_SIZE = 128 * 1024 * 1024; std::unique_ptr vertex_buffer; OGLBuffer uniform_buffer; -- cgit v1.2.3 From c9b511da084bcf1655a7e844ee0d80e46ce681c9 Mon Sep 17 00:00:00 2001 From: Subv Date: Sat, 14 Apr 2018 11:50:15 -0500 Subject: GPU: Upload the entirety of each constbuffer for each shader stage as SSBOs. We're going to need the shader generator to give us a mapping of the actual used const buffers to properly bind them to the shader. --- src/video_core/renderer_opengl/gl_rasterizer.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h') diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index 527866e8a..bf3308aef 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -87,6 +87,9 @@ private: /// Binds the required textures to OpenGL before drawing a batch. void BindTextures(); + /// Configures the current constbuffers to use for the draw command. + void SetupConstBuffers(); + /// Syncs the viewport to match the guest state void SyncViewport(const MathUtil::Rectangle& surfaces_rect, u16 res_scale); @@ -129,7 +132,9 @@ private: std::array hw_vao_enabled_attributes; std::array texture_samplers; - std::array, 5> ssbos; + std::array, + Tegra::Engines::Maxwell3D::Regs::MaxShaderStage> + ssbos; static constexpr size_t VERTEX_BUFFER_SIZE = 128 * 1024 * 1024; std::unique_ptr vertex_buffer; -- cgit v1.2.3