From a5a2562e590095e2722307082917fa0d48974203 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 25 Aug 2011 02:58:37 -0500 Subject: [PATCH] Put this hotfix in since some combination of hardware and drivers returns zero here. --- Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp index bee12e0186..fb4c226f77 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp @@ -68,6 +68,9 @@ void PixelShaderCache::Init() s_displayCompileAlert = true; glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB, (GLint *)&s_nMaxPixelInstructions); + + if(s_nMaxPixelInstructions == 0) // Some combination of drivers and hardware returns zero for some reason. + s_nMaxPixelInstructions = 4096; if (strstr((const char*)glGetString(GL_VENDOR), "Humper") != NULL) s_nMaxPixelInstructions = 4096; #if CG_VERSION_NUM == 2100 if (strstr((const char*)glGetString(GL_VENDOR), "ATI") != NULL)