Remove bSupportsGLSLLocation since it won't work how I expect it.

This commit is contained in:
Ryan Houdek
2011-12-09 19:14:02 -06:00
committed by Sonicadvance1
parent 4a84c6f742
commit 2fbca145cb
6 changed files with 26 additions and 76 deletions

View File

@ -81,11 +81,6 @@ void PixelShaderCache::Init()
// Should this be set here?
if (strstr((const char*)glGetString(GL_EXTENSIONS), "GL_ARB_shading_language_420pack") != NULL)
g_Config.backend_info.bSupportsGLSLBinding = true;
// This bit doesn't quite work yet, always set to false
// TODO: Probably just drop this entirely in favour of UBOS
//if (strstr((const char*)glGetString(GL_EXTENSIONS), "GL_ARB_separate_shader_objects") != NULL)
g_Config.backend_info.bSupportsGLSLLocation = false;
if (strstr((const char*)glGetString(GL_EXTENSIONS), "GL_ARB_uniform_buffer_object") != NULL)
g_Config.backend_info.bSupportsGLSLUBO = true;
@ -505,11 +500,6 @@ void SetGLSLPSConstant4f(unsigned int const_number, float f1, float f2, float f3
{
float f[4] = { f1, f2, f3, f4 };
if (g_ActiveConfig.backend_info.bSupportsGLSLLocation)
{
glUniform4fv(const_number, 1, f);
return;
}
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
{
ProgramShaderCache::SetUniformObjects(0, const_number, f);
@ -528,11 +518,6 @@ void SetGLSLPSConstant4f(unsigned int const_number, float f1, float f2, float f3
void SetGLSLPSConstant4fv(unsigned int const_number, const float *f)
{
if (g_ActiveConfig.backend_info.bSupportsGLSLLocation)
{
glUniform4fv(const_number, 1, f);
return;
}
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
{
ProgramShaderCache::SetUniformObjects(0, const_number, f);
@ -551,11 +536,6 @@ void SetGLSLPSConstant4fv(unsigned int const_number, const float *f)
void SetMultiGLSLPSConstant4fv(unsigned int const_number, unsigned int count, const float *f)
{
if (g_ActiveConfig.backend_info.bSupportsGLSLLocation)
{
glUniform4fv(const_number, count, f);
return;
}
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
{
ProgramShaderCache::SetUniformObjects(0, const_number, f, count);

View File

@ -92,7 +92,7 @@ namespace OGL
glAttachShader(entry.program.glprogid, entry.program.psid);
glLinkProgram(entry.program.glprogid);
glUseProgram(entry.program.glprogid);

View File

@ -247,11 +247,6 @@ void SetGLSLVSConstant4f(unsigned int const_number, float f1, float f2, float f3
buf[1] = f2;
buf[2] = f3;
buf[3] = f4;
if(g_ActiveConfig.backend_info.bSupportsGLSLLocation)
{
glUniform4fv(const_number, 1, buf);
return;
}
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
{
ProgramShaderCache::SetUniformObjects(1, const_number, buf);
@ -270,11 +265,6 @@ void SetGLSLVSConstant4f(unsigned int const_number, float f1, float f2, float f3
void SetGLSLVSConstant4fv(unsigned int const_number, const float *f)
{
if(g_ActiveConfig.backend_info.bSupportsGLSLLocation)
{
glUniform4fv(const_number, 1, f);
return;
}
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
{
ProgramShaderCache::SetUniformObjects(1, const_number, f);
@ -293,11 +283,6 @@ void SetGLSLVSConstant4fv(unsigned int const_number, const float *f)
void SetMultiGLSLVSConstant4fv(unsigned int const_number, unsigned int count, const float *f)
{
if(g_ActiveConfig.backend_info.bSupportsGLSLLocation)
{
glUniform4fv(const_number, count, f);
return;
}
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
{
ProgramShaderCache::SetUniformObjects(1, const_number, f, count);
@ -324,11 +309,6 @@ void SetMultiGLSLVSConstant3fv(unsigned int const_number, unsigned int count, co
buf[4*i+2] = *f++;
buf[4*i+3] = 0.f;
}
if(g_ActiveConfig.backend_info.bSupportsGLSLLocation)
{
glUniform4fv(const_number, count, buf);
return;
}
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
{
ProgramShaderCache::SetUniformObjects(1, const_number, buf, count);