From 582dfc1e4c39471dac8c582f3a085e09abb3d07f Mon Sep 17 00:00:00 2001 From: Sebastian Marketsmueller <36425933+sebastianmunity3d@users.noreply.github.com> Date: Thu, 6 May 2021 10:58:37 -0700 Subject: [PATCH] Fix texture validation logic (#2509) * fix mip level computation for asmjs and add support for srgb textures in es2/webgl * fix BX_TRACE in glcontext_html5.cpp * fix wrong logic in texture validation Co-authored-by: Sebastian Marketsmueller Co-authored-by: Vladimir Vukicevic --- src/bgfx.cpp | 2 +- src/glcontext_html5.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index b38d97a69..a3cae55f8 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -4517,7 +4517,7 @@ namespace bgfx ); BGFX_ERROR_CHECK(false - || is3DTexture + || !is3DTexture || 0 != (g_caps.supported & BGFX_CAPS_TEXTURE_3D) , _err , BGFX_ERROR_TEXTURE_VALIDATION diff --git a/src/glcontext_html5.cpp b/src/glcontext_html5.cpp index 5110e85e7..0060253d1 100644 --- a/src/glcontext_html5.cpp +++ b/src/glcontext_html5.cpp @@ -140,7 +140,6 @@ namespace bgfx { namespace gl } error = (int) context; } - BX_TRACE("Failed to create WebGL context. (Canvas handle: '%s', last attempt error %d)", canvas, error); return NULL; }