mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 03:27:31 +09:00
[WebGL] Turn on more validation/error checking in webgl (when not on Win)
This commit is contained in:
parent
7fce3acfa9
commit
acd204e85e
3 changed files with 16 additions and 3 deletions
|
|
@ -676,9 +676,11 @@ WebGLContext::CreateAndInitGL(bool forceEnabled,
|
||||||
std::vector<FailureReason>* const out_failReasons)
|
std::vector<FailureReason>* const out_failReasons)
|
||||||
{
|
{
|
||||||
const gl::SurfaceCaps baseCaps = BaseCaps(mOptions, this);
|
const gl::SurfaceCaps baseCaps = BaseCaps(mOptions, this);
|
||||||
gl::CreateContextFlags flags = gl::CreateContextFlags::NO_VALIDATION;
|
gl::CreateContextFlags flags = gl::CreateContextFlags::NONE;
|
||||||
bool tryNativeGL = true;
|
|
||||||
bool tryANGLE = false;
|
if (Preferences::GetBool("webgl.gl_khr_no_validation", false)) {
|
||||||
|
flags |= gl::CreateContextFlags::NO_VALIDATION;
|
||||||
|
}
|
||||||
|
|
||||||
if (forceEnabled) {
|
if (forceEnabled) {
|
||||||
flags |= gl::CreateContextFlags::FORCE_ENABLE_HARDWARE;
|
flags |= gl::CreateContextFlags::FORCE_ENABLE_HARDWARE;
|
||||||
|
|
@ -694,6 +696,9 @@ WebGLContext::CreateAndInitGL(bool forceEnabled,
|
||||||
|
|
||||||
const bool useEGL = PR_GetEnv("MOZ_WEBGL_FORCE_EGL");
|
const bool useEGL = PR_GetEnv("MOZ_WEBGL_FORCE_EGL");
|
||||||
|
|
||||||
|
bool tryNativeGL = true;
|
||||||
|
bool tryANGLE = false;
|
||||||
|
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
tryNativeGL = false;
|
tryNativeGL = false;
|
||||||
tryANGLE = true;
|
tryANGLE = true;
|
||||||
|
|
|
||||||
|
|
@ -2188,6 +2188,7 @@ WebGLTexture::CopyTexImage2D(TexImageTarget target, GLint level, GLenum internal
|
||||||
srcTotalWidth, srcTotalHeight, srcUsage, 0, 0, 0, width,
|
srcTotalWidth, srcTotalHeight, srcUsage, 0, 0, 0, width,
|
||||||
height, dstUsage))
|
height, dstUsage))
|
||||||
{
|
{
|
||||||
|
Truncate();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4338,6 +4338,13 @@ pref("webgl.dxgl.enabled", true);
|
||||||
pref("webgl.dxgl.needs-finish", false);
|
pref("webgl.dxgl.needs-finish", false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Disable ANGLE's validation layer?
|
||||||
|
#ifdef XP_WIN
|
||||||
|
pref("webgl.gl_khr_no_validation", true);
|
||||||
|
#else
|
||||||
|
pref("webgl.gl_khr_no_validation", false);
|
||||||
|
#endif
|
||||||
|
|
||||||
pref("gfx.offscreencanvas.enabled", false);
|
pref("gfx.offscreencanvas.enabled", false);
|
||||||
|
|
||||||
// Stagefright prefs
|
// Stagefright prefs
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue