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