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.
This commit is contained in:
Pierre Bourdon 2011-12-03 23:24:10 +01:00
parent 575814895c
commit 252093295b
1 changed files with 1 additions and 1 deletions

View File

@ -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);