From 252093295b24c7fdb98ff19b72b2b4c67396d29f Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sat, 3 Dec 2011 23:24:10 +0100 Subject: [PATCH] Do not fail with strict drivers when compiling a not SM2.0 shader To enforce SM2.0 compatibility, the OpenGL plugin was made to crash when compiling a shader which does not fit in the SM2.0a limits. However, on some combinations of OS/drivers/GPU, our shaders already do not fit in these limits, causing artificial failures only to try to keep a non existant SM2.0a compat. Basically, this sucks. This commit increases the artificial limit to SM3.0. If you're using a GPU which does not support SM3.0 and Dolphin works properly, this should not cause any problem at all. --- Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp index 050b378d2f..61e41008b3 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp @@ -252,7 +252,7 @@ bool PixelShaderCache::CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrpr #if defined HAVE_CG && HAVE_CG char stropt[128]; - sprintf(stropt, "MaxLocalParams=32,NumInstructionSlots=%d", s_nMaxPixelInstructions); + sprintf(stropt, "MaxLocalParams=224,NumInstructionSlots=%d", s_nMaxPixelInstructions); const char *opts[] = {"-profileopts", stropt, "-O2", "-q", NULL}; CGprogram tempprog = cgCreateProgram(g_cgcontext, CG_SOURCE, pstrprogram, g_cgfProf, "main", opts);