aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl/gl_rasterizer.h
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-04-14 11:50:15 -0500
committerSubv <subv2112@gmail.com>2018-04-14 23:02:05 -0500
commitc9b511da084bcf1655a7e844ee0d80e46ce681c9 (patch)
treef0c06f5bbcc0f8e7ea6d3681060c12936e887359 /src/video_core/renderer_opengl/gl_rasterizer.h
parent1957640ea25b34bec9e356a06dadf5937933c4ef (diff)
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.
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.h7
1 files changed, 6 insertions, 1 deletions
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<u32>& surfaces_rect, u16 res_scale);
@@ -129,7 +132,9 @@ private:
std::array<bool, 16> hw_vao_enabled_attributes;
std::array<SamplerInfo, GLShader::NumTextureSamplers> texture_samplers;
- std::array<std::array<OGLBuffer, 16>, 5> ssbos;
+ std::array<std::array<OGLBuffer, Tegra::Engines::Maxwell3D::Regs::MaxConstBuffers>,
+ Tegra::Engines::Maxwell3D::Regs::MaxShaderStage>
+ ssbos;
static constexpr size_t VERTEX_BUFFER_SIZE = 128 * 1024 * 1024;
std::unique_ptr<OGLStreamBuffer> vertex_buffer;