diff options
| author | bunnei <bunneidev@gmail.com> | 2018-04-15 03:19:57 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-15 03:19:57 -0400 |
| commit | bb0c3fc828f63929a1eef9d0f75493fffb19b8bc (patch) | |
| tree | f0c06f5bbcc0f8e7ea6d3681060c12936e887359 /src/video_core/renderer_opengl/gl_rasterizer.h | |
| parent | 2b9a6b32816a627371e19e83a3735aa899e75740 (diff) | |
| parent | c9b511da084bcf1655a7e844ee0d80e46ce681c9 (diff) | |
Merge pull request #328 from Subv/constbuffers
GPU: Upload the shader Constant Buffers as SSBOs to the GPU
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index 71c21c69b..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,6 +132,10 @@ private: std::array<bool, 16> hw_vao_enabled_attributes; std::array<SamplerInfo, GLShader::NumTextureSamplers> texture_samplers; + 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; OGLBuffer uniform_buffer; |
