Add the patch from Dragonlord for broken Cg 2.1 on Linux with ATI cards (Fixes Issue 2508). Shouldn't affect anything else than Linux, please test it there.

Update Issue 2508
This should take care about the black screen. Please open a new issue for other problems that may arise.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5830 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
j4ck.fr0st
2010-07-03 19:10:23 +00:00
parent 2074b2ef8e
commit 6cc3e4ba14
3 changed files with 27 additions and 3 deletions

View File

@ -93,10 +93,16 @@ void PixelShaderCache::Init()
lastPSconstants[i/4][i%4] = -100000000.0f;
memset(&last_pixel_shader_uid, 0xFF, sizeof(last_pixel_shader_uid));
s_displayCompileAlert = true;
s_displayCompileAlert = true;
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB, (GLint *)&s_nMaxPixelInstructions);
#ifdef __linux__
if (strstr((const char*)glGetString(GL_VENDOR), "ATI") != NULL)
{
s_nMaxPixelInstructions = 4096;
}
#endif
int maxinst, maxattribs;
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB, (GLint *)&maxinst);
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB, (GLint *)&maxattribs);