little commit for developers:

patch/hack to make dolphin work under virtual box using Linux guest
tested under gentoo and virtualbox 3.2.8 with 3d acceleration on

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6262 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado 2010-10-06 18:03:31 +00:00
parent 31c7fb7a33
commit c203cd5dae
3 changed files with 9 additions and 4 deletions

View File

@ -82,6 +82,7 @@ void PixelShaderCache::Init()
s_displayCompileAlert = true; s_displayCompileAlert = true;
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB, (GLint *)&s_nMaxPixelInstructions); glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB, (GLint *)&s_nMaxPixelInstructions);
if (strstr((const char*)glGetString(GL_VENDOR), "Humper") != NULL) s_nMaxPixelInstructions = 4096;
#if CG_VERSION_NUM == 2100 #if CG_VERSION_NUM == 2100
if (strstr((const char*)glGetString(GL_VENDOR), "ATI") != NULL) if (strstr((const char*)glGetString(GL_VENDOR), "ATI") != NULL)
{ {

View File

@ -420,16 +420,19 @@ bool Renderer::Init()
g_cgvProf = cgGLGetLatestProfile(CG_GL_VERTEX); g_cgvProf = cgGLGetLatestProfile(CG_GL_VERTEX);
g_cgfProf = cgGLGetLatestProfile(CG_GL_FRAGMENT); g_cgfProf = cgGLGetLatestProfile(CG_GL_FRAGMENT);
if (strstr((const char*)glGetString(GL_VENDOR), "Humper") == NULL)
{
#if CG_VERSION_NUM == 2100 #if CG_VERSION_NUM == 2100
// A bug was introduced in Cg2.1's handling of very large profile option values // A bug was introduced in Cg2.1's handling of very large profile option values
// so this will not work on ATI. ATI returns MAXINT = 2147483647 (0x7fffffff) // so this will not work on ATI. ATI returns MAXINT = 2147483647 (0x7fffffff)
// which is correct in OpenGL but Cg fails to handle it properly. As a result // which is correct in OpenGL but Cg fails to handle it properly. As a result
// -1 is used by Cg resulting (signedness incorrect) and compilation fails. // -1 is used by Cg resulting (signedness incorrect) and compilation fails.
if (strstr((const char*)glGetString(GL_VENDOR), "ATI") == NULL) if (strstr((const char*)glGetString(GL_VENDOR), "ATI") == NULL)
#endif #endif
{ {
cgGLSetOptimalOptions(g_cgvProf); cgGLSetOptimalOptions(g_cgvProf);
cgGLSetOptimalOptions(g_cgfProf); cgGLSetOptimalOptions(g_cgfProf);
}
} }
#endif // HAVE_CG #endif // HAVE_CG

View File

@ -83,6 +83,7 @@ void VertexShaderCache::Init()
s_displayCompileAlert = true; s_displayCompileAlert = true;
glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB, (GLint *)&s_nMaxVertexInstructions); glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB, (GLint *)&s_nMaxVertexInstructions);
if (strstr((const char*)glGetString(GL_VENDOR), "Humper") != NULL) s_nMaxVertexInstructions = 4096;
#if CG_VERSION_NUM == 2100 #if CG_VERSION_NUM == 2100
if (strstr((const char*)glGetString(GL_VENDOR), "ATI") != NULL) if (strstr((const char*)glGetString(GL_VENDOR), "ATI") != NULL)
{ {