From c10d601ce8d2a6ca7e354772a217a998cd9865b3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 20 Sep 2021 13:19:20 +0100 Subject: SL-15999 - track --noninteractive state with gNonInteractive flag --- indra/llrender/llgl.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 43fedeca64..fe399ad882 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -62,6 +62,7 @@ BOOL gDebugSession = FALSE; BOOL gClothRipple = FALSE; BOOL gHeadlessClient = FALSE; +BOOL gNonInteractive = FALSE; BOOL gGLActive = FALSE; BOOL gGLDebugLoggingEnabled = TRUE; -- cgit v1.2.3 From 3e99853b2984a40093ff6b504abfcabe065b251b Mon Sep 17 00:00:00 2001 From: Dave Houlton Date: Tue, 5 Oct 2021 15:59:21 -0600 Subject: SL-16138 remove checks for now-mandatory capabilities --- indra/llrender/llgl.cpp | 300 +++++++++++++++++++++--------------------------- 1 file changed, 131 insertions(+), 169 deletions(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 43fedeca64..673f6cb6df 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -434,9 +434,6 @@ LLGLManager::LLGLManager() : mHasMapBufferRange(FALSE), mHasFlushBufferRange(FALSE), mHasPBuffer(FALSE), - mHasShaderObjects(FALSE), - mHasVertexShader(FALSE), - mHasFragmentShader(FALSE), mNumTextureImageUnits(0), mHasOcclusionQuery(FALSE), mHasTimerQuery(FALSE), @@ -775,14 +772,9 @@ bool LLGLManager::initGL() stop_glerror(); - stop_glerror(); - - if (mHasFragmentShader) - { - GLint num_tex_image_units; - glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &num_tex_image_units); - mNumTextureImageUnits = llmin(num_tex_image_units, 32); - } + GLint num_tex_image_units; + glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &num_tex_image_units); + mNumTextureImageUnits = llmin(num_tex_image_units, 32); if (LLRender::sGLCoreProfile) { @@ -975,9 +967,9 @@ void LLGLManager::asLLSD(LLSD& info) info["has_map_buffer_range"] = mHasMapBufferRange; info["has_flush_buffer_range"] = mHasFlushBufferRange; info["has_pbuffer"] = mHasPBuffer; - info["has_shader_objects"] = mHasShaderObjects; - info["has_vertex_shader"] = mHasVertexShader; - info["has_fragment_shader"] = mHasFragmentShader; + info["has_shader_objects"] = std::string("Assumed TRUE"); // was mHasShaderObjects; + info["has_vertex_shader"] = std::string("Assumed TRUE"); // was mHasVertexShader; + info["has_fragment_shader"] = std::string("Assumed TRUE"); // was mHasFragmentShader; info["num_texture_image_units"] = mNumTextureImageUnits; info["has_occlusion_query"] = mHasOcclusionQuery; info["has_timer_query"] = mHasTimerQuery; @@ -1083,9 +1075,6 @@ void LLGLManager::initExtensions() mHasCubeMap = FALSE; mHasOcclusionQuery = FALSE; mHasPointParameters = FALSE; - mHasShaderObjects = FALSE; - mHasVertexShader = FALSE; - mHasFragmentShader = FALSE; mHasTextureRectangle = FALSE; #else // LL_MESA_HEADLESS //important, gGLHExts.mSysExts is uninitialized until after glh_init_extensions is called mHasMultitexture = glh_init_extensions("GL_ARB_multitexture"); @@ -1143,10 +1132,6 @@ void LLGLManager::initExtensions() #if !LL_DARWIN mHasPointParameters = !mIsATI && ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts); #endif - mHasShaderObjects = ExtensionExists("GL_ARB_shader_objects", gGLHExts.mSysExts) && (LLRender::sGLCoreProfile || ExtensionExists("GL_ARB_shading_language_100", gGLHExts.mSysExts)); - mHasVertexShader = ExtensionExists("GL_ARB_vertex_program", gGLHExts.mSysExts) && ExtensionExists("GL_ARB_vertex_shader", gGLHExts.mSysExts) - && (LLRender::sGLCoreProfile || ExtensionExists("GL_ARB_shading_language_100", gGLHExts.mSysExts)); - mHasFragmentShader = ExtensionExists("GL_ARB_fragment_shader", gGLHExts.mSysExts) && (LLRender::sGLCoreProfile || ExtensionExists("GL_ARB_shading_language_100", gGLHExts.mSysExts)); #endif #if LL_LINUX @@ -1169,9 +1154,6 @@ void LLGLManager::initExtensions() mHasCubeMap = FALSE; mHasOcclusionQuery = FALSE; mHasPointParameters = FALSE; - mHasShaderObjects = FALSE; - mHasVertexShader = FALSE; - mHasFragmentShader = FALSE; LL_WARNS("RenderInit") << "GL extension support DISABLED via LL_GL_NOEXT" << LL_ENDL; } else if (getenv("LL_GL_BASICEXT")) /* Flawfinder: ignore */ @@ -1184,9 +1166,6 @@ void LLGLManager::initExtensions() mHasAnisotropic = FALSE; //mHasCubeMap = FALSE; // apparently fatal on Intel 915 & similar //mHasOcclusionQuery = FALSE; // source of many ATI system hangs - mHasShaderObjects = FALSE; - mHasVertexShader = FALSE; - mHasFragmentShader = FALSE; mHasBlendFuncSeparate = FALSE; LL_WARNS("RenderInit") << "GL extension support forced to SIMPLE level via LL_GL_BASICEXT" << LL_ENDL; } @@ -1208,9 +1187,6 @@ void LLGLManager::initExtensions() if (strchr(blacklist,'j')) mHasCubeMap = FALSE;//S // if (strchr(blacklist,'k')) mHasATIVAO = FALSE;//S if (strchr(blacklist,'l')) mHasOcclusionQuery = FALSE; - if (strchr(blacklist,'m')) mHasShaderObjects = FALSE;//S - if (strchr(blacklist,'n')) mHasVertexShader = FALSE;//S - if (strchr(blacklist,'o')) mHasFragmentShader = FALSE;//S if (strchr(blacklist,'p')) mHasPointParameters = FALSE;//S if (strchr(blacklist,'q')) mHasFramebufferObject = FALSE;//S if (strchr(blacklist,'r')) mHasDrawBuffers = FALSE;//S @@ -1257,18 +1233,6 @@ void LLGLManager::initExtensions() { LL_INFOS("RenderInit") << "Couldn't initialize GL_ARB_point_parameters" << LL_ENDL; } - if (!mHasShaderObjects) - { - LL_INFOS("RenderInit") << "Couldn't initialize GL_ARB_shader_objects" << LL_ENDL; - } - if (!mHasVertexShader) - { - LL_INFOS("RenderInit") << "Couldn't initialize GL_ARB_vertex_shader" << LL_ENDL; - } - if (!mHasFragmentShader) - { - LL_INFOS("RenderInit") << "Couldn't initialize GL_ARB_fragment_shader" << LL_ENDL; - } if (!mHasBlendFuncSeparate) { LL_INFOS("RenderInit") << "Couldn't initialize GL_EXT_blend_func_separate" << LL_ENDL; @@ -1436,134 +1400,132 @@ void LLGLManager::initExtensions() glPointParameterfARB = (PFNGLPOINTPARAMETERFARBPROC)GLH_EXT_GET_PROC_ADDRESS("glPointParameterfARB"); glPointParameterfvARB = (PFNGLPOINTPARAMETERFVARBPROC)GLH_EXT_GET_PROC_ADDRESS("glPointParameterfvARB"); } - if (mHasShaderObjects) - { - glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteObjectARB"); - glGetHandleARB = (PFNGLGETHANDLEARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetHandleARB"); - glDetachObjectARB = (PFNGLDETACHOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDetachObjectARB"); - glCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glCreateShaderObjectARB"); - glShaderSourceARB = (PFNGLSHADERSOURCEARBPROC) GLH_EXT_GET_PROC_ADDRESS("glShaderSourceARB"); - glCompileShaderARB = (PFNGLCOMPILESHADERARBPROC) GLH_EXT_GET_PROC_ADDRESS("glCompileShaderARB"); - glCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glCreateProgramObjectARB"); - glAttachObjectARB = (PFNGLATTACHOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glAttachObjectARB"); - glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glLinkProgramARB"); - glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUseProgramObjectARB"); - glValidateProgramARB = (PFNGLVALIDATEPROGRAMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glValidateProgramARB"); - glUniform1fARB = (PFNGLUNIFORM1FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform1fARB"); - glUniform2fARB = (PFNGLUNIFORM2FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform2fARB"); - glUniform3fARB = (PFNGLUNIFORM3FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform3fARB"); - glUniform4fARB = (PFNGLUNIFORM4FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform4fARB"); - glUniform1iARB = (PFNGLUNIFORM1IARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform1iARB"); - glUniform2iARB = (PFNGLUNIFORM2IARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform2iARB"); - glUniform3iARB = (PFNGLUNIFORM3IARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform3iARB"); - glUniform4iARB = (PFNGLUNIFORM4IARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform4iARB"); - glUniform1fvARB = (PFNGLUNIFORM1FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform1fvARB"); - glUniform2fvARB = (PFNGLUNIFORM2FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform2fvARB"); - glUniform3fvARB = (PFNGLUNIFORM3FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform3fvARB"); - glUniform4fvARB = (PFNGLUNIFORM4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform4fvARB"); - glUniform1ivARB = (PFNGLUNIFORM1IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform1ivARB"); - glUniform2ivARB = (PFNGLUNIFORM2IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform2ivARB"); - glUniform3ivARB = (PFNGLUNIFORM3IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform3ivARB"); - glUniform4ivARB = (PFNGLUNIFORM4IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform4ivARB"); - glUniformMatrix2fvARB = (PFNGLUNIFORMMATRIX2FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix2fvARB"); - glUniformMatrix3fvARB = (PFNGLUNIFORMMATRIX3FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3fvARB"); - glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3x4fv"); - glUniformMatrix4fvARB = (PFNGLUNIFORMMATRIX4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix4fvARB"); - glGetObjectParameterfvARB = (PFNGLGETOBJECTPARAMETERFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetObjectParameterfvARB"); - glGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetObjectParameterivARB"); - glGetInfoLogARB = (PFNGLGETINFOLOGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetInfoLogARB"); - glGetAttachedObjectsARB = (PFNGLGETATTACHEDOBJECTSARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetAttachedObjectsARB"); - glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetUniformLocationARB"); - glGetActiveUniformARB = (PFNGLGETACTIVEUNIFORMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetActiveUniformARB"); - glGetUniformfvARB = (PFNGLGETUNIFORMFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetUniformfvARB"); - glGetUniformivARB = (PFNGLGETUNIFORMIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetUniformivARB"); - glGetShaderSourceARB = (PFNGLGETSHADERSOURCEARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetShaderSourceARB"); - } - if (mHasVertexShader) - { - LL_INFOS() << "initExtensions() VertexShader-related procs..." << LL_ENDL; - - // nSight doesn't support use of ARB funcs that have been normalized in the API - if (!LLRender::sNsightDebugSupport) - { - glGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetAttribLocationARB"); - glBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glBindAttribLocationARB"); - } - else - { - glGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC)GLH_EXT_GET_PROC_ADDRESS("glGetAttribLocation"); - glBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC)GLH_EXT_GET_PROC_ADDRESS("glBindAttribLocation"); - } - - glGetActiveAttribARB = (PFNGLGETACTIVEATTRIBARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetActiveAttribARB"); - glVertexAttrib1dARB = (PFNGLVERTEXATTRIB1DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1dARB"); - glVertexAttrib1dvARB = (PFNGLVERTEXATTRIB1DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1dvARB"); - glVertexAttrib1fARB = (PFNGLVERTEXATTRIB1FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1fARB"); - glVertexAttrib1fvARB = (PFNGLVERTEXATTRIB1FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1fvARB"); - glVertexAttrib1sARB = (PFNGLVERTEXATTRIB1SARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1sARB"); - glVertexAttrib1svARB = (PFNGLVERTEXATTRIB1SVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1svARB"); - glVertexAttrib2dARB = (PFNGLVERTEXATTRIB2DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2dARB"); - glVertexAttrib2dvARB = (PFNGLVERTEXATTRIB2DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2dvARB"); - glVertexAttrib2fARB = (PFNGLVERTEXATTRIB2FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2fARB"); - glVertexAttrib2fvARB = (PFNGLVERTEXATTRIB2FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2fvARB"); - glVertexAttrib2sARB = (PFNGLVERTEXATTRIB2SARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2sARB"); - glVertexAttrib2svARB = (PFNGLVERTEXATTRIB2SVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2svARB"); - glVertexAttrib3dARB = (PFNGLVERTEXATTRIB3DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3dARB"); - glVertexAttrib3dvARB = (PFNGLVERTEXATTRIB3DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3dvARB"); - glVertexAttrib3fARB = (PFNGLVERTEXATTRIB3FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3fARB"); - glVertexAttrib3fvARB = (PFNGLVERTEXATTRIB3FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3fvARB"); - glVertexAttrib3sARB = (PFNGLVERTEXATTRIB3SARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3sARB"); - glVertexAttrib3svARB = (PFNGLVERTEXATTRIB3SVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3svARB"); - glVertexAttrib4nbvARB = (PFNGLVERTEXATTRIB4NBVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nbvARB"); - glVertexAttrib4nivARB = (PFNGLVERTEXATTRIB4NIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nivARB"); - glVertexAttrib4nsvARB = (PFNGLVERTEXATTRIB4NSVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nsvARB"); - glVertexAttrib4nubARB = (PFNGLVERTEXATTRIB4NUBARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nubARB"); - glVertexAttrib4nubvARB = (PFNGLVERTEXATTRIB4NUBVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nubvARB"); - glVertexAttrib4nuivARB = (PFNGLVERTEXATTRIB4NUIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nuivARB"); - glVertexAttrib4nusvARB = (PFNGLVERTEXATTRIB4NUSVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nusvARB"); - glVertexAttrib4bvARB = (PFNGLVERTEXATTRIB4BVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4bvARB"); - glVertexAttrib4dARB = (PFNGLVERTEXATTRIB4DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4dARB"); - glVertexAttrib4dvARB = (PFNGLVERTEXATTRIB4DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4dvARB"); - glVertexAttrib4fARB = (PFNGLVERTEXATTRIB4FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4fARB"); - glVertexAttrib4fvARB = (PFNGLVERTEXATTRIB4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4fvARB"); - glVertexAttrib4ivARB = (PFNGLVERTEXATTRIB4IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4ivARB"); - glVertexAttrib4sARB = (PFNGLVERTEXATTRIB4SARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4sARB"); - glVertexAttrib4svARB = (PFNGLVERTEXATTRIB4SVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4svARB"); - glVertexAttrib4ubvARB = (PFNGLVERTEXATTRIB4UBVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4ubvARB"); - glVertexAttrib4uivARB = (PFNGLVERTEXATTRIB4UIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4uivARB"); - glVertexAttrib4usvARB = (PFNGLVERTEXATTRIB4USVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4usvARB"); - glVertexAttribPointerARB = (PFNGLVERTEXATTRIBPOINTERARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttribPointerARB"); - glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttribIPointer"); - glEnableVertexAttribArrayARB = (PFNGLENABLEVERTEXATTRIBARRAYARBPROC) GLH_EXT_GET_PROC_ADDRESS("glEnableVertexAttribArrayARB"); - glDisableVertexAttribArrayARB = (PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDisableVertexAttribArrayARB"); - glProgramStringARB = (PFNGLPROGRAMSTRINGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramStringARB"); - glBindProgramARB = (PFNGLBINDPROGRAMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glBindProgramARB"); - glDeleteProgramsARB = (PFNGLDELETEPROGRAMSARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteProgramsARB"); - glGenProgramsARB = (PFNGLGENPROGRAMSARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGenProgramsARB"); - glProgramEnvParameter4dARB = (PFNGLPROGRAMENVPARAMETER4DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramEnvParameter4dARB"); - glProgramEnvParameter4dvARB = (PFNGLPROGRAMENVPARAMETER4DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramEnvParameter4dvARB"); - glProgramEnvParameter4fARB = (PFNGLPROGRAMENVPARAMETER4FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramEnvParameter4fARB"); - glProgramEnvParameter4fvARB = (PFNGLPROGRAMENVPARAMETER4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramEnvParameter4fvARB"); - glProgramLocalParameter4dARB = (PFNGLPROGRAMLOCALPARAMETER4DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramLocalParameter4dARB"); - glProgramLocalParameter4dvARB = (PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramLocalParameter4dvARB"); - glProgramLocalParameter4fARB = (PFNGLPROGRAMLOCALPARAMETER4FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramLocalParameter4fARB"); - glProgramLocalParameter4fvARB = (PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramLocalParameter4fvARB"); - glGetProgramEnvParameterdvARB = (PFNGLGETPROGRAMENVPARAMETERDVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramEnvParameterdvARB"); - glGetProgramEnvParameterfvARB = (PFNGLGETPROGRAMENVPARAMETERFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramEnvParameterfvARB"); - glGetProgramLocalParameterdvARB = (PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramLocalParameterdvARB"); - glGetProgramLocalParameterfvARB = (PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramLocalParameterfvARB"); - glGetProgramivARB = (PFNGLGETPROGRAMIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramivARB"); - glGetProgramStringARB = (PFNGLGETPROGRAMSTRINGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramStringARB"); - glGetVertexAttribdvARB = (PFNGLGETVERTEXATTRIBDVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribdvARB"); - glGetVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribfvARB"); - glGetVertexAttribivARB = (PFNGLGETVERTEXATTRIBIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribivARB"); - glGetVertexAttribPointervARB = (PFNGLGETVERTEXATTRIBPOINTERVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glgetVertexAttribPointervARB"); - glIsProgramARB = (PFNGLISPROGRAMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glIsProgramARB"); - } - LL_DEBUGS("RenderInit") << "GL Probe: Got symbols" << LL_ENDL; + + // Assume shader capabilities + glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteObjectARB"); + glGetHandleARB = (PFNGLGETHANDLEARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetHandleARB"); + glDetachObjectARB = (PFNGLDETACHOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDetachObjectARB"); + glCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glCreateShaderObjectARB"); + glShaderSourceARB = (PFNGLSHADERSOURCEARBPROC) GLH_EXT_GET_PROC_ADDRESS("glShaderSourceARB"); + glCompileShaderARB = (PFNGLCOMPILESHADERARBPROC) GLH_EXT_GET_PROC_ADDRESS("glCompileShaderARB"); + glCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glCreateProgramObjectARB"); + glAttachObjectARB = (PFNGLATTACHOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glAttachObjectARB"); + glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glLinkProgramARB"); + glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUseProgramObjectARB"); + glValidateProgramARB = (PFNGLVALIDATEPROGRAMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glValidateProgramARB"); + glUniform1fARB = (PFNGLUNIFORM1FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform1fARB"); + glUniform2fARB = (PFNGLUNIFORM2FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform2fARB"); + glUniform3fARB = (PFNGLUNIFORM3FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform3fARB"); + glUniform4fARB = (PFNGLUNIFORM4FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform4fARB"); + glUniform1iARB = (PFNGLUNIFORM1IARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform1iARB"); + glUniform2iARB = (PFNGLUNIFORM2IARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform2iARB"); + glUniform3iARB = (PFNGLUNIFORM3IARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform3iARB"); + glUniform4iARB = (PFNGLUNIFORM4IARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform4iARB"); + glUniform1fvARB = (PFNGLUNIFORM1FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform1fvARB"); + glUniform2fvARB = (PFNGLUNIFORM2FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform2fvARB"); + glUniform3fvARB = (PFNGLUNIFORM3FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform3fvARB"); + glUniform4fvARB = (PFNGLUNIFORM4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform4fvARB"); + glUniform1ivARB = (PFNGLUNIFORM1IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform1ivARB"); + glUniform2ivARB = (PFNGLUNIFORM2IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform2ivARB"); + glUniform3ivARB = (PFNGLUNIFORM3IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform3ivARB"); + glUniform4ivARB = (PFNGLUNIFORM4IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform4ivARB"); + glUniformMatrix2fvARB = (PFNGLUNIFORMMATRIX2FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix2fvARB"); + glUniformMatrix3fvARB = (PFNGLUNIFORMMATRIX3FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3fvARB"); + glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3x4fv"); + glUniformMatrix4fvARB = (PFNGLUNIFORMMATRIX4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix4fvARB"); + glGetObjectParameterfvARB = (PFNGLGETOBJECTPARAMETERFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetObjectParameterfvARB"); + glGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetObjectParameterivARB"); + glGetInfoLogARB = (PFNGLGETINFOLOGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetInfoLogARB"); + glGetAttachedObjectsARB = (PFNGLGETATTACHEDOBJECTSARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetAttachedObjectsARB"); + glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetUniformLocationARB"); + glGetActiveUniformARB = (PFNGLGETACTIVEUNIFORMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetActiveUniformARB"); + glGetUniformfvARB = (PFNGLGETUNIFORMFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetUniformfvARB"); + glGetUniformivARB = (PFNGLGETUNIFORMIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetUniformivARB"); + glGetShaderSourceARB = (PFNGLGETSHADERSOURCEARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetShaderSourceARB"); + + LL_INFOS() << "initExtensions() VertexShader-related procs..." << LL_ENDL; + + // nSight doesn't support use of ARB funcs that have been normalized in the API + if (!LLRender::sNsightDebugSupport) + { + glGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetAttribLocationARB"); + glBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glBindAttribLocationARB"); + } + else + { + glGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetAttribLocation"); + glBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glBindAttribLocation"); + } + + glGetActiveAttribARB = (PFNGLGETACTIVEATTRIBARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetActiveAttribARB"); + glVertexAttrib1dARB = (PFNGLVERTEXATTRIB1DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1dARB"); + glVertexAttrib1dvARB = (PFNGLVERTEXATTRIB1DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1dvARB"); + glVertexAttrib1fARB = (PFNGLVERTEXATTRIB1FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1fARB"); + glVertexAttrib1fvARB = (PFNGLVERTEXATTRIB1FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1fvARB"); + glVertexAttrib1sARB = (PFNGLVERTEXATTRIB1SARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1sARB"); + glVertexAttrib1svARB = (PFNGLVERTEXATTRIB1SVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1svARB"); + glVertexAttrib2dARB = (PFNGLVERTEXATTRIB2DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2dARB"); + glVertexAttrib2dvARB = (PFNGLVERTEXATTRIB2DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2dvARB"); + glVertexAttrib2fARB = (PFNGLVERTEXATTRIB2FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2fARB"); + glVertexAttrib2fvARB = (PFNGLVERTEXATTRIB2FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2fvARB"); + glVertexAttrib2sARB = (PFNGLVERTEXATTRIB2SARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2sARB"); + glVertexAttrib2svARB = (PFNGLVERTEXATTRIB2SVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2svARB"); + glVertexAttrib3dARB = (PFNGLVERTEXATTRIB3DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3dARB"); + glVertexAttrib3dvARB = (PFNGLVERTEXATTRIB3DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3dvARB"); + glVertexAttrib3fARB = (PFNGLVERTEXATTRIB3FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3fARB"); + glVertexAttrib3fvARB = (PFNGLVERTEXATTRIB3FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3fvARB"); + glVertexAttrib3sARB = (PFNGLVERTEXATTRIB3SARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3sARB"); + glVertexAttrib3svARB = (PFNGLVERTEXATTRIB3SVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3svARB"); + glVertexAttrib4nbvARB = (PFNGLVERTEXATTRIB4NBVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nbvARB"); + glVertexAttrib4nivARB = (PFNGLVERTEXATTRIB4NIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nivARB"); + glVertexAttrib4nsvARB = (PFNGLVERTEXATTRIB4NSVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nsvARB"); + glVertexAttrib4nubARB = (PFNGLVERTEXATTRIB4NUBARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nubARB"); + glVertexAttrib4nubvARB = (PFNGLVERTEXATTRIB4NUBVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nubvARB"); + glVertexAttrib4nuivARB = (PFNGLVERTEXATTRIB4NUIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nuivARB"); + glVertexAttrib4nusvARB = (PFNGLVERTEXATTRIB4NUSVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nusvARB"); + glVertexAttrib4bvARB = (PFNGLVERTEXATTRIB4BVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4bvARB"); + glVertexAttrib4dARB = (PFNGLVERTEXATTRIB4DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4dARB"); + glVertexAttrib4dvARB = (PFNGLVERTEXATTRIB4DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4dvARB"); + glVertexAttrib4fARB = (PFNGLVERTEXATTRIB4FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4fARB"); + glVertexAttrib4fvARB = (PFNGLVERTEXATTRIB4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4fvARB"); + glVertexAttrib4ivARB = (PFNGLVERTEXATTRIB4IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4ivARB"); + glVertexAttrib4sARB = (PFNGLVERTEXATTRIB4SARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4sARB"); + glVertexAttrib4svARB = (PFNGLVERTEXATTRIB4SVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4svARB"); + glVertexAttrib4ubvARB = (PFNGLVERTEXATTRIB4UBVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4ubvARB"); + glVertexAttrib4uivARB = (PFNGLVERTEXATTRIB4UIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4uivARB"); + glVertexAttrib4usvARB = (PFNGLVERTEXATTRIB4USVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4usvARB"); + glVertexAttribPointerARB = (PFNGLVERTEXATTRIBPOINTERARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttribPointerARB"); + glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttribIPointer"); + glEnableVertexAttribArrayARB = (PFNGLENABLEVERTEXATTRIBARRAYARBPROC) GLH_EXT_GET_PROC_ADDRESS("glEnableVertexAttribArrayARB"); + glDisableVertexAttribArrayARB = (PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDisableVertexAttribArrayARB"); + glProgramStringARB = (PFNGLPROGRAMSTRINGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramStringARB"); + glBindProgramARB = (PFNGLBINDPROGRAMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glBindProgramARB"); + glDeleteProgramsARB = (PFNGLDELETEPROGRAMSARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteProgramsARB"); + glGenProgramsARB = (PFNGLGENPROGRAMSARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGenProgramsARB"); + glProgramEnvParameter4dARB = (PFNGLPROGRAMENVPARAMETER4DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramEnvParameter4dARB"); + glProgramEnvParameter4dvARB = (PFNGLPROGRAMENVPARAMETER4DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramEnvParameter4dvARB"); + glProgramEnvParameter4fARB = (PFNGLPROGRAMENVPARAMETER4FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramEnvParameter4fARB"); + glProgramEnvParameter4fvARB = (PFNGLPROGRAMENVPARAMETER4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramEnvParameter4fvARB"); + glProgramLocalParameter4dARB = (PFNGLPROGRAMLOCALPARAMETER4DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramLocalParameter4dARB"); + glProgramLocalParameter4dvARB = (PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramLocalParameter4dvARB"); + glProgramLocalParameter4fARB = (PFNGLPROGRAMLOCALPARAMETER4FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramLocalParameter4fARB"); + glProgramLocalParameter4fvARB = (PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramLocalParameter4fvARB"); + glGetProgramEnvParameterdvARB = (PFNGLGETPROGRAMENVPARAMETERDVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramEnvParameterdvARB"); + glGetProgramEnvParameterfvARB = (PFNGLGETPROGRAMENVPARAMETERFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramEnvParameterfvARB"); + glGetProgramLocalParameterdvARB = (PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramLocalParameterdvARB"); + glGetProgramLocalParameterfvARB = (PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramLocalParameterfvARB"); + glGetProgramivARB = (PFNGLGETPROGRAMIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramivARB"); + glGetProgramStringARB = (PFNGLGETPROGRAMSTRINGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramStringARB"); + glGetVertexAttribdvARB = (PFNGLGETVERTEXATTRIBDVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribdvARB"); + glGetVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribfvARB"); + glGetVertexAttribivARB = (PFNGLGETVERTEXATTRIBIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribivARB"); + glGetVertexAttribPointervARB = (PFNGLGETVERTEXATTRIBPOINTERVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glgetVertexAttribPointervARB"); + glIsProgramARB = (PFNGLISPROGRAMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glIsProgramARB"); + + LL_DEBUGS("RenderInit") << "GL Probe: Got symbols" << LL_ENDL; #endif - mInited = TRUE; + mInited = TRUE; } void rotate_quat(LLQuaternion& rotation) @@ -2116,7 +2078,7 @@ void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask) glClientActiveTextureARB(GL_TEXTURE0_ARB); gGL.getTexUnit(0)->activate(); - if (gGLManager.mHasVertexShader && LLGLSLShader::sNoFixedFunction) + if (LLGLSLShader::sNoFixedFunction) { //make sure vertex attribs are all disabled GLint count; glGetIntegerv(GL_MAX_VERTEX_ATTRIBS_ARB, &count); -- cgit v1.2.3 From 4e8cd9437bed90b3468b1bf12f545de16faefb67 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 26 Oct 2021 14:07:00 +0000 Subject: SL-16193 Fix for mesh selection outline not rendering correctly (and broken physics shapes display). --- indra/llrender/llgl.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index a269549c49..b66521132c 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -2117,6 +2117,7 @@ void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask) LLGLState::LLGLState(LLGLenum state, S32 enabled) : mState(state), mWasEnabled(FALSE), mIsEnabled(FALSE) { + LL_PROFILE_ZONE_SCOPED; if (LLGLSLShader::sNoFixedFunction) { //always ignore state that's deprecated post GL 3.0 switch (state) @@ -2175,6 +2176,7 @@ void LLGLState::setEnabled(S32 enabled) LLGLState::~LLGLState() { + LL_PROFILE_ZONE_SCOPED; stop_glerror(); if (mState) { -- cgit v1.2.3 From 8d20480c5f77fe1fab8149d3cda79bdd61e77656 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 28 Oct 2021 18:06:21 +0000 Subject: SL-16148 SL-16244 SL-16270 SL-16253 Remove most BlockTimers, remove LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton --- indra/llrender/llgl.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index b66521132c..4f9aa5f979 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -2434,6 +2434,7 @@ void LLGLNamePool::cleanup() GLuint LLGLNamePool::allocate() { + LL_PROFILE_ZONE_SCOPED; #if LL_GL_NAME_POOLING for (name_list_t::iterator iter = mNameList.begin(); iter != mNameList.end(); ++iter) { -- cgit v1.2.3 From 5534781acf4a656478c27d5b94991e98bd876413 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 1 Jun 2021 20:13:13 +0300 Subject: SL-15333 Crash in glh_init_extensions --- indra/llrender/llgl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 4f9aa5f979..c7f85aec21 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -557,7 +557,7 @@ bool LLGLManager::initGL() glGetIntegerv(GL_NUM_EXTENSIONS, &count); for (GLint i = 0; i < count; ++i) { - std::string ext((const char*) glGetStringi(GL_EXTENSIONS, i)); + std::string ext = ll_safe_string((const char*) glGetStringi(GL_EXTENSIONS, i)); str << ext << " "; LL_DEBUGS("GLExtensions") << ext << LL_ENDL; } -- cgit v1.2.3 From bb379cb8ccb1d8622b5f5e0a63a0c1116cd57d91 Mon Sep 17 00:00:00 2001 From: Dave Houlton Date: Fri, 12 Nov 2021 15:11:08 -0700 Subject: SL-13565 disable reflection render pass when all non-void water is occluded --- indra/llrender/llgl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index c7f85aec21..b49b14615f 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1095,8 +1095,7 @@ void LLGLManager::initExtensions() mHasSync = ExtensionExists("GL_ARB_sync", gGLHExts.mSysExts); mHasMapBufferRange = ExtensionExists("GL_ARB_map_buffer_range", gGLHExts.mSysExts); mHasFlushBufferRange = ExtensionExists("GL_APPLE_flush_buffer_range", gGLHExts.mSysExts); - //mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts); - mHasDepthClamp = FALSE; + mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts); // mask out FBO support when packed_depth_stencil isn't there 'cause we need it for LLRenderTarget -Brad #ifdef GL_ARB_framebuffer_object mHasFramebufferObject = ExtensionExists("GL_ARB_framebuffer_object", gGLHExts.mSysExts); -- cgit v1.2.3 From 68e09edad0d863d57ba06e2842b9399f3ff21618 Mon Sep 17 00:00:00 2001 From: Dave Houlton Date: Mon, 29 Nov 2021 17:07:25 -0700 Subject: SL-16386 remove references to (const true) LLGLSLShader::sNoFixedFunction --- indra/llrender/llgl.cpp | 221 ++++-------------------------------------------- 1 file changed, 16 insertions(+), 205 deletions(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index b49b14615f..58183adfce 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1936,207 +1936,30 @@ void LLGLState::checkTextureChannels(const std::string& msg) #endif } -void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask) -{ - if (!gDebugGL || LLGLSLShader::sNoFixedFunction) - { - return; - } - - stop_glerror(); - BOOL error = FALSE; - - GLint active_texture; - glGetIntegerv(GL_CLIENT_ACTIVE_TEXTURE_ARB, &active_texture); - - if (active_texture != GL_TEXTURE0_ARB) - { - LL_WARNS() << "Client active texture corrupted: " << active_texture << LL_ENDL; - if (gDebugSession) - { - gFailLog << "Client active texture corrupted: " << active_texture << std::endl; - } - error = TRUE; - } - - /*glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &active_texture); - if (active_texture != GL_TEXTURE0_ARB) - { - LL_WARNS() << "Active texture corrupted: " << active_texture << LL_ENDL; - if (gDebugSession) - { - gFailLog << "Active texture corrupted: " << active_texture << std::endl; - } - error = TRUE; - }*/ - - static const char* label[] = - { - "GL_VERTEX_ARRAY", - "GL_NORMAL_ARRAY", - "GL_COLOR_ARRAY", - "GL_TEXTURE_COORD_ARRAY" - }; - - static GLint value[] = - { - GL_VERTEX_ARRAY, - GL_NORMAL_ARRAY, - GL_COLOR_ARRAY, - GL_TEXTURE_COORD_ARRAY - }; - - static const U32 mask[] = - { //copied from llvertexbuffer.h - 0x0001, //MAP_VERTEX, - 0x0002, //MAP_NORMAL, - 0x0010, //MAP_COLOR, - 0x0004, //MAP_TEXCOORD - }; - - - for (S32 j = 1; j < 4; j++) - { - if (glIsEnabled(value[j])) - { - if (!(mask[j] & data_mask)) - { - error = TRUE; - LL_WARNS("RenderState") << "GL still has " << label[j] << " enabled." << LL_ENDL; - if (gDebugSession) - { - gFailLog << "GL still has " << label[j] << " enabled." << std::endl; - } - } - } - else - { - if (mask[j] & data_mask) - { - error = TRUE; - LL_WARNS("RenderState") << "GL does not have " << label[j] << " enabled." << LL_ENDL; - if (gDebugSession) - { - gFailLog << "GL does not have " << label[j] << " enabled." << std::endl; - } - } - } - } - - glClientActiveTextureARB(GL_TEXTURE1_ARB); - gGL.getTexUnit(1)->activate(); - if (glIsEnabled(GL_TEXTURE_COORD_ARRAY)) - { - if (!(data_mask & 0x0008)) - { - error = TRUE; - LL_WARNS("RenderState") << "GL still has GL_TEXTURE_COORD_ARRAY enabled on channel 1." << LL_ENDL; - if (gDebugSession) - { - gFailLog << "GL still has GL_TEXTURE_COORD_ARRAY enabled on channel 1." << std::endl; - } - } - } - else - { - if (data_mask & 0x0008) - { - error = TRUE; - LL_WARNS("RenderState") << "GL does not have GL_TEXTURE_COORD_ARRAY enabled on channel 1." << LL_ENDL; - if (gDebugSession) - { - gFailLog << "GL does not have GL_TEXTURE_COORD_ARRAY enabled on channel 1." << std::endl; - } - } - } - - /*if (glIsEnabled(GL_TEXTURE_2D)) - { - if (!(data_mask & 0x0008)) - { - error = TRUE; - LL_WARNS("RenderState") << "GL still has GL_TEXTURE_2D enabled on channel 1." << LL_ENDL; - if (gDebugSession) - { - gFailLog << "GL still has GL_TEXTURE_2D enabled on channel 1." << std::endl; - } - } - } - else - { - if (data_mask & 0x0008) - { - error = TRUE; - LL_WARNS("RenderState") << "GL does not have GL_TEXTURE_2D enabled on channel 1." << LL_ENDL; - if (gDebugSession) - { - gFailLog << "GL does not have GL_TEXTURE_2D enabled on channel 1." << std::endl; - } - } - }*/ - - glClientActiveTextureARB(GL_TEXTURE0_ARB); - gGL.getTexUnit(0)->activate(); - - if (LLGLSLShader::sNoFixedFunction) - { //make sure vertex attribs are all disabled - GLint count; - glGetIntegerv(GL_MAX_VERTEX_ATTRIBS_ARB, &count); - for (GLint i = 0; i < count; i++) - { - GLint enabled; - glGetVertexAttribivARB((GLuint) i, GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB, &enabled); - if (enabled) - { - error = TRUE; - LL_WARNS("RenderState") << "GL still has vertex attrib array " << i << " enabled." << LL_ENDL; - if (gDebugSession) - { - gFailLog << "GL still has vertex attrib array " << i << " enabled." << std::endl; - } - } - } - } - - if (error) - { - if (gDebugSession) - { - ll_fail("LLGLState::checkClientArrays failed."); - } - else - { - LL_GL_ERRS << "GL client array corruption detected. " << msg << LL_ENDL; - } - } -} - /////////////////////////////////////////////////////////////////////// LLGLState::LLGLState(LLGLenum state, S32 enabled) : mState(state), mWasEnabled(FALSE), mIsEnabled(FALSE) { LL_PROFILE_ZONE_SCOPED; - if (LLGLSLShader::sNoFixedFunction) - { //always ignore state that's deprecated post GL 3.0 - switch (state) - { - case GL_ALPHA_TEST: - case GL_NORMALIZE: - case GL_TEXTURE_GEN_R: - case GL_TEXTURE_GEN_S: - case GL_TEXTURE_GEN_T: - case GL_TEXTURE_GEN_Q: - case GL_LIGHTING: - case GL_COLOR_MATERIAL: - case GL_FOG: - case GL_LINE_STIPPLE: - case GL_POLYGON_STIPPLE: - mState = 0; - break; - } + switch (state) + { + case GL_ALPHA_TEST: + case GL_NORMALIZE: + case GL_TEXTURE_GEN_R: + case GL_TEXTURE_GEN_S: + case GL_TEXTURE_GEN_T: + case GL_TEXTURE_GEN_Q: + case GL_LIGHTING: + case GL_COLOR_MATERIAL: + case GL_FOG: + case GL_LINE_STIPPLE: + case GL_POLYGON_STIPPLE: + mState = 0; + break; } + stop_glerror(); if (mState) { @@ -2688,22 +2511,10 @@ LLGLSPipelineSkyBox::LLGLSPipelineSkyBox() , mCullFace(GL_CULL_FACE) , mSquashClip() { - if (!LLGLSLShader::sNoFixedFunction) - { - glDisable(GL_LIGHTING); - glDisable(GL_FOG); - glDisable(GL_CLIP_PLANE0); - } } LLGLSPipelineSkyBox::~LLGLSPipelineSkyBox() { - if (!LLGLSLShader::sNoFixedFunction) - { - glEnable(GL_LIGHTING); - glEnable(GL_FOG); - glEnable(GL_CLIP_PLANE0); - } } LLGLSPipelineDepthTestSkyBox::LLGLSPipelineDepthTestSkyBox(bool depth_test, bool depth_write) -- cgit v1.2.3 From e7830b39f01d9f9c82e9e2029634dffb8386b24e Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2021 15:07:31 +0000 Subject: SL-16436 and SL-16327 Fix for RenderDebugGL test failures and fix for grey textures --- indra/llrender/llgl.cpp | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 58183adfce..f24bf6ec78 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -88,24 +88,32 @@ void APIENTRY gl_debug_callback(GLenum source, { if (gGLDebugLoggingEnabled) { - if (severity == GL_DEBUG_SEVERITY_HIGH_ARB) - { - LL_WARNS() << "----- GL ERROR --------" << LL_ENDL; - } - else - { - LL_WARNS() << "----- GL WARNING -------" << LL_ENDL; - } - LL_WARNS() << "Type: " << std::hex << type << LL_ENDL; - LL_WARNS() << "ID: " << std::hex << id << LL_ENDL; - LL_WARNS() << "Severity: " << std::hex << severity << LL_ENDL; - LL_WARNS() << "Message: " << message << LL_ENDL; - LL_WARNS() << "-----------------------" << LL_ENDL; - if (severity == GL_DEBUG_SEVERITY_HIGH_ARB) - { - LL_ERRS() << "Halting on GL Error" << LL_ENDL; - } -} + + if (severity != GL_DEBUG_SEVERITY_HIGH_ARB && + severity != GL_DEBUG_SEVERITY_MEDIUM_ARB && + severity != GL_DEBUG_SEVERITY_LOW_ARB) + { //suppress out-of-spec messages sent by nvidia driver (mostly vertexbuffer hints) + return; + } + + if (severity == GL_DEBUG_SEVERITY_HIGH_ARB) + { + LL_WARNS() << "----- GL ERROR --------" << LL_ENDL; + } + else + { + LL_WARNS() << "----- GL WARNING -------" << LL_ENDL; + } + LL_WARNS() << "Type: " << std::hex << type << LL_ENDL; + LL_WARNS() << "ID: " << std::hex << id << LL_ENDL; + LL_WARNS() << "Severity: " << std::hex << severity << LL_ENDL; + LL_WARNS() << "Message: " << message << LL_ENDL; + LL_WARNS() << "-----------------------" << LL_ENDL; + if (severity == GL_DEBUG_SEVERITY_HIGH_ARB) + { + LL_ERRS() << "Halting on GL Error" << LL_ENDL; + } + } } #endif -- cgit v1.2.3 From 5e5be92d79b6ad49f971e7b2f2ddd359d762c163 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 6 Dec 2021 15:29:34 +0000 Subject: SL-16202 Put Multi-threaded GL behind a feature flag and update featuretable (decruftify settings, compatibility pass). --- indra/llrender/llgl.cpp | 95 ++++--------------------------------------------- 1 file changed, 7 insertions(+), 88 deletions(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index f24bf6ec78..64db095dec 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -161,7 +161,6 @@ LLMatrix4 gGLObliqueProjectionInverse; std::list LLGLUpdate::sGLQ; #if (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS -// ATI prototypes #if LL_WINDOWS PFNGLGETSTRINGIPROC glGetStringi = NULL; @@ -208,21 +207,6 @@ PFNGLGETSYNCIVPROC glGetSynciv = NULL; PFNGLBUFFERPARAMETERIAPPLEPROC glBufferParameteriAPPLE = NULL; PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC glFlushMappedBufferRangeAPPLE = NULL; -// vertex object prototypes -PFNGLNEWOBJECTBUFFERATIPROC glNewObjectBufferATI = NULL; -PFNGLISOBJECTBUFFERATIPROC glIsObjectBufferATI = NULL; -PFNGLUPDATEOBJECTBUFFERATIPROC glUpdateObjectBufferATI = NULL; -PFNGLGETOBJECTBUFFERFVATIPROC glGetObjectBufferfvATI = NULL; -PFNGLGETOBJECTBUFFERIVATIPROC glGetObjectBufferivATI = NULL; -PFNGLFREEOBJECTBUFFERATIPROC glFreeObjectBufferATI = NULL; -PFNGLARRAYOBJECTATIPROC glArrayObjectATI = NULL; -PFNGLVERTEXATTRIBARRAYOBJECTATIPROC glVertexAttribArrayObjectATI = NULL; -PFNGLGETARRAYOBJECTFVATIPROC glGetArrayObjectfvATI = NULL; -PFNGLGETARRAYOBJECTIVATIPROC glGetArrayObjectivATI = NULL; -PFNGLVARIANTARRAYOBJECTATIPROC glVariantObjectArrayATI = NULL; -PFNGLGETVARIANTARRAYOBJECTFVATIPROC glGetVariantArrayObjectfvATI = NULL; -PFNGLGETVARIANTARRAYOBJECTIVATIPROC glGetVariantArrayObjectivATI = NULL; - // GL_ARB_occlusion_query PFNGLGENQUERIESARBPROC glGenQueriesARB = NULL; PFNGLDELETEQUERIESARBPROC glDeleteQueriesARB = NULL; @@ -462,14 +446,9 @@ LLGLManager::LLGLManager() : mHasCubeMap(FALSE), mHasDebugOutput(FALSE), - mIsATI(FALSE), + mIsAMD(FALSE), mIsNVIDIA(FALSE), mIsIntel(FALSE), - mIsGF2or4MX(FALSE), - mIsGF3(FALSE), - mIsGFFX(FALSE), - mATIOffsetVerticalLines(FALSE), - mATIOldDriver(FALSE), #if LL_DARWIN mIsMobileGF(FALSE), #endif @@ -628,59 +607,17 @@ bool LLGLManager::initGL() // Trailing space necessary to keep "nVidia Corpor_ati_on" cards // from being recognized as ATI. + // NOTE: AMD has been pretty good about not breaking this check, do not rename without good reason if (mGLVendor.substr(0,4) == "ATI ") { - mGLVendorShort = "ATI"; + mGLVendorShort = "AMD"; // *TODO: Fix this? - mIsATI = TRUE; - -#if LL_WINDOWS && !LL_MESA_HEADLESS - if (mDriverVersionRelease < 3842) - { - mATIOffsetVerticalLines = TRUE; - } -#endif // LL_WINDOWS - -#if (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS - // count any pre OpenGL 3.0 implementation as an old driver - if (mGLVersion < 3.f) - { - mATIOldDriver = TRUE; - } -#endif // (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS + mIsAMD = TRUE; } else if (mGLVendor.find("NVIDIA ") != std::string::npos) { mGLVendorShort = "NVIDIA"; mIsNVIDIA = TRUE; - if ( mGLRenderer.find("GEFORCE4 MX") != std::string::npos - || mGLRenderer.find("GEFORCE2") != std::string::npos - || mGLRenderer.find("GEFORCE 2") != std::string::npos - || mGLRenderer.find("GEFORCE4 460 GO") != std::string::npos - || mGLRenderer.find("GEFORCE4 440 GO") != std::string::npos - || mGLRenderer.find("GEFORCE4 420 GO") != std::string::npos) - { - mIsGF2or4MX = TRUE; - } - else if (mGLRenderer.find("GEFORCE FX") != std::string::npos - || mGLRenderer.find("QUADRO FX") != std::string::npos - || mGLRenderer.find("NV34") != std::string::npos) - { - mIsGFFX = TRUE; - } - else if(mGLRenderer.find("GEFORCE3") != std::string::npos) - { - mIsGF3 = TRUE; - } -#if LL_DARWIN - else if ((mGLRenderer.find("9400M") != std::string::npos) - || (mGLRenderer.find("9600M") != std::string::npos) - || (mGLRenderer.find("9800M") != std::string::npos)) - { - mIsMobileGF = TRUE; - } -#endif - } else if (mGLVendor.find("INTEL") != std::string::npos #if LL_LINUX @@ -834,12 +771,6 @@ bool LLGLManager::initGL() //HACK always disable texture multisample, use FXAA instead mHasTextureMultisample = FALSE; #if LL_WINDOWS - if (mIsATI) - { //using multisample textures on ATI results in black screen for some reason - mHasTextureMultisample = FALSE; - } - - if (mIsIntel && mGLVersion <= 3.f) { //never try to use framebuffer objects on older intel drivers (crashy) mHasFramebufferObject = FALSE; @@ -1004,14 +935,9 @@ void LLGLManager::asLLSD(LLSD& info) info["has_texture_srgb_decode"] = mHasTexturesRGBDecode; // Vendor-specific extensions - info["is_ati"] = mIsATI; + info["is_ati"] = mIsAMD; // note, do not rename is_ati to is_amd without coordinating with DW info["is_nvidia"] = mIsNVIDIA; info["is_intel"] = mIsIntel; - info["is_gf2or4mx"] = mIsGF2or4MX; - info["is_gf3"] = mIsGF3; - info["is_gf_gfx"] = mIsGFFX; - info["ati_offset_vertical_lines"] = mATIOffsetVerticalLines; - info["ati_old_driver"] = mATIOldDriver; // Other fields info["has_requirements"] = mHasRequirements; @@ -1138,7 +1064,7 @@ void LLGLManager::initExtensions() mHasDebugOutput = ExtensionExists("GL_ARB_debug_output", gGLHExts.mSysExts); mHasTransformFeedback = mGLVersion >= 4.f ? TRUE : FALSE; #if !LL_DARWIN - mHasPointParameters = !mIsATI && ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts); + mHasPointParameters = ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts); #endif #endif @@ -1256,14 +1182,7 @@ void LLGLManager::initExtensions() LL_INFOS("RenderInit") << "Disabling mip-map generation for Intel GPUs" << LL_ENDL; mHasMipMapGeneration = FALSE; } -#if !LL_DARWIN - if (mIsATI && mHasMipMapGeneration) - { - LL_INFOS("RenderInit") << "Disabling mip-map generation for ATI GPUs (performance opt)" << LL_ENDL; - mHasMipMapGeneration = FALSE; - } -#endif - + // Misc glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, (GLint*) &mGLMaxVertexRange); glGetIntegerv(GL_MAX_ELEMENTS_INDICES, (GLint*) &mGLMaxIndexRange); -- cgit v1.2.3 From 8a18b5e427e261ccc60eeb673f140eff3690bf7b Mon Sep 17 00:00:00 2001 From: Runitai Linden Date: Tue, 7 Dec 2021 16:32:38 -0600 Subject: SL-16462 Fix for broken water clip plane during water reflection/refraction map render. --- indra/llrender/llgl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 64db095dec..18a79d5264 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -2112,7 +2112,8 @@ LLGLUserClipPlane::LLGLUserClipPlane(const LLPlane& p, const glh::matrix4f& mode mModelview = modelview; mProjection = projection; - setPlane(p[0], p[1], p[2], p[3]); + //flip incoming LLPlane to get consistent behavior compared to frustum culling + setPlane(-p[0], -p[1], -p[2], -p[3]); } } -- cgit v1.2.3 From 206a8bb30f894d5b7c05bad34f2700fc08bd4d3a Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 13 Jan 2022 12:34:23 -0800 Subject: SL-16606: Add profiler category PIPELINE --- indra/llrender/llgl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 18a79d5264..12da961cef 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1868,7 +1868,7 @@ void LLGLState::checkTextureChannels(const std::string& msg) LLGLState::LLGLState(LLGLenum state, S32 enabled) : mState(state), mWasEnabled(FALSE), mIsEnabled(FALSE) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; switch (state) { case GL_ALPHA_TEST: @@ -1925,7 +1925,7 @@ void LLGLState::setEnabled(S32 enabled) LLGLState::~LLGLState() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; stop_glerror(); if (mState) { @@ -2184,7 +2184,7 @@ void LLGLNamePool::cleanup() GLuint LLGLNamePool::allocate() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; #if LL_GL_NAME_POOLING for (name_list_t::iterator iter = mNameList.begin(); iter != mNameList.end(); ++iter) { -- cgit v1.2.3 From c38812aa154e01b3a0aac8c7a4a4134e866cfd0a Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 3 Feb 2022 11:11:46 -0800 Subject: SL-16727: Revert change causing llvieweroctree to not render reflections when shadows are set to projectors cause by commit bb379cb8cc --- indra/llrender/llgl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 12da961cef..922fcb867b 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1029,7 +1029,9 @@ void LLGLManager::initExtensions() mHasSync = ExtensionExists("GL_ARB_sync", gGLHExts.mSysExts); mHasMapBufferRange = ExtensionExists("GL_ARB_map_buffer_range", gGLHExts.mSysExts); mHasFlushBufferRange = ExtensionExists("GL_APPLE_flush_buffer_range", gGLHExts.mSysExts); - mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts); + // NOTE: Using extensions breaks reflections when Shadows are set to projector. See: SL-16727 + //mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts); + mHasDepthClamp = FALSE; // mask out FBO support when packed_depth_stencil isn't there 'cause we need it for LLRenderTarget -Brad #ifdef GL_ARB_framebuffer_object mHasFramebufferObject = ExtensionExists("GL_ARB_framebuffer_object", gGLHExts.mSysExts); -- cgit v1.2.3 From f47730b92c309092d0a5a95e2d49d7ad53230a97 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 14 Feb 2022 18:07:24 +0000 Subject: SL-16418 Media texture update stall fix. Make media texture updates use LLImageGL thread to update, fix AMD sync issue on ImageGL thread and install debug callbacks on LLImageGL thread when debug gl enabled. --- indra/llrender/llgl.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 922fcb867b..50a5972d28 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -757,17 +757,6 @@ bool LLGLManager::initGL() stop_glerror(); -#if LL_WINDOWS - if (mHasDebugOutput && gDebugGL) - { //setup debug output callback - //glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW_ARB, 0, NULL, GL_TRUE); - glDebugMessageCallbackARB((GLDEBUGPROCARB) gl_debug_callback, NULL); - glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB); - } -#endif - - stop_glerror(); - //HACK always disable texture multisample, use FXAA instead mHasTextureMultisample = FALSE; #if LL_WINDOWS -- cgit v1.2.3 From 0d6aa3c0fe184ae00899304cb3f71315f5c73314 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 17 Feb 2022 22:52:23 +0000 Subject: SL-16815 Remove frame stalls from occlusion queries, bumpmap updates, and querying for available video memory. --- indra/llrender/llgl.cpp | 90 +------------------------------------------------ 1 file changed, 1 insertion(+), 89 deletions(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 50a5972d28..639d1fba32 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -2150,95 +2150,6 @@ LLGLUserClipPlane::~LLGLUserClipPlane() disable(); } -LLGLNamePool::LLGLNamePool() -{ -} - -LLGLNamePool::~LLGLNamePool() -{ -} - -void LLGLNamePool::upkeep() -{ - std::sort(mNameList.begin(), mNameList.end(), CompareUsed()); -} - -void LLGLNamePool::cleanup() -{ - for (name_list_t::iterator iter = mNameList.begin(); iter != mNameList.end(); ++iter) - { - releaseName(iter->name); - } - - mNameList.clear(); -} - -GLuint LLGLNamePool::allocate() -{ - LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; -#if LL_GL_NAME_POOLING - for (name_list_t::iterator iter = mNameList.begin(); iter != mNameList.end(); ++iter) - { - if (!iter->used) - { - iter->used = TRUE; - return iter->name; - } - } - - NameEntry entry; - entry.name = allocateName(); - entry.used = TRUE; - mNameList.push_back(entry); - - return entry.name; -#else - return allocateName(); -#endif -} - -void LLGLNamePool::release(GLuint name) -{ -#if LL_GL_NAME_POOLING - for (name_list_t::iterator iter = mNameList.begin(); iter != mNameList.end(); ++iter) - { - if (iter->name == name) - { - if (iter->used) - { - iter->used = FALSE; - return; - } - else - { - LL_ERRS() << "Attempted to release a pooled name that is not in use!" << LL_ENDL; - } - } - } - LL_ERRS() << "Attempted to release a non pooled name!" << LL_ENDL; -#else - releaseName(name); -#endif -} - -//static -void LLGLNamePool::upkeepPools() -{ - for (auto& pool : instance_snapshot()) - { - pool.upkeep(); - } -} - -//static -void LLGLNamePool::cleanupPools() -{ - for (auto& pool : instance_snapshot()) - { - pool.cleanup(); - } -} - LLGLDepthTest::LLGLDepthTest(GLboolean depth_enabled, GLboolean write_enabled, GLenum depth_func) : mPrevDepthEnabled(sDepthEnabled), mPrevDepthFunc(sDepthFunc), mPrevWriteEnabled(sWriteEnabled) { @@ -2460,3 +2371,4 @@ extern "C" } #endif + -- cgit v1.2.3 From 904b16a0a7fddb1cd36de8a33d5475df93d9cabe Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 29 Sep 2020 23:39:00 +0300 Subject: SL-17124 switchContext and loadShaderFile crashes - Do not try initializing shaders if requirements are not met or if window does not exist - Warn user before closing window. Situation is unexpected, there is chance of more issues, like a freeze or a crash on close() - mHasMultitexture is a solid requirement, if it is not present, we won't be able to run --- indra/llrender/llgl.cpp | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 639d1fba32..18168d1c3f 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -722,20 +722,23 @@ bool LLGLManager::initGL() glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &num_tex_image_units); mNumTextureImageUnits = llmin(num_tex_image_units, 32); - if (LLRender::sGLCoreProfile) - { - mNumTextureUnits = llmin(mNumTextureImageUnits, MAX_GL_TEXTURE_UNITS); - } - else if (mHasMultitexture) - { - GLint num_tex_units; - glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &num_tex_units); - mNumTextureUnits = llmin(num_tex_units, (GLint)MAX_GL_TEXTURE_UNITS); - if (mIsIntel) - { - mNumTextureUnits = llmin(mNumTextureUnits, 2); - } - } + if (mHasMultitexture) + { + if (LLRender::sGLCoreProfile) + { + mNumTextureUnits = llmin(mNumTextureImageUnits, MAX_GL_TEXTURE_UNITS); + } + else + { + GLint num_tex_units; + glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &num_tex_units); + mNumTextureUnits = llmin(num_tex_units, (GLint)MAX_GL_TEXTURE_UNITS); + if (mIsIntel) + { + mNumTextureUnits = llmin(mNumTextureUnits, 2); + } + } + } else { mHasRequirements = FALSE; -- cgit v1.2.3