From 442a1cc0211131cb237b5291fd49dbd2f37399e9 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sat, 2 Nov 2019 13:19:07 -0300 Subject: gl_rasterizer: Re-enable stream buffer memory due to global memory Global memory is still using the stream buffer when it shouldn't. As a temporary fix re-enable the stream buffer on compute. --- src/video_core/renderer_opengl/gl_rasterizer.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'src') 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(); -- cgit v1.2.3