ogl: implement useful constant buffer upload

this will remove the additional memcpy introduced in my last commit
This commit is contained in:
degasus
2013-10-07 17:19:47 +02:00
parent 4377618438
commit 7c14463d11
9 changed files with 75 additions and 110 deletions

View File

@ -95,9 +95,6 @@ void PixelShaderManager::Shutdown()
void PixelShaderManager::SetConstants(u32 components)
{
if (g_ActiveConfig.backend_info.APIType == API_OPENGL && !g_ActiveConfig.backend_info.bSupportsGLSLUBO)
dirty = true;
for (int i = 0; i < 2; ++i)
{
if (s_nColorsChanged[i])
@ -359,7 +356,7 @@ void PixelShaderManager::SetConstants(u32 components)
}
}
if(dirty)
if(dirty && g_ActiveConfig.backend_info.APIType != API_OPENGL)
{
g_renderer->SetMultiPSConstant4fv(0, sizeof(constants)/16, (float*) &constants);
dirty = false;