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 2011-12-17 01:06:55 -06:00
parent 73c3f198f4
commit b837ae25fc
6 changed files with 79 additions and 176 deletions

View file

@ -298,10 +298,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
glViewport(0, 0, virtualW, virtualH);
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