summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bx
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-06-08 19:50:19 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-06-08 20:42:23 +0200
commita3af73bafcac0f94de44430b6e2b521aac5481a9 (patch)
tree0f46ad9c3575bdfd58dfa6140c24d01da30b787c /3rdparty/bx
parente8cb3e06d030cd4a04df0db786081af6436288c2 (diff)
BGFX and BX update (nw)
Diffstat (limited to '3rdparty/bx')
-rw-r--r--3rdparty/bx/include/bx/fpumath.h24
-rw-r--r--3rdparty/bx/scripts/toolchain.lua70
-rwxr-xr-x3rdparty/bx/tools/bin/darwin/geniebin471328 -> 483616 bytes
-rw-r--r--3rdparty/bx/tools/bin/darwin/ninjabin171356 -> 176588 bytes
-rwxr-xr-x3rdparty/bx/tools/bin/linux/geniebin441960 -> 458392 bytes
-rw-r--r--3rdparty/bx/tools/bin/linux/ninjabin166960 -> 175240 bytes
-rw-r--r--3rdparty/bx/tools/bin/windows/genie.exebin448512 -> 460800 bytes
-rw-r--r--3rdparty/bx/tools/bin/windows/ninja.exebin310272 -> 396800 bytes
8 files changed, 66 insertions, 28 deletions
diff --git a/3rdparty/bx/include/bx/fpumath.h b/3rdparty/bx/include/bx/fpumath.h
index 2335ad4f2f3..5f64564f688 100644
--- a/3rdparty/bx/include/bx/fpumath.h
+++ b/3rdparty/bx/include/bx/fpumath.h
@@ -341,6 +341,30 @@ namespace bx
_result[2] = 1.0f / _a[2];
}
+ inline void vec3TangentFrame(const float* _n, float* _t, float* _b)
+ {
+ const float nx = _n[0];
+ const float ny = _n[1];
+ const float nz = _n[2];
+
+ if (bx::fabsolute(nx) > bx::fabsolute(nz) )
+ {
+ float invLen = 1.0f / bx::fsqrt(nx*nx + nz*nz);
+ _t[0] = -nz * invLen;
+ _t[1] = 0.0f;
+ _t[2] = nx * invLen;
+ }
+ else
+ {
+ float invLen = 1.0f / bx::fsqrt(ny*ny + nz*nz);
+ _t[0] = 0.0f;
+ _t[1] = nz * invLen;
+ _t[2] = -ny * invLen;
+ }
+
+ bx::vec3Cross(_b, _n, _t);
+ }
+
inline void quatIdentity(float* _result)
{
_result[0] = 0.0f;
diff --git a/3rdparty/bx/scripts/toolchain.lua b/3rdparty/bx/scripts/toolchain.lua
index a77b5f71ebd..5ff98ccf8c1 100644
--- a/3rdparty/bx/scripts/toolchain.lua
+++ b/3rdparty/bx/scripts/toolchain.lua
@@ -13,30 +13,32 @@ function toolchain(_buildDir, _libDir)
value = "GCC",
description = "Choose GCC flavor",
allowed = {
- { "android-arm", "Android - ARM" },
- { "android-mips", "Android - MIPS" },
- { "android-x86", "Android - x86" },
- { "asmjs", "Emscripten/asm.js" },
- { "freebsd", "FreeBSD" },
- { "linux-gcc", "Linux (GCC compiler)" },
- { "linux-gcc-5", "Linux (GCC-5 compiler)" },
- { "linux-clang", "Linux (Clang compiler)" },
- { "linux-mips-gcc", "Linux (MIPS, GCC compiler)" },
- { "linux-arm-gcc", "Linux (ARM, GCC compiler)" },
- { "ios-arm", "iOS - ARM" },
- { "ios-simulator", "iOS - Simulator" },
- { "tvos-arm64", "tvOS - ARM64" },
- { "tvos-simulator", "tvOS - Simulator" },
- { "mingw-gcc", "MinGW" },
- { "mingw-clang", "MinGW (clang compiler)" },
- { "nacl", "Native Client" },
- { "nacl-arm", "Native Client - ARM" },
- { "netbsd", "NetBSD" },
- { "osx", "OSX" },
- { "pnacl", "Native Client - PNaCl" },
- { "ps4", "PS4" },
- { "qnx-arm", "QNX/Blackberry - ARM" },
- { "rpi", "RaspberryPi" },
+ { "android-arm", "Android - ARM" },
+ { "android-mips", "Android - MIPS" },
+ { "android-x86", "Android - x86" },
+ { "asmjs", "Emscripten/asm.js" },
+ { "freebsd", "FreeBSD" },
+ { "linux-gcc", "Linux (GCC compiler)" },
+ { "linux-gcc-afl", "Linux (GCC + AFL fuzzer)" },
+ { "linux-gcc-5", "Linux (GCC-5 compiler)" },
+ { "linux-clang", "Linux (Clang compiler)" },
+ { "linux-clang-afl", "Linux (Clang + AFL fuzzer)" },
+ { "linux-mips-gcc", "Linux (MIPS, GCC compiler)" },
+ { "linux-arm-gcc", "Linux (ARM, GCC compiler)" },
+ { "ios-arm", "iOS - ARM" },
+ { "ios-simulator", "iOS - Simulator" },
+ { "tvos-arm64", "tvOS - ARM64" },
+ { "tvos-simulator", "tvOS - Simulator" },
+ { "mingw-gcc", "MinGW" },
+ { "mingw-clang", "MinGW (clang compiler)" },
+ { "nacl", "Native Client" },
+ { "nacl-arm", "Native Client - ARM" },
+ { "netbsd", "NetBSD" },
+ { "osx", "OSX" },
+ { "pnacl", "Native Client - PNaCl" },
+ { "ps4", "PS4" },
+ { "qnx-arm", "QNX/Blackberry - ARM" },
+ { "rpi", "RaspberryPi" },
},
}
@@ -120,7 +122,7 @@ function toolchain(_buildDir, _libDir)
tvosPlatform = _OPTIONS["with-tvos"]
end
- if _ACTION == "gmake" then
+ if _ACTION == "gmake" or _ACTION == "ninja" then
if nil == _OPTIONS["gcc"] then
print("GCC flavor must be specified!")
@@ -206,6 +208,12 @@ function toolchain(_buildDir, _libDir)
elseif "linux-gcc" == _OPTIONS["gcc"] then
location (path.join(_buildDir, "projects", _ACTION .. "-linux"))
+ elseif "linux-gcc-afl" == _OPTIONS["gcc"] then
+ premake.gcc.cc = "afl-gcc"
+ premake.gcc.cxx = "afl-g++"
+ premake.gcc.ar = "ar"
+ location (path.join(_buildDir, "projects", _ACTION .. "-linux"))
+
elseif "linux-gcc-5" == _OPTIONS["gcc"] then
premake.gcc.cc = "gcc-5"
premake.gcc.cxx = "g++-5"
@@ -218,6 +226,12 @@ function toolchain(_buildDir, _libDir)
premake.gcc.ar = "ar"
location (path.join(_buildDir, "projects", _ACTION .. "-linux-clang"))
+ elseif "linux-clang-afl" == _OPTIONS["gcc"] then
+ premake.gcc.cc = "afl-clang"
+ premake.gcc.cxx = "afl-clang++"
+ premake.gcc.ar = "ar"
+ location (path.join(_buildDir, "projects", _ACTION .. "-linux-clang"))
+
elseif "linux-mips-gcc" == _OPTIONS["gcc"] then
location (path.join(_buildDir, "projects", _ACTION .. "-linux-mips-gcc"))
@@ -610,7 +624,7 @@ function toolchain(_buildDir, _libDir)
"-mfpmath=sse",
}
- configuration { "linux-gcc or linux-clang" }
+ configuration { "linux-gcc* or linux-clang*" }
buildoptions {
"-msse2",
"-Wunused-value",
@@ -643,7 +657,7 @@ function toolchain(_buildDir, _libDir)
"-m64",
}
- configuration { "linux-clang", "x32" }
+ configuration { "linux-clang*", "x32" }
targetdir (path.join(_buildDir, "linux32_clang/bin"))
objdir (path.join(_buildDir, "linux32_clang/obj"))
libdirs { path.join(_libDir, "lib/linux32_clang") }
@@ -651,7 +665,7 @@ function toolchain(_buildDir, _libDir)
"-m32",
}
- configuration { "linux-clang", "x64" }
+ configuration { "linux-clang*", "x64" }
targetdir (path.join(_buildDir, "linux64_clang/bin"))
objdir (path.join(_buildDir, "linux64_clang/obj"))
libdirs { path.join(_libDir, "lib/linux64_clang") }
diff --git a/3rdparty/bx/tools/bin/darwin/genie b/3rdparty/bx/tools/bin/darwin/genie
index d301143236e..a092d05c1d2 100755
--- a/3rdparty/bx/tools/bin/darwin/genie
+++ b/3rdparty/bx/tools/bin/darwin/genie
Binary files differ
diff --git a/3rdparty/bx/tools/bin/darwin/ninja b/3rdparty/bx/tools/bin/darwin/ninja
index 64fcacc550c..d26afc28e73 100644
--- a/3rdparty/bx/tools/bin/darwin/ninja
+++ b/3rdparty/bx/tools/bin/darwin/ninja
Binary files differ
diff --git a/3rdparty/bx/tools/bin/linux/genie b/3rdparty/bx/tools/bin/linux/genie
index 6d02a8dc8ec..b497f5dc9b1 100755
--- a/3rdparty/bx/tools/bin/linux/genie
+++ b/3rdparty/bx/tools/bin/linux/genie
Binary files differ
diff --git a/3rdparty/bx/tools/bin/linux/ninja b/3rdparty/bx/tools/bin/linux/ninja
index e4a6202d999..189832fdb4b 100644
--- a/3rdparty/bx/tools/bin/linux/ninja
+++ b/3rdparty/bx/tools/bin/linux/ninja
Binary files differ
diff --git a/3rdparty/bx/tools/bin/windows/genie.exe b/3rdparty/bx/tools/bin/windows/genie.exe
index 46060c4e72e..8111412afcf 100644
--- a/3rdparty/bx/tools/bin/windows/genie.exe
+++ b/3rdparty/bx/tools/bin/windows/genie.exe
Binary files differ
diff --git a/3rdparty/bx/tools/bin/windows/ninja.exe b/3rdparty/bx/tools/bin/windows/ninja.exe
index 40f662e32ac..1b30c1eb432 100644
--- a/3rdparty/bx/tools/bin/windows/ninja.exe
+++ b/3rdparty/bx/tools/bin/windows/ninja.exe
Binary files differ