summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Ameer J2023-08-13 17:06:45 -0400
committerGravatar Ameer J2023-08-13 17:06:45 -0400
commitf9ef721ca6f2d562c0174fd091c4135877c7e371 (patch)
tree7b255971e432d9217998d6d9ef49f6ab0f101ac2 /src
parentMerge pull request #11202 from abouvier/vulkan-config (diff)
downloadyuzu-f9ef721ca6f2d562c0174fd091c4135877c7e371.tar.gz
yuzu-f9ef721ca6f2d562c0174fd091c4135877c7e371.tar.xz
yuzu-f9ef721ca6f2d562c0174fd091c4135877c7e371.zip
gl_graphics_pipeline: Fix GLASM storage buffer detection
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_graphics_pipeline.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
index f822fa856..c78bdf17c 100644
--- a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
+++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
@@ -220,7 +220,8 @@ GraphicsPipeline::GraphicsPipeline(const Device& device, TextureCache& texture_c
220 ASSERT(num_textures <= MAX_TEXTURES); 220 ASSERT(num_textures <= MAX_TEXTURES);
221 ASSERT(num_images <= MAX_IMAGES); 221 ASSERT(num_images <= MAX_IMAGES);
222 222
223 const bool assembly_shaders{assembly_programs[0].handle != 0}; 223 const auto backend = device.GetShaderBackend();
224 const bool assembly_shaders{backend == Settings::ShaderBackend::Glasm};
224 use_storage_buffers = 225 use_storage_buffers =
225 !assembly_shaders || num_storage_buffers <= device.GetMaxGLASMStorageBufferBlocks(); 226 !assembly_shaders || num_storage_buffers <= device.GetMaxGLASMStorageBufferBlocks();
226 writes_global_memory &= !use_storage_buffers; 227 writes_global_memory &= !use_storage_buffers;
@@ -230,7 +231,6 @@ GraphicsPipeline::GraphicsPipeline(const Device& device, TextureCache& texture_c
230 GenerateTransformFeedbackState(); 231 GenerateTransformFeedbackState();
231 } 232 }
232 const bool in_parallel = thread_worker != nullptr; 233 const bool in_parallel = thread_worker != nullptr;
233 const auto backend = device.GetShaderBackend();
234 auto func{[this, sources_ = std::move(sources), sources_spirv_ = std::move(sources_spirv), 234 auto func{[this, sources_ = std::move(sources), sources_spirv_ = std::move(sources_spirv),
235 shader_notify, backend, in_parallel, 235 shader_notify, backend, in_parallel,
236 force_context_flush](ShaderContext::Context*) mutable { 236 force_context_flush](ShaderContext::Context*) mutable {