|
|
@ -689,10 +689,12 @@ u32 RasterizerOpenGL::SetupConstBuffers(Maxwell::ShaderStage stage, GLuint progr
|
|
|
|
glBindBuffer(GL_UNIFORM_BUFFER, 0);
|
|
|
|
glBindBuffer(GL_UNIFORM_BUFFER, 0);
|
|
|
|
|
|
|
|
|
|
|
|
// Now configure the bindpoint of the buffer inside the shader
|
|
|
|
// Now configure the bindpoint of the buffer inside the shader
|
|
|
|
std::string buffer_name = used_buffer.GetName();
|
|
|
|
const std::string buffer_name = used_buffer.GetName();
|
|
|
|
GLuint index = glGetProgramResourceIndex(program, GL_UNIFORM_BLOCK, buffer_name.c_str());
|
|
|
|
const GLuint index =
|
|
|
|
if (index != -1)
|
|
|
|
glGetProgramResourceIndex(program, GL_UNIFORM_BLOCK, buffer_name.c_str());
|
|
|
|
|
|
|
|
if (index != GL_INVALID_INDEX) {
|
|
|
|
glUniformBlockBinding(program, index, buffer_draw_state.bindpoint);
|
|
|
|
glUniformBlockBinding(program, index, buffer_draw_state.bindpoint);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
state.Apply();
|
|
|
|
state.Apply();
|
|
|
|