Set Sampler values at program make time instead of every frame. Fix an issue when The user had UBO support but not Binding support.

This commit is contained in:
Ryan Houdek authored and Sonicadvance1 committed 2012-10-09 23:42:40 -05:00
1 parent ddd4360d6d
commit f8d0c28e53
6 files changed
+79 -176

No files matched your search

@@ -301,10 +301,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
glViewport(0, 0, virtual_width, virtual_height);
if(g_ActiveConfig.bUseGLSL)
{
ProgramShaderCache::SetBothShaders((srcFormat == PIXELFMT_Z24) ? PixelShaderCache::GetDepthMatrixProgram() : PixelShaderCache::GetColorMatrixProgram(), 0);
PixelShaderCache::SetPSSampler("samp0", 0);
}
else
PixelShaderCache::SetCurrentShader((srcFormat == PIXELFMT_Z24) ? PixelShaderCache::GetDepthMatrixProgram() : PixelShaderCache::GetColorMatrixProgram());
PixelShaderManager::SetColorMatrix(colmat); // set transformation