UBO works for Pixel Shaders if Binding for UBO is zero, otherwise fails. Probably why Vertex shader UBO is failing. Too tired to investigate right now.

This commit is contained in:
Ryan Houdek authored and Sonicadvance1 committed 2012-10-09 23:41:05 -05:00
1 parent 904adb9e3d
commit 1f75ee49bf
9 files changed
+176 -88

No files matched your search

@@ -496,14 +496,15 @@ void SetPSConstant4fvByName(const char * name, unsigned int offset, const float
}
}
}
void SetGLSLPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
{
float f[4] = { f1, f2, f3, f4 };
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
{
ProgramShaderCache::SetUniformObjects(0, const_number, f);
//return;
ProgramShaderCache::SetUniformObjects(0, const_number, f);
//return;
}
for (unsigned int a = 0; a < 10; ++a)
{
@@ -520,8 +521,8 @@ void SetGLSLPSConstant4fv(unsigned int const_number, const float *f)
{
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
{
ProgramShaderCache::SetUniformObjects(0, const_number, f);
//return;
ProgramShaderCache::SetUniformObjects(0, const_number, f);
//return;
}
for (unsigned int a = 0; a < 10; ++a)
{
@@ -538,8 +539,8 @@ void SetMultiGLSLPSConstant4fv(unsigned int const_number, unsigned int count, co
{
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
{
ProgramShaderCache::SetUniformObjects(0, const_number, f, count);
//return;
ProgramShaderCache::SetUniformObjects(0, const_number, f, count);
//return;
}
for (unsigned int a = 0; a < 10; ++a)
{