summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-05-18 21:07:18 -0300
committerGravatar ameerj2021-07-22 21:51:32 -0400
commit85fc7e584ef9d64bae3269e7993bbf919bd10640 (patch)
tree21e7c0372b7011a1e9d915da8d7bfdd35dd793c8 /src
parentglasm: Implement gl_WorkGroupID (diff)
downloadyuzu-85fc7e584ef9d64bae3269e7993bbf919bd10640.tar.gz
yuzu-85fc7e584ef9d64bae3269e7993bbf919bd10640.tar.xz
yuzu-85fc7e584ef9d64bae3269e7993bbf919bd10640.zip
HACK: Bind stages before and after bindings
Works around a bug where program parameters are only applied to the current stage, and this one wasn't bound at the moment. Affects all SSBO usages on GLASM.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_graphics_program.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_graphics_program.cpp b/src/video_core/renderer_opengl/gl_graphics_program.cpp
index 7c0bf7bc8..4ac026502 100644
--- a/src/video_core/renderer_opengl/gl_graphics_program.cpp
+++ b/src/video_core/renderer_opengl/gl_graphics_program.cpp
@@ -240,6 +240,17 @@ void GraphicsProgram::Configure(bool is_indexed) {
240 buffer_cache.UpdateGraphicsBuffers(is_indexed); 240 buffer_cache.UpdateGraphicsBuffers(is_indexed);
241 buffer_cache.BindHostGeometryBuffers(is_indexed); 241 buffer_cache.BindHostGeometryBuffers(is_indexed);
242 242
243 // FIXME: Unhack this
244 if (assembly_programs[0].handle != 0) {
245 // TODO: State track this
246 glEnable(GL_VERTEX_PROGRAM_NV);
247 glEnable(GL_FRAGMENT_PROGRAM_NV);
248 glBindProgramARB(GL_VERTEX_PROGRAM_NV, assembly_programs[0].handle);
249 glBindProgramARB(GL_FRAGMENT_PROGRAM_NV, assembly_programs[4].handle);
250 program_manager.BindProgram(0);
251 } else {
252 program_manager.BindProgram(program.handle);
253 }
243 const ImageId* views_it{image_view_ids.data()}; 254 const ImageId* views_it{image_view_ids.data()};
244 GLsizei texture_binding = 0; 255 GLsizei texture_binding = 0;
245 GLsizei image_binding = 0; 256 GLsizei image_binding = 0;