summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-10-24 13:55:41 +0000
committerMoonchild <moonchild@palemoon.org>2023-10-24 13:55:41 +0000
commitdd2fbc763ad2c5eaf3fdfaabfd96fbf7b48c473b (patch)
tree7554cd546058480423aa91b3bd7da5a9fe6910b1
parent6df4c1874704597159f84e7a8cedca6157f25ef8 (diff)
parent1889edcea828d112ef578a3c6a9f49457028d310 (diff)
downloaduxp-dd2fbc763ad2c5eaf3fdfaabfd96fbf7b48c473b.tar.gz
Merge pull request 'Treat all GLSL versions >=450 as 450' (#2356) from Basilisk-Dev/UXP-contrib:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2356
-rw-r--r--dom/canvas/WebGLShaderValidator.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/dom/canvas/WebGLShaderValidator.cpp b/dom/canvas/WebGLShaderValidator.cpp
index bf2df82f71..7ea9f11a70 100644
--- a/dom/canvas/WebGLShaderValidator.cpp
+++ b/dom/canvas/WebGLShaderValidator.cpp
@@ -9,6 +9,7 @@
#include "angle/ShaderLang.h"
#include "gfxPrefs.h"
#include "GLContext.h"
+#include "mozilla/gfx/Logging.h"
#include "mozilla/Preferences.h"
#include "MurmurHash3.h"
#include "nsPrintfCString.h"
@@ -135,9 +136,13 @@ ShaderOutput(gl::GLContext* gl)
case 420: return SH_GLSL_420_CORE_OUTPUT;
case 430: return SH_GLSL_430_CORE_OUTPUT;
case 440: return SH_GLSL_440_CORE_OUTPUT;
- case 450: return SH_GLSL_450_CORE_OUTPUT;
default:
- MOZ_ASSERT(false, "GFX: Unexpected GLSL version.");
+ if (version >= 450) {
+ // "OpenGL 4.6 is also guaranteed to support all previous versions of the
+ // OpenGL Shading Language back to version 1.10."
+ return SH_GLSL_450_CORE_OUTPUT;
+ }
+ gfxCriticalNote << "Unexpected GLSL version: " << version;
}
}