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.
This commit is contained in:
ReinUsesLisp 2021-05-18 21:07:18 -03:00 committed by ameerj
parent e8ed904805
commit 85fc7e584e

View file

@ -240,6 +240,17 @@ void GraphicsProgram::Configure(bool is_indexed) {
buffer_cache.UpdateGraphicsBuffers(is_indexed); buffer_cache.UpdateGraphicsBuffers(is_indexed);
buffer_cache.BindHostGeometryBuffers(is_indexed); buffer_cache.BindHostGeometryBuffers(is_indexed);
// FIXME: Unhack this
if (assembly_programs[0].handle != 0) {
// TODO: State track this
glEnable(GL_VERTEX_PROGRAM_NV);
glEnable(GL_FRAGMENT_PROGRAM_NV);
glBindProgramARB(GL_VERTEX_PROGRAM_NV, assembly_programs[0].handle);
glBindProgramARB(GL_FRAGMENT_PROGRAM_NV, assembly_programs[4].handle);
program_manager.BindProgram(0);
} else {
program_manager.BindProgram(program.handle);
}
const ImageId* views_it{image_view_ids.data()}; const ImageId* views_it{image_view_ids.data()};
GLsizei texture_binding = 0; GLsizei texture_binding = 0;
GLsizei image_binding = 0; GLsizei image_binding = 0;