summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-11-02 17:19:07 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-11-02 17:19:19 +0100
commit442a1cc0211131cb237b5291fd49dbd2f37399e9 (patch)
treef906af06d2bfac00d8a733e114c0ea5717ee2abf /src
parentgl_rasterizer: Upload constant buffers with glNamedBufferSubData (diff)
downloadyuzu-442a1cc0211131cb237b5291fd49dbd2f37399e9.tar
yuzu-442a1cc0211131cb237b5291fd49dbd2f37399e9.tar.gz
yuzu-442a1cc0211131cb237b5291fd49dbd2f37399e9.tar.bz2
yuzu-442a1cc0211131cb237b5291fd49dbd2f37399e9.tar.lz
yuzu-442a1cc0211131cb237b5291fd49dbd2f37399e9.tar.xz
yuzu-442a1cc0211131cb237b5291fd49dbd2f37399e9.tar.zst
yuzu-442a1cc0211131cb237b5291fd49dbd2f37399e9.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 28fa8a8be..e9abd901e 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -575,11 +575,9 @@ void RasterizerOpenGL::DrawPrelude() {
(sizeof(GLShader::MaxwellUniformData) + device.GetUniformBufferAlignment()) *
Maxwell::MaxShaderStage;
- if (!device.HasFastBufferSubData()) {
- // Add space for at least 18 constant buffers
- buffer_size += Maxwell::MaxConstBuffers *
- (Maxwell::MaxConstBufferSize + device.GetUniformBufferAlignment());
- }
+ // Add space for at least 18 constant buffers
+ buffer_size += Maxwell::MaxConstBuffers *
+ (Maxwell::MaxConstBufferSize + device.GetUniformBufferAlignment());
// Prepare the vertex array.
buffer_cache.Map(buffer_size);
@@ -743,12 +741,10 @@ void RasterizerOpenGL::DispatchCompute(GPUVAddr code_addr) {
state.draw.shader_program = program;
state.draw.program_pipeline = 0;
- if (!device.HasFastBufferSubData()) {
- const std::size_t buffer_size =
- Tegra::Engines::KeplerCompute::NumConstBuffers *
- (Maxwell::MaxConstBufferSize + device.GetUniformBufferAlignment());
- buffer_cache.Map(buffer_size);
- }
+ const std::size_t buffer_size =
+ Tegra::Engines::KeplerCompute::NumConstBuffers *
+ (Maxwell::MaxConstBufferSize + device.GetUniformBufferAlignment());
+ buffer_cache.Map(buffer_size);
bind_ubo_pushbuffer.Setup(0);
bind_ssbo_pushbuffer.Setup(0);
@@ -756,9 +752,7 @@ void RasterizerOpenGL::DispatchCompute(GPUVAddr code_addr) {
SetupComputeConstBuffers(kernel);
SetupComputeGlobalMemory(kernel);
- if (!device.HasFastBufferSubData()) {
- buffer_cache.Unmap();
- }
+ buffer_cache.Unmap();
bind_ubo_pushbuffer.Bind();
bind_ssbo_pushbuffer.Bind();