From 9e441a546fb59bf8a8b8e41a30c20ce9c2e2a5f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 16 Mar 2014 22:36:53 -0700 Subject: [PATCH] Removed workaround from old Emscripten SDK. --- README.md | 7 +++++-- src/renderer_gl.cpp | 12 ++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 52966ece..9772a37f 100644 --- a/README.md +++ b/README.md @@ -171,11 +171,14 @@ draw calls per frame. | i7-920 2.66 | ES2-Chrome33 | GTX650Ti | Clang | JIT | asm.js | 14 | 2744 | | '13 Nexus 10 | ES2 | Mali T604 | GCC | ARM | Android | 13 | 2197 | | '13 Nexus 7 | ES2 | S4 Pro | GCC | ARM | Android | 12 | 1728 | -| i7-920 2.66 | ES2-FF27 | GTX650Ti | Clang | JIT | asm.js | 12 | 1728 | +| i7-920 2.66 | ES2-FF27* | GTX650Ti | Clang | JIT | asm.js | 12 | 1728 | | Xperia Z | ES2 | Adreno320 | GCC | ARM | Android | 11 | 1331 | | i7-920 2.66 | ES2-Mali | GTX650Ti | VS2008 | x86 | Windows7 | 6 | 216 | -asm.js build is here: [https://gist.github.com/bkaradzic/9593537](https://gist.github.com/bkaradzic/9593537) +_* With Firefox 27 about:config adjustments webgl.prefer-native-gl = true, and +layout.frame_rate = 500, asm.js can do 4913 @ 60Hz._ + +asm.js build is here: [https://gist.github.com/bkaradzic/9594247](https://gist.github.com/bkaradzic/9594247) ### [18-ibl](https://github.com/bkaradzic/bgfx/tree/master/examples/18-ibl) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 7dea2ec5..7ddaed84 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -1682,14 +1682,10 @@ namespace bgfx GL_CHECK(glGetProgramiv(m_id, GL_ACTIVE_ATTRIBUTES, &activeAttribs) ); GL_CHECK(glGetProgramiv(m_id, GL_ACTIVE_UNIFORMS, &activeUniforms) ); - GLint maxLength = 512; - if (!BX_ENABLED(BX_PLATFORM_EMSCRIPTEN) ) - { - GLint max0, max1; - GL_CHECK(glGetProgramiv(m_id, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &max0) ); - GL_CHECK(glGetProgramiv(m_id, GL_ACTIVE_UNIFORM_MAX_LENGTH, &max1) ); - maxLength = bx::uint32_max(max0, max1); - } + GLint max0, max1; + GL_CHECK(glGetProgramiv(m_id, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &max0) ); + GL_CHECK(glGetProgramiv(m_id, GL_ACTIVE_UNIFORM_MAX_LENGTH, &max1) ); + uint32_t maxLength = bx::uint32_max(max0, max1); char* name = (char*)alloca(maxLength + 1); BX_TRACE("Program %d", m_id);