aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl/gl_rasterizer.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-15 16:30:57 -0400
committerGitHub <noreply@github.com>2018-04-15 16:30:57 -0400
commitd6d7d0989cf7d3bcad5cdf8bcb8f61f09f64c4fa (patch)
tree52cd14229ce3185f28fb952a3c09e4a1c87dab66 /src/video_core/renderer_opengl/gl_rasterizer.h
parentb8825fbf10c3122309313a959a93b20baa94ec2f (diff)
parent477aab59603825e3cfc5144b784d0fe3df286ae4 (diff)
Merge pull request #337 from Subv/used_buffers
GPU: Don't use explicit binding points when uploading the constbuffers to opengl
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h
index 1ea0dfa71..548ce0453 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer.h
@@ -87,9 +87,17 @@ 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(Tegra::Engines::Maxwell3D::Regs::ShaderStage stage,
- const std::vector<GLShader::ConstBufferEntry>& entries);
+ /*
+ * Configures the current constbuffers to use for the draw command.
+ * @param stage The shader stage to configure buffers for.
+ * @param program The OpenGL program object that contains the specified stage.
+ * @param current_bindpoint The offset at which to start counting new buffer bindpoints.
+ * @param entries Vector describing the buffers that are actually used in the guest shader.
+ * @returns The next available bindpoint for use in the next shader stage.
+ */
+ u32 SetupConstBuffers(Tegra::Engines::Maxwell3D::Regs::ShaderStage stage, GLuint program,
+ u32 current_bindpoint,
+ const std::vector<GLShader::ConstBufferEntry>& entries);
/// Syncs the viewport to match the guest state
void SyncViewport(const MathUtil::Rectangle<u32>& surfaces_rect, u16 res_scale);