From 7be9c43f286671893ff0a9dee13d721a6731255b Mon Sep 17 00:00:00 2001 From: Brad Linden <46733234+brad-linden@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:49:09 -0800 Subject: brad/2744 handle shader errors (#3105) * Partial solution to secondlife/viewer#2744 crash with better error handling. Handles shader compile errors better, and should turn crash into an LL_ERRS assertion failure. Strengthed more assertions and improved shader error line numbers * Even more error handling to get a handle on crash secondlife/viewer#2744 * Improved GLSL correctness on Intel chips that lack OpenGL 4.6 support. secondlife/viewer#2744 * Removed non-working fallback code for gDeferredPostProgram * Fixed incorrect llmax call --- indra/newview/llfeaturemanager.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'indra/newview/llfeaturemanager.cpp') diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index b5d8f70c2e..c5d074a5e8 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -655,6 +655,21 @@ void LLFeatureManager::applyBaseMasks() if (gGLManager.mIsIntel) { maskFeatures("Intel"); + if (gGLManager.mGLVersion < 4.59f) + { + // if we don't have OpenGL 4.6 on intel, set it to OpenGL 3.3 + // we also want to trigger the GL3 fallbacks on these chipsets + // this is expected to be mainly pre-Haswell Intel HD Graphics 4X00 and 5X00. + // A lot of these chips claim 4.3 or 4.4 support, but don't seem to work. + // https://code.blender.org/2019/04/supported-gpus-in-blender-2-80/ + // https://docs.blender.org/manual/en/latest/troubleshooting/gpu/windows/intel.html#legacy-intel-hd-4000-5000 + // https://www.intel.com/content/www/us/en/support/articles/000005524/graphics.html + // this will disable things like reflection probes, HDR, FXAA and SMAA + gGLManager.mGLVersion = llmin(gGLManager.mGLVersion, 3.33f); + // and select GLSL version for OpenGL 3.3 + gGLManager.mGLSLVersionMajor = 3; + gGLManager.mGLSLVersionMinor = 30; + } } if (gGLManager.mIsApple) { -- cgit v1.2.3