Permalink
Browse files

Update mIsHD3K patch to Drake's impl

Hopefully that'll squish the bug once and for all.
  • Loading branch information...
Lirusaito committed Jun 14, 2016
1 parent bc93f27 commit 5c786e40ed5c8e04e7b4140bf7c6776b1856574c
Showing with 14 additions and 15 deletions.
  1. +13 −15 indra/llrender/llgl.cpp
  2. +1 −0 indra/llrender/llgl.h
View
@@ -451,6 +451,7 @@ LLGLManager::LLGLManager() :
mIsATI(FALSE),
mIsNVIDIA(FALSE),
mIsIntel(FALSE),
mIsHD3K(FALSE),
mIsGF2or4MX(FALSE),
mIsGF3(FALSE),
mIsGFFX(FALSE),
@@ -606,20 +607,18 @@ bool LLGLManager::initGL()
LLImageGL::sCompressTextures = false;
}
#if LL_WINDOWS
bool mIsHD3K(false);
#endif
// Trailing space necessary to keep "nVidia Corpor_ati_on" cards
// from being recognized as ATI.
if (mGLVendor.substr(0,4) == "ATI ")
if (mGLVendor.substr(0,4) == "ATI "
//#if LL_LINUX
// // The Mesa-based drivers put this in the Renderer string,
// // not the Vendor string.
// || mGLRenderer.find("AMD") != std::string::npos
//#endif //LL_LINUX
)
{
mGLVendorShort = "ATI";
// "mobile" appears to be unused, and this code was causing warnings.
//BOOL mobile = FALSE;
//if (mGLRenderer.find("MOBILITY") != std::string::npos)
//{
// mobile = TRUE;
//}
// *TODO: Fix this?
mIsATI = TRUE;
#if LL_WINDOWS && !LL_MESA_HEADLESS
@@ -734,12 +733,11 @@ bool LLGLManager::initGL()
if (mHasVertexShader)
{
//According to the spec, the resulting value should never be less than 512. We need at least 1024 to use skinned shaders.
#if LL_WINDOWS
if (mIsHD3K)
mGLMaxVertexUniformComponents = 4096;
else
#endif
glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB, &mGLMaxVertexUniformComponents);
if (mIsHD3K)
{
mGLMaxVertexUniformComponents = llmax(mGLMaxVertexUniformComponents, 4096);
}
}
if (LLRender::sGLCoreProfile)
View
@@ -120,6 +120,7 @@ class LLGLManager
BOOL mIsATI;
BOOL mIsNVIDIA;
BOOL mIsIntel;
BOOL mIsHD3K;
BOOL mIsGF2or4MX;
BOOL mIsGF3;
BOOL mIsGFFX;

0 comments on commit 5c786e4

Please sign in to comment.