From d9f3fc4495e0d836d3c6b87ce9e0390db516bd2b Mon Sep 17 00:00:00 2001 From: degasus Date: Fri, 28 Dec 2012 17:06:08 +0100 Subject: [PATCH] fix ubo for intel cards (also amd?) --- Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp index 8f3378dca8..3c22a107fe 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp @@ -67,10 +67,10 @@ void ProgramShaderCache::SetProgramVariables(PCacheEntry &entry) // Driver Bug? Nvidia GTX 570, 290.xx Driver, Linux x64 if (g_ActiveConfig.backend_info.bSupportsGLSLUBO) { - glUniformBlockBinding(entry.prog_id, 0, 1); + glUniformBlockBinding(entry.prog_id, glGetUniformBlockIndex(entry.prog_id, "PSBlock"), 1); // Some things have no vertex shader if (entry.vsid != 0) - glUniformBlockBinding(entry.prog_id, 1, 2); + glUniformBlockBinding(entry.prog_id, glGetUniformBlockIndex(entry.prog_id, "VSBlock"), 2); } // We cache our uniform locations for now