@babylonjs/react-native 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/react-native-babylon.podspec +2 -0
- package/shared/BabylonNative/CMakeLists.txt +2 -0
- package/shared/BabylonNative/Repo/CMakeLists.txt +16 -12
- package/shared/BabylonNative/Repo/Core/Graphics/CMakeLists.txt +41 -21
- package/shared/BabylonNative/Repo/Core/Graphics/Include/Platform/iOS/Babylon/Graphics/Platform.h +2 -2
- package/shared/BabylonNative/Repo/Core/Graphics/Include/Platform/macOS/Babylon/Graphics/Platform.h +2 -2
- package/shared/BabylonNative/Repo/Core/Graphics/Include/Platform/visionOS/Babylon/Graphics/Platform.h +2 -2
- package/shared/BabylonNative/Repo/Core/Graphics/Include/RendererType/Metal/Babylon/Graphics/RendererType.h +6 -6
- package/shared/BabylonNative/Repo/Core/Graphics/InternalInclude/Babylon/Graphics/BgfxCallback.h +1 -1
- package/shared/BabylonNative/Repo/Core/Graphics/Source/BgfxCallback.cpp +32 -9
- package/shared/BabylonNative/Repo/Core/Graphics/Source/DeviceImpl.cpp +7 -5
- package/shared/BabylonNative/Repo/Core/Graphics/Source/{DeviceImpl_Metal.cpp → DeviceImpl_Metal.mm} +4 -3
- package/shared/BabylonNative/Repo/Core/Graphics/Source/DeviceImpl_iOS.mm +5 -3
- package/shared/BabylonNative/Repo/Core/Graphics/Source/DeviceImpl_macOS.mm +10 -1
- package/shared/BabylonNative/Repo/Core/Graphics/Source/DeviceImpl_visionOS.mm +2 -4
- package/shared/BabylonNative/Repo/Dependencies/CMakeLists.txt +77 -12
- package/shared/BabylonNative/Repo/Dependencies/xr/CMakeLists.txt +1 -3
- package/shared/BabylonNative/Repo/Plugins/ExternalTexture/CMakeLists.txt +1 -6
- package/shared/BabylonNative/Repo/Plugins/ExternalTexture/Source/ExternalTexture_D3D11.cpp +4 -0
- package/shared/BabylonNative/Repo/Plugins/ExternalTexture/Source/ExternalTexture_D3D12.cpp +4 -0
- package/shared/BabylonNative/Repo/Plugins/ExternalTexture/Source/{ExternalTexture_Metal.mm → ExternalTexture_Metal.cpp} +128 -120
- package/shared/BabylonNative/Repo/Plugins/NativeCamera/CMakeLists.txt +2 -2
- package/shared/BabylonNative/Repo/Plugins/NativeCamera/Source/Apple/CameraDevice.mm +5 -5
- package/shared/BabylonNative/Repo/Plugins/NativeEngine/CMakeLists.txt +2 -1
- package/shared/BabylonNative/Repo/Plugins/NativeEngine/Source/NativeEngine.cpp +2 -1
- package/shared/BabylonNative/Repo/Plugins/NativeEngine/Source/ShaderProvider.cpp +6 -6
- package/shared/BabylonNative/Repo/Plugins/NativeOptimizations/CMakeLists.txt +1 -2
- package/shared/BabylonNative/Repo/Plugins/NativeTracing/CMakeLists.txt +1 -2
- package/shared/BabylonNative/Repo/Plugins/NativeXr/Source/NativeXrImpl.cpp +1 -0
- package/shared/BabylonNative/Repo/Plugins/ShaderCache/CMakeLists.txt +0 -2
- package/shared/BabylonNative/Repo/Plugins/ShaderCache/Include/Babylon/Plugins/ShaderCache.h +2 -2
- package/shared/BabylonNative/Repo/Plugins/ShaderCache/Source/ShaderCache.cpp +2 -2
- package/shared/BabylonNative/Repo/Plugins/ShaderCache/Source/ShaderCacheImpl.cpp +4 -4
- package/shared/BabylonNative/Repo/Plugins/ShaderCache/Source/ShaderCacheImpl.h +2 -2
- package/shared/BabylonNative/Repo/Plugins/ShaderCompiler/Source/ShaderCompilerCommon.cpp +2 -0
- package/shared/BabylonNative/Repo/Plugins/ShaderCompiler/Source/ShaderCompilerTraversers.cpp +4 -0
- package/shared/BabylonNative/Repo/Plugins/TestUtils/CMakeLists.txt +6 -8
- package/shared/BabylonNative/Repo/Plugins/TestUtils/Include/Babylon/Plugins/TestUtils.h +0 -1
- package/shared/BabylonNative/Repo/Plugins/TestUtils/Source/TestUtils.cpp +20 -6
- package/shared/BabylonNative/Repo/Plugins/TestUtils/Source/TestUtils.h +13 -13
- package/shared/BabylonNative/Repo/Plugins/TestUtils/Source/{Android/TestUtilsImpl.cpp → TestUtils_Android.cpp} +1 -10
- package/shared/BabylonNative/Repo/Plugins/TestUtils/Source/{Unix/TestUtilsImpl.cpp → TestUtils_Unix.cpp} +10 -20
- package/shared/BabylonNative/Repo/Plugins/TestUtils/Source/{Win32/TestUtilsImpl.cpp → TestUtils_Win32.cpp} +10 -20
- package/shared/BabylonNative/Repo/Plugins/TestUtils/Source/{WinRT/TestUtilsImpl.cpp → TestUtils_WinRT.cpp} +9 -13
- package/shared/BabylonNative/Repo/Plugins/TestUtils/Source/TestUtils_iOS.mm +25 -0
- package/shared/BabylonNative/Repo/Plugins/TestUtils/Source/TestUtils_macOS.mm +50 -0
- package/shared/BabylonNative/Repo/Polyfills/Canvas/Source/Shaders/dx11/fs_boxblur.h +1 -1
- package/shared/BabylonNative/Repo/Polyfills/Canvas/Source/Shaders/dx11/fs_gaussblur.h +1 -1
- package/shared/BabylonNative/Repo/Polyfills/Canvas/Source/Shaders/dx11/fs_nanovg_fill.h +1 -1
- package/shared/BabylonNative/Repo/Polyfills/Canvas/Source/Shaders/dx11/vs_fspass.h +1 -1
- package/shared/BabylonNative/Repo/Polyfills/Canvas/Source/Shaders/dx11/vs_nanovg_fill.h +1 -1
- package/shared/BabylonNative/Repo/Polyfills/Canvas/shaderc.cmake +2 -2
- package/shared/BabylonNative/Repo/azure-pipelines.yml +36 -24
- package/shared/BabylonNative/deps/arcana.cpp-src/CMakeLists.txt +17 -1
- package/shared/BabylonNative/deps/arcana.cpp-src/README.md +1 -1
- package/shared/BabylonNative/deps/arcana.cpp-src/Source/Shared/arcana/string.h +0 -12
- package/shared/BabylonNative/deps/arcana.cpp-src/Source/Shared/arcana/threading/cancellation.h +25 -12
- package/shared/BabylonNative/deps/arcana.cpp-src/Source/Windows.Test/Threading/CancellationMemoryLeakTest.cpp +37 -0
- package/shared/BabylonNative/deps/bgfx.cmake-src/CMakeLists.txt +3 -3
- package/shared/BabylonNative/deps/bgfx.cmake-src/README.md +5 -5
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/LICENSE +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/README.md +31 -14
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/args.h +5 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/aviwriter.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/bgfx_utils.cpp +4 -3
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/bgfx_utils.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/common.h +43 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/common.sh +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/debugdraw.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/debugdraw.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/fs_debugdraw_fill.bin.h +180 -29
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/fs_debugdraw_fill.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/fs_debugdraw_fill_lit.bin.h +305 -92
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/fs_debugdraw_fill_lit.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/fs_debugdraw_fill_texture.bin.h +328 -26
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/fs_debugdraw_fill_texture.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/fs_debugdraw_lines.bin.h +227 -13
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/fs_debugdraw_lines.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/fs_debugdraw_lines_stipple.bin.h +290 -38
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/fs_debugdraw_lines_stipple.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/makefile +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_fill.bin.h +319 -95
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_fill.sc +2 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.bin.h +410 -133
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc +2 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit_mesh.bin.h +378 -120
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit_mesh.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_fill_mesh.bin.h +290 -85
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_fill_mesh.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_fill_texture.bin.h +259 -18
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_fill_texture.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_lines.bin.h +228 -14
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_lines.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_lines_stipple.bin.h +255 -16
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/debugdraw/vs_debugdraw_lines_stipple.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/cmd.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/cmd.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/dbg.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/dialog.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/dialog.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/entry.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/entry.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/entry_android.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/entry_glfw.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/entry_html5.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/entry_ios.mm +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/entry_noop.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/entry_osx.mm +2 -2
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/entry_p.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/entry_sdl.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/entry_windows.cpp +3 -3
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/entry_x11.cpp +2 -2
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/input.cpp +2 -2
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/entry/input.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/example-glue.cpp +21 -9
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/fs_font_basic.bin.h +391 -75
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/fs_font_distance_field.bin.h +382 -119
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/fs_font_distance_field_drop_shadow.bin.h +587 -227
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/fs_font_distance_field_drop_shadow_image.bin.h +655 -265
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/fs_font_distance_field_outline.bin.h +452 -164
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/fs_font_distance_field_outline_drop_shadow_image.bin.h +719 -307
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/fs_font_distance_field_outline_image.bin.h +535 -208
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h +495 -125
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/makefile +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/vs_font_basic.bin.h +254 -16
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/vs_font_distance_field.bin.h +254 -16
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/vs_font_distance_field_drop_shadow.bin.h +340 -15
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/vs_font_distance_field_drop_shadow_image.bin.h +340 -15
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/vs_font_distance_field_outline.bin.h +310 -15
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/vs_font_distance_field_outline_drop_shadow_image.bin.h +340 -15
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/vs_font_distance_field_outline_image.bin.h +310 -15
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h +254 -16
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/fs_imgui_image.bin.h +277 -59
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h +324 -25
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/imgui.cpp +9 -9
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/imgui.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/makefile +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/vs_imgui_image.bin.h +219 -15
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h +239 -7
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h +925 -472
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/nanovg/makefile +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/nanovg/nanovg_bgfx.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/nanovg/nanovg_bgfx.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h +223 -7
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/packrect.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/ps/fs_particle.bin.h +382 -70
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/ps/fs_particle.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/ps/makefile +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/ps/particle_system.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/ps/particle_system.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/ps/vs_particle.bin.h +263 -18
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/ps/vs_particle.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/shaderlib.sh +10 -7
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/include/bgfx/bgfx.h +149 -7
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/include/bgfx/c99/bgfx.h +225 -101
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/include/bgfx/defines.h +30 -21
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/include/bgfx/embedded_shader.h +110 -60
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/include/bgfx/platform.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/makefile +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/bgfx.idl +189 -70
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/bgfx.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/bindings-bf.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/bindings-c3.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/bindings-cs.lua +2 -2
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/bindings-zig.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/example-common.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/genie.lua +3 -3
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/geometryc.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/geometryv.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/shader-embeded.mk +18 -4
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/shader.mk +21 -6
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/shaderc.lua +139 -2
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/temp.bgfx.h +2 -2
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/temp.bgfx.hpp +2 -0
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/temp.bgfx.idl.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/temp.defines.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/texturec.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/texturev.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/scripts/tools.mk +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/amalgamated.cpp +2 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/amalgamated.mm +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/bgfx.cpp +406 -164
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/bgfx.idl.inl +37 -9
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/bgfx_compute.sh +40 -43
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/bgfx_p.h +795 -170
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/bgfx_shader.sh +205 -73
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/charset.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/config.h +18 -4
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/debug_renderdoc.cpp +8 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/debug_renderdoc.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/dxgi.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/dxgi.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/emscripten.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear0.bin.h +190 -36
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear0.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear1.bin.h +223 -46
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear1.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear2.bin.h +253 -55
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear2.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear3.bin.h +283 -65
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear3.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear4.bin.h +314 -75
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear4.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear5.bin.h +343 -85
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear5.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear6.bin.h +373 -94
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear6.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear7.bin.h +404 -105
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_clear7.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_debugfont.bin.h +401 -67
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/fs_debugfont.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/glcontext_egl.cpp +114 -36
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/glcontext_egl.h +5 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/glcontext_html5.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/glcontext_html5.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/glcontext_wgl.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/glcontext_wgl.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/glimports.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/makefile +17 -13
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/nvapi.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/nvapi.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer.h +50 -29
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_agc.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_d3d.h +7 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_d3d11.cpp +291 -180
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_d3d11.h +5 -2
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_d3d12.cpp +635 -218
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_d3d12.h +78 -10
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_gl.cpp +65 -45
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_gl.h +24 -3
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_gnm.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_mtl.h +50 -24
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_mtl.mm +158 -56
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_noop.cpp +8 -12
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_nvn.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_vk.cpp +810 -445
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_vk.h +194 -133
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_webgpu.cpp +6239 -0
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/renderer_webgpu.h +897 -0
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/shader.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/shader.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/shader_dxbc.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/shader_dxbc.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/shader_spirv.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/shader_spirv.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/topology.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/topology.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/version.h +3 -3
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/vertexlayout.cpp +2 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/vertexlayout.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/vs_clear.bin.h +186 -24
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/vs_clear.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/vs_debugfont.bin.h +314 -44
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/src/vs_debugfont.sc +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/3rdparty/nvtt/bc7/avpcl_mode4.cpp +2 -0
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/3rdparty/nvtt/nvcore/debug.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/3rdparty/nvtt/nvtt.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/LICENSE +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/README.md +2 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/include/bimg/bimg.h +5 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/include/bimg/decode.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/include/bimg/encode.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/makefile +183 -0
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/scripts/bimg.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/scripts/bimg_decode.lua +2 -2
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/scripts/bimg_encode.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/scripts/genie.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/scripts/texturec.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/src/bimg_p.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/src/config.h +52 -40
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/src/image.cpp +136 -120
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/src/image_cubemap_filter.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/src/image_decode.cpp +17 -5
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/src/image_encode.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/src/image_gnf.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bimg/tools/texturec/texturec.cpp +3 -3
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/LICENSE +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/README.md +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/allocator.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/bounds.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/bx.h +43 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/commandline.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/config.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/constants.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/cpu.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/debug.h +15 -5
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/easing.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/endian.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/error.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/file.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/filepath.h +5 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/float4x4_t.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/handlealloc.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/hash.h +31 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/allocator.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/bounds.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/bx.inl +141 -3
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/cpu.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/easing.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/endian.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/error.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/float4x4_t.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/handlealloc.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/hash.inl +28 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/math.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/mpscqueue.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/mutex.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/os.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/pixelformat.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/readerwriter.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/ringbuffer.inl +76 -8
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/rng.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/simd128_langext.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/simd128_neon.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/simd128_ref.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/simd128_sse.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/simd256_avx.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/simd256_ref.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/simd_ni.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/sort.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/spscqueue.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/string.inl +237 -48
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/timer.inl +67 -0
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/typetraits.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/inline/uint32_t.inl +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/macros.h +6 -6
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/math.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/mpscqueue.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/mutex.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/os.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/pixelformat.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/platform.h +3 -3
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/process.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/readerwriter.h +9 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/ringbuffer.h +145 -14
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/rng.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/semaphore.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/settings.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/simd_t.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/sort.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/spscqueue.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/string.h +111 -42
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/thread.h +5 -5
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/timer.h +59 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/typetraits.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/uint32_t.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/include/bx/url.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/scripts/bin2c.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/scripts/bx.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/scripts/genie.lua +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/scripts/toolchain.lua +36 -18
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/allocator.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/amalgamated.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/bounds.cpp +10 -10
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/bx.cpp +3 -3
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/commandline.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/crtnone.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/debug.cpp +866 -64
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/dtoa.cpp +3 -9
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/easing.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/file.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/filepath.cpp +7 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/hash.cpp +195 -37
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/math.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/mutex.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/os.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/process.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/semaphore.cpp +27 -6
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/settings.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/sort.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/string.cpp +206 -49
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/thread.cpp +35 -38
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/timer.cpp +5 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/src/url.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/allocator_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/atomic_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/cast_test.cpp +99 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/crt_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/dbg.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/easing_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/filepath_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/handle_bench.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/handle_test.cpp +6 -6
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/hash_test.cpp +37 -8
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/macros_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/main_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/math_bench.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/math_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/os_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/pixelformat_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/queue_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/readerwriter_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/ringbuffer_test.cpp +112 -7
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/rng_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/run_test.cpp +6 -4
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/settings_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/simd_bench.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/simd_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/sort_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/string_test.cpp +92 -39
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/test.h +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/thread_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/tokenizecmd_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/typetraits_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/uint32_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/url_test.cpp +1 -1
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tests/vsnprintf_test.cpp +365 -77
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tools/bin/darwin/genie +0 -0
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tools/bin/linux/genie +0 -0
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tools/bin/windows/genie.exe +0 -0
- package/shared/BabylonNative/deps/bgfx.cmake-src/bx/tools/bin2c/bin2c.cpp +2 -2
- package/shared/BabylonNative/deps/bgfx.cmake-src/cmake/bgfx/3rdparty/glslang.cmake +6 -5
- package/shared/BabylonNative/deps/bgfx.cmake-src/cmake/bgfx/3rdparty/spirv-opt.cmake +5 -0
- package/shared/BabylonNative/deps/bgfx.cmake-src/cmake/bgfx/3rdparty/tint.cmake +98 -0
- package/shared/BabylonNative/deps/bgfx.cmake-src/cmake/bgfx/CMakeLists.txt +1 -0
- package/shared/BabylonNative/deps/bgfx.cmake-src/cmake/bgfx/bgfx.cmake +11 -9
- package/shared/BabylonNative/deps/bgfx.cmake-src/cmake/bgfx/examples.cmake +16 -4
- package/shared/BabylonNative/deps/bgfx.cmake-src/cmake/bgfx/shaderc.cmake +21 -10
- package/shared/BabylonNative/deps/bgfx.cmake-src/cmake/bx/bx.cmake +5 -0
- package/shared/BabylonNative/deps/cmakeextensions-src/CMakeLists.txt +31 -5
- package/shared/BabylonNative/deps/cmakeextensions-src/README.md +6 -1
- package/shared/BabylonNative/deps/jsruntimehost-src/CMakeLists.txt +6 -5
- package/shared/BabylonNative/deps/jsruntimehost-src/Core/Node-API/Source/js_native_api_javascriptcore.cc +58 -4
- package/shared/BabylonNative/deps/jsruntimehost-src/Polyfills/CMakeLists.txt +4 -0
- package/shared/BabylonNative/deps/jsruntimehost-src/Polyfills/TextDecoder/CMakeLists.txt +15 -0
- package/shared/BabylonNative/deps/jsruntimehost-src/Polyfills/TextDecoder/Include/Babylon/Polyfills/TextDecoder.h +9 -0
- package/shared/BabylonNative/deps/jsruntimehost-src/Polyfills/TextDecoder/README.md +39 -0
- package/shared/BabylonNative/deps/jsruntimehost-src/Polyfills/TextDecoder/Source/TextDecoder.cpp +91 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/Foundation.hpp +47 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSArray.hpp +124 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSAutoreleasePool.hpp +83 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSBundle.hpp +374 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSData.hpp +54 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSDate.hpp +53 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSDefines.hpp +45 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSDictionary.hpp +128 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSEnumerator.hpp +78 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSError.hpp +173 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSLock.hpp +118 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSNotification.hpp +110 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSNumber.hpp +501 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSObjCRuntime.hpp +43 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSObject.hpp +302 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSPrivate.hpp +531 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSProcessInfo.hpp +386 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSRange.hpp +83 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSSet.hpp +87 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSSharedPtr.hpp +310 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSString.hpp +255 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSTypes.hpp +51 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Foundation/NSURL.hpp +90 -0
- package/shared/BabylonNative/deps/metal-cpp-src/LICENSE.txt +202 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4AccelerationStructure.hpp +1395 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4Archive.hpp +93 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4ArgumentTable.hpp +187 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4BinaryFunction.hpp +50 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4BinaryFunctionDescriptor.hpp +97 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4CommandAllocator.hpp +100 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4CommandBuffer.hpp +193 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4CommandEncoder.hpp +134 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4CommandQueue.hpp +283 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4CommitFeedback.hpp +62 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4Compiler.hpp +345 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4CompilerTask.hpp +63 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4ComputeCommandEncoder.hpp +300 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4ComputePipeline.hpp +158 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4Counters.hpp +138 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4FunctionDescriptor.hpp +49 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4LibraryDescriptor.hpp +98 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4LibraryFunctionDescriptor.hpp +86 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4LinkingDescriptor.hpp +204 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4MachineLearningCommandEncoder.hpp +66 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4MachineLearningPipeline.hpp +172 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4MeshRenderPipeline.hpp +413 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4PipelineDataSetSerializer.hpp +85 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4PipelineState.hpp +150 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4RenderCommandEncoder.hpp +340 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4RenderPass.hpp +280 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4RenderPipeline.hpp +587 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4SpecializedFunctionDescriptor.hpp +100 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4StitchedFunctionDescriptor.hpp +86 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTL4TileRenderPipeline.hpp +173 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLAccelerationStructure.hpp +1887 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLAccelerationStructureCommandEncoder.hpp +260 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLAccelerationStructureTypes.hpp +292 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLAllocation.hpp +40 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLArgument.hpp +787 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLArgumentEncoder.hpp +235 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLBinaryArchive.hpp +152 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLBlitCommandEncoder.hpp +226 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLBlitPass.hpp +154 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLBuffer.hpp +119 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLCaptureManager.hpp +217 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLCaptureScope.hpp +91 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLCommandBuffer.hpp +464 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLCommandEncoder.hpp +117 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLCommandQueue.hpp +158 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLComputeCommandEncoder.hpp +324 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLComputePass.hpp +169 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLComputePipeline.hpp +439 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLCounters.hpp +243 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLDataType.hpp +129 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLDefines.hpp +41 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLDepthStencil.hpp +277 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLDevice.hpp +1493 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLDrawable.hpp +90 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLDynamicLibrary.hpp +78 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLEvent.hpp +170 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLFence.hpp +55 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLFunctionConstantValues.hpp +76 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLFunctionDescriptor.hpp +153 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLFunctionHandle.hpp +65 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLFunctionLog.hpp +101 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLFunctionStitching.hpp +319 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLGPUAddress.hpp +36 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLHeaderBridge.hpp +3120 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLHeap.hpp +318 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLIOCommandBuffer.hpp +182 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLIOCommandQueue.hpp +211 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLIOCompressor.hpp +94 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLIndirectCommandBuffer.hpp +376 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLIndirectCommandEncoder.hpp +272 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLIntersectionFunctionTable.hpp +173 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLLibrary.hpp +786 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLLinkedFunctions.hpp +110 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLLogState.hpp +111 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLParallelRenderCommandEncoder.hpp +83 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLPipeline.hpp +104 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLPixelFormat.hpp +173 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLPrivate.hpp +156 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLRasterizationRate.hpp +337 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLRenderCommandEncoder.hpp +1019 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLRenderPass.hpp +792 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLRenderPipeline.hpp +1876 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLResidencySet.hpp +178 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLResource.hpp +190 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLResourceStateCommandEncoder.hpp +98 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLResourceStatePass.hpp +154 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLResourceViewPool.hpp +118 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLSampler.hpp +345 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLStageInputOutputDescriptor.hpp +356 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLTensor.hpp +297 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLTexture.hpp +803 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLTextureViewPool.hpp +59 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLTypes.hpp +164 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLVersion.hpp +32 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLVertexDescriptor.hpp +326 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/MTLVisibleFunctionTable.hpp +96 -0
- package/shared/BabylonNative/deps/metal-cpp-src/Metal/Metal.hpp +120 -0
- package/shared/BabylonNative/deps/metal-cpp-src/MetalFX/MTL4FXFrameInterpolator.hpp +47 -0
- package/shared/BabylonNative/deps/metal-cpp-src/MetalFX/MTL4FXSpatialScaler.hpp +49 -0
- package/shared/BabylonNative/deps/metal-cpp-src/MetalFX/MTL4FXTemporalDenoisedScaler.hpp +49 -0
- package/shared/BabylonNative/deps/metal-cpp-src/MetalFX/MTL4FXTemporalScaler.hpp +49 -0
- package/shared/BabylonNative/deps/metal-cpp-src/MetalFX/MTLFXDefines.hpp +41 -0
- package/shared/BabylonNative/deps/metal-cpp-src/MetalFX/MTLFXFrameInterpolator.hpp +719 -0
- package/shared/BabylonNative/deps/metal-cpp-src/MetalFX/MTLFXPrivate.hpp +482 -0
- package/shared/BabylonNative/deps/metal-cpp-src/MetalFX/MTLFXSpatialScaler.hpp +397 -0
- package/shared/BabylonNative/deps/metal-cpp-src/MetalFX/MTLFXTemporalDenoisedScaler.hpp +1208 -0
- package/shared/BabylonNative/deps/metal-cpp-src/MetalFX/MTLFXTemporalScaler.hpp +803 -0
- package/shared/BabylonNative/deps/metal-cpp-src/MetalFX/MetalFX.hpp +35 -0
- package/shared/BabylonNative/deps/metal-cpp-src/QuartzCore/CADefines.hpp +41 -0
- package/shared/BabylonNative/deps/metal-cpp-src/QuartzCore/CAMetalDrawable.hpp +57 -0
- package/shared/BabylonNative/deps/metal-cpp-src/QuartzCore/CAMetalLayer.hpp +216 -0
- package/shared/BabylonNative/deps/metal-cpp-src/QuartzCore/CAPrivate.hpp +150 -0
- package/shared/BabylonNative/deps/metal-cpp-src/QuartzCore/QuartzCore.hpp +28 -0
- package/shared/BabylonNative/deps/metal-cpp-src/README.md +313 -0
- package/shared/BabylonNative/deps/metal-cpp-src/SingleHeader/MakeSingleHeader.py +271 -0
- package/shared/BabylonNative/deps/metal-cpp-src/SingleHeader/Metal.hpp +28735 -0
- package/shared/BabylonNative/deps/spirv-cross-src/spirv_hlsl.cpp +173 -222
- package/shared/BabylonNative/deps/urllib-src/CMakeLists.txt +6 -7
- package/shared/BabylonNative/deps/urllib-src/Source/UrlRequest_Unix.cpp +1 -1
- package/shared/BabylonNative.cpp +4 -0
- package/shared/BabylonNative/Repo/Plugins/TestUtils/Source/Apple/TestUtilsImpl.mm +0 -57
- package/shared/BabylonNative/Repo/Plugins/TestUtils/Source/TestUtilsImplData.h +0 -18
- package/shared/BabylonNative/deps/arcana.cpp-src/Source/Android/Arcana.Android.vcxproj +0 -186
- package/shared/BabylonNative/deps/arcana.cpp-src/Source/Shared/Arcana.vcxitems +0 -47
- package/shared/BabylonNative/deps/arcana.cpp-src/Source/Windows/Arcana.Windows.Reference.vcxitems +0 -30
- package/shared/BabylonNative/deps/arcana.cpp-src/Source/Windows/Arcana.Windows.vcxproj +0 -218
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/bounds.cpp +0 -2178
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/bounds.h +0 -448
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/fs_imgui_color.bin.h +0 -100
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/fs_imgui_color.sc +0 -13
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h +0 -223
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/fs_imgui_cubemap.sc +0 -21
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h +0 -256
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/fs_imgui_image_swizz.sc +0 -22
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h +0 -308
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/fs_imgui_latlong.sc +0 -38
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/fs_imgui_texture.bin.h +0 -180
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/fs_imgui_texture.sc +0 -16
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/vs_imgui_color.bin.h +0 -195
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/vs_imgui_color.sc +0 -15
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h +0 -203
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/vs_imgui_cubemap.sc +0 -15
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h +0 -205
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/vs_imgui_latlong.sc +0 -15
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/vs_imgui_texture.bin.h +0 -233
- package/shared/BabylonNative/deps/bgfx.cmake-src/bgfx/examples/common/imgui/vs_imgui_texture.sc +0 -16
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2010-
|
|
2
|
+
* Copyright 2010-2026 Branimir Karadzic. All rights reserved.
|
|
3
3
|
* License: https://github.com/bkaradzic/bx/blob/master/LICENSE
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -165,7 +165,7 @@ namespace bx
|
|
|
165
165
|
|
|
166
166
|
typedef char (*CharFn)(char _ch);
|
|
167
167
|
|
|
168
|
-
inline char toNoop(char _ch)
|
|
168
|
+
inline constexpr char toNoop(char _ch)
|
|
169
169
|
{
|
|
170
170
|
return _ch;
|
|
171
171
|
}
|
|
@@ -290,18 +290,6 @@ namespace bx
|
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
int32_t strLen(const char* _str, int32_t _max)
|
|
294
|
-
{
|
|
295
|
-
if (NULL == _str)
|
|
296
|
-
{
|
|
297
|
-
return 0;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
const char* ptr = _str;
|
|
301
|
-
for (; 0 < _max && *ptr != '\0'; ++ptr, --_max) {};
|
|
302
|
-
return int32_t(ptr - _str);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
293
|
inline int32_t strCopy(char* _dst, int32_t _dstSize, const char* _src, int32_t _num)
|
|
306
294
|
{
|
|
307
295
|
BX_ASSERT(NULL != _dst, "_dst can't be NULL!");
|
|
@@ -734,11 +722,13 @@ namespace bx
|
|
|
734
722
|
, base(10)
|
|
735
723
|
, prec(INT32_MAX)
|
|
736
724
|
, fill(' ')
|
|
725
|
+
, fmt('f')
|
|
737
726
|
, bits(0)
|
|
738
727
|
, left(false)
|
|
739
728
|
, upper(false)
|
|
740
729
|
, spec(false)
|
|
741
730
|
, sign(false)
|
|
731
|
+
, space(false)
|
|
742
732
|
{
|
|
743
733
|
}
|
|
744
734
|
|
|
@@ -746,11 +736,13 @@ namespace bx
|
|
|
746
736
|
int32_t base;
|
|
747
737
|
int32_t prec;
|
|
748
738
|
char fill;
|
|
739
|
+
char fmt;
|
|
749
740
|
uint8_t bits;
|
|
750
741
|
bool left;
|
|
751
742
|
bool upper;
|
|
752
743
|
bool spec;
|
|
753
744
|
bool sign;
|
|
745
|
+
bool space;
|
|
754
746
|
};
|
|
755
747
|
|
|
756
748
|
static int32_t write(WriterI* _writer, const char* _str, int32_t _len, const Param& _param, Error* _err)
|
|
@@ -758,14 +750,12 @@ namespace bx
|
|
|
758
750
|
int32_t size = 0;
|
|
759
751
|
int32_t len = (int32_t)strLen(_str, _len);
|
|
760
752
|
|
|
761
|
-
if (_param.width > 0)
|
|
762
|
-
{
|
|
763
|
-
len = min(_param.width, len);
|
|
764
|
-
}
|
|
765
|
-
|
|
766
753
|
const bool hasMinus = (NULL != _str && '-' == _str[0]);
|
|
767
|
-
const bool hasSign = _param.sign || hasMinus;
|
|
768
|
-
char sign =
|
|
754
|
+
const bool hasSign = _param.sign || _param.space || hasMinus;
|
|
755
|
+
char sign = '\0';
|
|
756
|
+
if (hasMinus) { sign = '-'; }
|
|
757
|
+
else if (_param.sign) { sign = '+'; }
|
|
758
|
+
else if (_param.space) { sign = ' '; }
|
|
769
759
|
|
|
770
760
|
const char* str = _str;
|
|
771
761
|
if (hasMinus)
|
|
@@ -849,6 +839,64 @@ namespace bx
|
|
|
849
839
|
return write(_writer, _str.getPtr(), min(_param.prec, _str.getLength() ), _param, _err);
|
|
850
840
|
}
|
|
851
841
|
|
|
842
|
+
static int32_t writeInteger(WriterI* _writer, const char* _str, int32_t _len, const Param& _param, Error* _err)
|
|
843
|
+
{
|
|
844
|
+
Param param = _param;
|
|
845
|
+
|
|
846
|
+
char str[64];
|
|
847
|
+
memCopy(str, _str, _len + 1);
|
|
848
|
+
|
|
849
|
+
int32_t len = _len;
|
|
850
|
+
|
|
851
|
+
if (param.prec != INT32_MAX)
|
|
852
|
+
{
|
|
853
|
+
param.fill = ' ';
|
|
854
|
+
|
|
855
|
+
const int32_t signLen = (len > 0 && '-' == str[0]) ? 1 : 0;
|
|
856
|
+
const int32_t digitLen = len - signLen;
|
|
857
|
+
|
|
858
|
+
if (param.prec > digitLen)
|
|
859
|
+
{
|
|
860
|
+
const int32_t zeros = min(param.prec - digitLen, int32_t(sizeof(str)) - len - 1);
|
|
861
|
+
memMove(&str[signLen + zeros], &str[signLen], digitLen + 1);
|
|
862
|
+
|
|
863
|
+
for (int32_t ii = 0; ii < zeros; ++ii)
|
|
864
|
+
{
|
|
865
|
+
str[signLen + ii] = '0';
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
len += zeros;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
param.prec = INT32_MAX;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
if (param.spec
|
|
875
|
+
&& 0 < len)
|
|
876
|
+
{
|
|
877
|
+
if (8 == param.base)
|
|
878
|
+
{
|
|
879
|
+
if (str[0] != '0')
|
|
880
|
+
{
|
|
881
|
+
memMove(&str[1], &str[0], len + 1);
|
|
882
|
+
str[0] = '0';
|
|
883
|
+
len++;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
else if (16 == param.base)
|
|
887
|
+
{
|
|
888
|
+
memMove(&str[2], &str[0], len + 1);
|
|
889
|
+
str[0] = '0';
|
|
890
|
+
str[1] = param.upper ? 'X' : 'x';
|
|
891
|
+
len += 2;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
param.spec = false;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
return write(_writer, str, len, param, _err);
|
|
898
|
+
}
|
|
899
|
+
|
|
852
900
|
static int32_t write(WriterI* _writer, int32_t _i, const Param& _param, Error* _err)
|
|
853
901
|
{
|
|
854
902
|
char str[33];
|
|
@@ -859,7 +907,14 @@ namespace bx
|
|
|
859
907
|
return 0;
|
|
860
908
|
}
|
|
861
909
|
|
|
862
|
-
|
|
910
|
+
if (0 == _param.prec
|
|
911
|
+
&& 0 == _i)
|
|
912
|
+
{
|
|
913
|
+
str[0] = '\0';
|
|
914
|
+
len = 0;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
return writeInteger(_writer, str, len, _param, _err);
|
|
863
918
|
}
|
|
864
919
|
|
|
865
920
|
static int32_t write(WriterI* _writer, int64_t _i, const Param& _param, Error* _err)
|
|
@@ -872,7 +927,14 @@ namespace bx
|
|
|
872
927
|
return 0;
|
|
873
928
|
}
|
|
874
929
|
|
|
875
|
-
|
|
930
|
+
if (0 == _param.prec
|
|
931
|
+
&& 0 == _i)
|
|
932
|
+
{
|
|
933
|
+
str[0] = '\0';
|
|
934
|
+
len = 0;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
return writeInteger(_writer, str, len, _param, _err);
|
|
876
938
|
}
|
|
877
939
|
|
|
878
940
|
static int32_t write(WriterI* _writer, uint32_t _u, const Param& _param, Error* _err)
|
|
@@ -885,7 +947,14 @@ namespace bx
|
|
|
885
947
|
return 0;
|
|
886
948
|
}
|
|
887
949
|
|
|
888
|
-
|
|
950
|
+
if (0 == _param.prec
|
|
951
|
+
&& 0 == _u)
|
|
952
|
+
{
|
|
953
|
+
str[0] = '\0';
|
|
954
|
+
len = 0;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
return writeInteger(_writer, str, len, _param, _err);
|
|
889
958
|
}
|
|
890
959
|
|
|
891
960
|
static int32_t write(WriterI* _writer, uint64_t _u, const Param& _param, Error* _err)
|
|
@@ -898,7 +967,14 @@ namespace bx
|
|
|
898
967
|
return 0;
|
|
899
968
|
}
|
|
900
969
|
|
|
901
|
-
|
|
970
|
+
if (0 == _param.prec
|
|
971
|
+
&& 0 == _u)
|
|
972
|
+
{
|
|
973
|
+
str[0] = '\0';
|
|
974
|
+
len = 0;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
return writeInteger(_writer, str, len, _param, _err);
|
|
902
978
|
}
|
|
903
979
|
|
|
904
980
|
static int32_t write(WriterI* _writer, double _d, const Param& _param, Error* _err)
|
|
@@ -914,7 +990,9 @@ namespace bx
|
|
|
914
990
|
const char* dot = strFind(str, INT32_MAX, '.');
|
|
915
991
|
if (NULL != dot)
|
|
916
992
|
{
|
|
917
|
-
const int32_t
|
|
993
|
+
const int32_t defaultPrec = ('g' == _param.fmt) ? 6 : 6;
|
|
994
|
+
int32_t prec = INT32_MAX == _param.prec ? defaultPrec : _param.prec;
|
|
995
|
+
|
|
918
996
|
const char* strEnd = str + len;
|
|
919
997
|
const char* exponent = strFind(str, INT32_MAX, 'e');
|
|
920
998
|
const char* fracEnd = NULL != exponent ? exponent : strEnd;
|
|
@@ -1004,11 +1082,11 @@ namespace bx
|
|
|
1004
1082
|
switch (ch)
|
|
1005
1083
|
{
|
|
1006
1084
|
default:
|
|
1007
|
-
case ' ': param.
|
|
1008
|
-
case '-': param.left
|
|
1009
|
-
case '+': param.sign
|
|
1010
|
-
case '0': param.fill
|
|
1011
|
-
case '#': param.spec
|
|
1085
|
+
case ' ': param.space = true; break;
|
|
1086
|
+
case '-': param.left = true; break;
|
|
1087
|
+
case '+': param.sign = true; break;
|
|
1088
|
+
case '0': param.fill = '0'; break;
|
|
1089
|
+
case '#': param.spec = true; break;
|
|
1012
1090
|
}
|
|
1013
1091
|
|
|
1014
1092
|
read(&reader, ch, &err);
|
|
@@ -1055,7 +1133,8 @@ namespace bx
|
|
|
1055
1133
|
if ('*' == ch)
|
|
1056
1134
|
{
|
|
1057
1135
|
read(&reader, ch, &err);
|
|
1058
|
-
|
|
1136
|
+
int32_t prec = va_arg(_argList, int32_t);
|
|
1137
|
+
param.prec = prec >= 0 ? prec : INT32_MAX;
|
|
1059
1138
|
}
|
|
1060
1139
|
else
|
|
1061
1140
|
{
|
|
@@ -1162,10 +1241,11 @@ namespace bx
|
|
|
1162
1241
|
};
|
|
1163
1242
|
break;
|
|
1164
1243
|
|
|
1165
|
-
|
|
1244
|
+
case 'e': case 'E':
|
|
1166
1245
|
case 'f': case 'F':
|
|
1167
1246
|
case 'g': case 'G':
|
|
1168
1247
|
param.upper = isUpper(ch);
|
|
1248
|
+
param.fmt = toLower(ch);
|
|
1169
1249
|
size += write(_writer, va_arg(_argList, double), param, _err);
|
|
1170
1250
|
break;
|
|
1171
1251
|
|
|
@@ -1292,36 +1372,113 @@ namespace bx
|
|
|
1292
1372
|
return total;
|
|
1293
1373
|
}
|
|
1294
1374
|
|
|
1295
|
-
|
|
1375
|
+
int32_t formatHumanNumber(char* _out, uint32_t _count, double _value, uint8_t _numFrac, const StringView& _unit, char _prefix)
|
|
1376
|
+
{
|
|
1377
|
+
char temp[64];
|
|
1378
|
+
int32_t len = snprintf(temp, sizeof(temp), "%.*f", _numFrac, _value);
|
|
1379
|
+
int32_t intPartLen = len;
|
|
1380
|
+
|
|
1381
|
+
if (len >= _numFrac+1
|
|
1382
|
+
&& '.' == temp[len-_numFrac-1])
|
|
1383
|
+
{
|
|
1384
|
+
intPartLen = len-_numFrac-1;
|
|
1385
|
+
|
|
1386
|
+
bool zero = true;
|
|
1387
|
+
|
|
1388
|
+
for (int32_t ii = _numFrac; 0 < ii && zero; --ii)
|
|
1389
|
+
{
|
|
1390
|
+
zero &= temp[len-ii] == '0';
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
if (zero)
|
|
1394
|
+
{
|
|
1395
|
+
temp[len-_numFrac-1] = '\0';
|
|
1396
|
+
len = intPartLen;
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
const int32_t fracPartLen = len - intPartLen;
|
|
1401
|
+
const int32_t commas = (intPartLen > 3) ? (intPartLen - 1) / 3 : 0;
|
|
1402
|
+
const int32_t total = intPartLen + fracPartLen + commas;
|
|
1403
|
+
|
|
1404
|
+
if (_count < uint32_t(total) )
|
|
1405
|
+
{
|
|
1406
|
+
if (0 < _count)
|
|
1407
|
+
{
|
|
1408
|
+
_out[0] = '\0';
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
return 0;
|
|
1412
|
+
}
|
|
1296
1413
|
|
|
1297
|
-
|
|
1298
|
-
|
|
1414
|
+
char* out = _out + total;
|
|
1415
|
+
if (_unit.isEmpty()
|
|
1416
|
+
&& ' ' == _prefix)
|
|
1417
|
+
{
|
|
1418
|
+
*out = '\0';
|
|
1419
|
+
}
|
|
1420
|
+
else
|
|
1421
|
+
{
|
|
1422
|
+
snprintf(out, _count - total, " %c%S", _prefix, &_unit);
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
if (0 != fracPartLen)
|
|
1426
|
+
{
|
|
1427
|
+
out -= fracPartLen;
|
|
1428
|
+
memCopy(out, &temp[intPartLen], fracPartLen);
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
int32_t group = 0;
|
|
1432
|
+
for (int32_t ii = intPartLen - 1; ii >= 0; --ii)
|
|
1433
|
+
{
|
|
1434
|
+
*--out = temp[ii];
|
|
1435
|
+
|
|
1436
|
+
if (3 == ++group
|
|
1437
|
+
&& 0 < ii)
|
|
1438
|
+
{
|
|
1439
|
+
*--out = ',';
|
|
1440
|
+
group = 0;
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
return total;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
int32_t formatHumanNumber(char* _out, uint32_t _count, double _value, uint8_t _numFrac, double _unitStep, const StringView& _unit, const StringView& _prefix, uint8_t _basePrefix)
|
|
1299
1448
|
{
|
|
1300
|
-
uint8_t idx =
|
|
1449
|
+
uint8_t idx = _basePrefix;
|
|
1301
1450
|
double value = double(_value);
|
|
1302
|
-
|
|
1303
|
-
|
|
1451
|
+
const double invUnitStep = 1.0/double(_unitStep);
|
|
1452
|
+
const uint8_t numPrefixes = narrowCast<uint8_t>(_prefix.getLength() );
|
|
1453
|
+
|
|
1454
|
+
if (0.0 != _value)
|
|
1304
1455
|
{
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1456
|
+
while (value >= _unitStep
|
|
1457
|
+
&& idx < numPrefixes)
|
|
1458
|
+
{
|
|
1459
|
+
value *= invUnitStep;
|
|
1460
|
+
++idx;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
while (value < 1.0
|
|
1464
|
+
&& idx > 0)
|
|
1465
|
+
{
|
|
1466
|
+
value *= _unitStep;
|
|
1467
|
+
--idx;
|
|
1468
|
+
}
|
|
1308
1469
|
}
|
|
1309
1470
|
|
|
1310
|
-
return
|
|
1311
|
-
, fn(s_units[idx])
|
|
1312
|
-
, idx > 0 ? KiloCh0 : '\0'
|
|
1313
|
-
, KiloCh1
|
|
1314
|
-
);
|
|
1471
|
+
return formatHumanNumber(_out, _count, value, _numFrac, 0 == idx ? "" : _unit, _prefix.getPtr()[idx]);
|
|
1315
1472
|
}
|
|
1316
1473
|
|
|
1317
1474
|
int32_t prettify(char* _out, int32_t _count, uint64_t _value, Units::Enum _units)
|
|
1318
1475
|
{
|
|
1319
1476
|
if (Units::Kilo == _units)
|
|
1320
1477
|
{
|
|
1321
|
-
return
|
|
1478
|
+
return formatHumanNumber(_out, _count, double(_value), 0, 1000.0, "B", "BkMGTPEZY");
|
|
1322
1479
|
}
|
|
1323
1480
|
|
|
1324
|
-
return
|
|
1481
|
+
return formatHumanNumber(_out, _count, double(_value), 0, 1024.0, "iB", "BKMGTPEZY");
|
|
1325
1482
|
}
|
|
1326
1483
|
|
|
1327
1484
|
} // namespace bx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2010-
|
|
2
|
+
* Copyright 2010-2026 Branimir Karadzic. All rights reserved.
|
|
3
3
|
* License: https://github.com/bkaradzic/bx/blob/master/LICENSE
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -109,23 +109,14 @@ namespace bx
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
bool Thread::init(ThreadFn _fn, void* _userData, uint32_t _stackSize, const
|
|
112
|
+
bool Thread::init(ThreadFn _fn, void* _userData, uint32_t _stackSize, const StringView& _name)
|
|
113
113
|
{
|
|
114
114
|
BX_ASSERT(!m_running, "Already running!");
|
|
115
115
|
|
|
116
|
-
m_fn
|
|
117
|
-
m_userData
|
|
116
|
+
m_fn = _fn;
|
|
117
|
+
m_userData = _userData;
|
|
118
118
|
m_stackSize = _stackSize;
|
|
119
|
-
|
|
120
|
-
if (NULL != _name)
|
|
121
|
-
{
|
|
122
|
-
BX_WARN(strLen(_name) < int32_t(BX_COUNTOF(m_name) )-1, "Truncating thread name.");
|
|
123
|
-
strCopy(m_name, BX_COUNTOF(m_name), _name);
|
|
124
|
-
}
|
|
125
|
-
else
|
|
126
|
-
{
|
|
127
|
-
m_name[0] = '\0';
|
|
128
|
-
}
|
|
119
|
+
m_name = _name;
|
|
129
120
|
|
|
130
121
|
ThreadInternal* ti = (ThreadInternal*)m_internal;
|
|
131
122
|
#if BX_CRT_NONE
|
|
@@ -223,33 +214,40 @@ namespace bx
|
|
|
223
214
|
return m_exitCode;
|
|
224
215
|
}
|
|
225
216
|
|
|
226
|
-
void Thread::setThreadName(const
|
|
217
|
+
void Thread::setThreadName(const StringView& _name)
|
|
227
218
|
{
|
|
219
|
+
if (_name.isEmpty() )
|
|
220
|
+
{
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
m_name = _name;
|
|
225
|
+
|
|
228
226
|
ThreadInternal* ti = (ThreadInternal*)m_internal;
|
|
229
227
|
BX_UNUSED(ti);
|
|
230
|
-
#if
|
|
231
|
-
|
|
232
|
-
#elif BX_PLATFORM_OSX \
|
|
233
|
-
|| BX_PLATFORM_IOS \
|
|
228
|
+
#if BX_PLATFORM_OSX \
|
|
229
|
+
|| BX_PLATFORM_IOS \
|
|
234
230
|
|| BX_PLATFORM_VISIONOS
|
|
235
|
-
pthread_setname_np(
|
|
231
|
+
pthread_setname_np(m_name.getCPtr() );
|
|
236
232
|
#elif BX_CRT_GLIBC
|
|
237
|
-
pthread_setname_np(ti->m_handle,
|
|
233
|
+
pthread_setname_np(ti->m_handle, m_name.getCPtr() );
|
|
238
234
|
#elif BX_PLATFORM_LINUX
|
|
239
|
-
prctl(PR_SET_NAME,
|
|
235
|
+
prctl(PR_SET_NAME, m_name.getCPtr(), 0, 0, 0);
|
|
240
236
|
#elif BX_PLATFORM_WINDOWS
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
SetThreadDescriptionProc SetThreadDescription = dlsym<SetThreadDescriptionProc>((void*)GetModuleHandleA("Kernel32.dll"), "SetThreadDescription");
|
|
237
|
+
typedef HRESULT (WINAPI *SetThreadDescriptionFn)(HANDLE, PCWSTR);
|
|
238
|
+
SetThreadDescriptionFn setThreadDescription = dlsym<SetThreadDescriptionFn>( (void*)GetModuleHandleA("kernel32.dll"), "SetThreadDescription");
|
|
244
239
|
|
|
245
|
-
if (NULL !=
|
|
240
|
+
if (NULL != setThreadDescription)
|
|
246
241
|
{
|
|
247
|
-
uint32_t length = (
|
|
248
|
-
uint32_t
|
|
249
|
-
wchar_t* name = (wchar_t*)BX_STACK_ALLOC(
|
|
250
|
-
mbstowcs(name,
|
|
251
|
-
|
|
242
|
+
const uint32_t length = m_name.getLength();
|
|
243
|
+
const uint32_t max = (length+1)*sizeof(wchar_t);
|
|
244
|
+
wchar_t* name = (wchar_t*)BX_STACK_ALLOC(max);
|
|
245
|
+
mbstowcs(name, m_name.getCPtr(), length);
|
|
246
|
+
name[length] = 0;
|
|
247
|
+
setThreadDescription(ti->m_handle, name);
|
|
252
248
|
}
|
|
249
|
+
else
|
|
250
|
+
{
|
|
253
251
|
# if BX_COMPILER_MSVC
|
|
254
252
|
# pragma pack(push, 8)
|
|
255
253
|
struct ThreadName
|
|
@@ -262,24 +260,23 @@ namespace bx
|
|
|
262
260
|
# pragma pack(pop)
|
|
263
261
|
ThreadName tn;
|
|
264
262
|
tn.type = 0x1000;
|
|
265
|
-
tn.name =
|
|
263
|
+
tn.name = m_name.getCPtr();
|
|
266
264
|
tn.id = ti->m_threadId;
|
|
267
265
|
tn.flags = 0;
|
|
268
266
|
|
|
269
267
|
__try
|
|
270
268
|
{
|
|
271
269
|
RaiseException(0x406d1388
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
270
|
+
, 0
|
|
271
|
+
, sizeof(tn)/4
|
|
272
|
+
, reinterpret_cast<ULONG_PTR*>(&tn)
|
|
273
|
+
);
|
|
276
274
|
}
|
|
277
275
|
__except(EXCEPTION_EXECUTE_HANDLER)
|
|
278
276
|
{
|
|
279
277
|
}
|
|
280
278
|
# endif // BX_COMPILER_MSVC
|
|
281
|
-
|
|
282
|
-
BX_UNUSED(_name);
|
|
279
|
+
}
|
|
283
280
|
#endif // BX_PLATFORM_
|
|
284
281
|
}
|
|
285
282
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2010-
|
|
2
|
+
* Copyright 2010-2026 Branimir Karadzic. All rights reserved.
|
|
3
3
|
* License: https://github.com/bkaradzic/bx/blob/master/LICENSE
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -68,4 +68,8 @@ namespace bx
|
|
|
68
68
|
#endif // BX_PLATFORM_
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
const Ticks Ticks::s_kStartup = getNow();
|
|
72
|
+
const Ticks Ticks::s_kFreq = Ticks(getHPFrequency() );
|
|
73
|
+
const double Ticks::s_kInvFreq = 1.0/double(Ticks::s_kFreq.ticks);
|
|
74
|
+
|
|
71
75
|
} // namespace bx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2010-
|
|
2
|
+
* Copyright 2010-2026 Branimir Karadzic. All rights reserved.
|
|
3
3
|
* License: https://github.com/bkaradzic/bx/blob/master/LICENSE
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -21,3 +21,101 @@ TEST_CASE("Narrow cast", "[cast]")
|
|
|
21
21
|
REQUIRE_ASSERTS(bx::narrowCast<int8_t>(uint32_t(128) ) );
|
|
22
22
|
REQUIRE(128 == bx::narrowCast<uint8_t>(int32_t(128) ) );
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
template<typename Ty, typename FromT>
|
|
26
|
+
inline constexpr bool saturateCastTest(Ty _expectedMin, Ty _expectedMax)
|
|
27
|
+
{
|
|
28
|
+
return true
|
|
29
|
+
&& _expectedMin == bx::saturateCast<Ty>(static_cast<FromT>(_expectedMin) )
|
|
30
|
+
&& _expectedMax == bx::saturateCast<Ty>(static_cast<FromT>(_expectedMax) )
|
|
31
|
+
;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
TEST_CASE("Saturate cast", "[cast]")
|
|
35
|
+
{
|
|
36
|
+
STATIC_REQUIRE(-128 == bx::saturateCast<int8_t >( int32_t( -255) ) );
|
|
37
|
+
STATIC_REQUIRE( 127 == bx::saturateCast<int8_t >( int32_t( 255) ) );
|
|
38
|
+
STATIC_REQUIRE( 127 == bx::saturateCast<int8_t >( int32_t( 127) ) );
|
|
39
|
+
STATIC_REQUIRE( 127 == bx::saturateCast<int8_t >( int32_t( 128) ) );
|
|
40
|
+
STATIC_REQUIRE( 127 == bx::saturateCast<int8_t >(uint32_t( 128) ) );
|
|
41
|
+
STATIC_REQUIRE(-128 == bx::saturateCast<int8_t >( float(-1389.9831f) ) );
|
|
42
|
+
STATIC_REQUIRE( 127 == bx::saturateCast<int8_t >( float( 1389.9831f) ) );
|
|
43
|
+
STATIC_REQUIRE( 0 == bx::saturateCast<uint8_t>( int32_t( -128) ) );
|
|
44
|
+
STATIC_REQUIRE( 128 == bx::saturateCast<uint8_t>( int32_t( 128) ) );
|
|
45
|
+
STATIC_REQUIRE( -13 == bx::saturateCast<int8_t >( float( -13.89f) ) );
|
|
46
|
+
STATIC_REQUIRE( 13 == bx::saturateCast<int8_t >( float( 13.89f) ) );
|
|
47
|
+
STATIC_REQUIRE( 0 == bx::saturateCast<uint8_t>( float( -13.89f) ) );
|
|
48
|
+
STATIC_REQUIRE( 13 == bx::saturateCast<uint8_t>( float( 13.89f) ) );
|
|
49
|
+
|
|
50
|
+
STATIC_REQUIRE(saturateCastTest<int8_t, int8_t>(-128, 127) );
|
|
51
|
+
STATIC_REQUIRE(saturateCastTest<int8_t, uint8_t>( 0, 127) );
|
|
52
|
+
STATIC_REQUIRE(saturateCastTest<int8_t, int16_t>(-128, 127) );
|
|
53
|
+
STATIC_REQUIRE(saturateCastTest<int8_t, uint16_t>( 0, 127) );
|
|
54
|
+
STATIC_REQUIRE(saturateCastTest<int8_t, int32_t>(-128, 127) );
|
|
55
|
+
STATIC_REQUIRE(saturateCastTest<int8_t, uint32_t>( 0, 127) );
|
|
56
|
+
STATIC_REQUIRE(saturateCastTest<int8_t, int64_t>(-128, 127) );
|
|
57
|
+
STATIC_REQUIRE(saturateCastTest<int8_t, uint64_t>( 0, 127) );
|
|
58
|
+
|
|
59
|
+
STATIC_REQUIRE(saturateCastTest<uint8_t, int8_t>( 0, 127) );
|
|
60
|
+
STATIC_REQUIRE(saturateCastTest<uint8_t, uint8_t>( 0, 255) );
|
|
61
|
+
STATIC_REQUIRE(saturateCastTest<uint8_t, int16_t>( 0, 255) );
|
|
62
|
+
STATIC_REQUIRE(saturateCastTest<uint8_t, uint16_t>( 0, 255) );
|
|
63
|
+
STATIC_REQUIRE(saturateCastTest<uint8_t, int32_t>( 0, 255) );
|
|
64
|
+
STATIC_REQUIRE(saturateCastTest<uint8_t, uint32_t>( 0, 255) );
|
|
65
|
+
STATIC_REQUIRE(saturateCastTest<uint8_t, int64_t>( 0, 255) );
|
|
66
|
+
STATIC_REQUIRE(saturateCastTest<uint8_t, uint64_t>( 0, 255) );
|
|
67
|
+
|
|
68
|
+
STATIC_REQUIRE(saturateCastTest<int16_t, int8_t>( -128, 127) );
|
|
69
|
+
STATIC_REQUIRE(saturateCastTest<int16_t, uint8_t>( 0, 255) );
|
|
70
|
+
STATIC_REQUIRE(saturateCastTest<int16_t, int16_t>( -32768, 32767) );
|
|
71
|
+
STATIC_REQUIRE(saturateCastTest<int16_t, uint16_t>( 0, 32767) );
|
|
72
|
+
STATIC_REQUIRE(saturateCastTest<int16_t, int32_t>( -32768, 32767) );
|
|
73
|
+
STATIC_REQUIRE(saturateCastTest<int16_t, uint32_t>( 0, 32767) );
|
|
74
|
+
STATIC_REQUIRE(saturateCastTest<int16_t, int64_t>( -32768, 32767) );
|
|
75
|
+
STATIC_REQUIRE(saturateCastTest<int16_t, uint64_t>( 0, 32767) );
|
|
76
|
+
|
|
77
|
+
STATIC_REQUIRE(saturateCastTest<uint16_t, int8_t>( 0, 127) );
|
|
78
|
+
STATIC_REQUIRE(saturateCastTest<uint16_t, uint8_t>( 0, 255) );
|
|
79
|
+
STATIC_REQUIRE(saturateCastTest<uint16_t, int16_t>( 0, 32767) );
|
|
80
|
+
STATIC_REQUIRE(saturateCastTest<uint16_t, uint16_t>( 0, 65535) );
|
|
81
|
+
STATIC_REQUIRE(saturateCastTest<uint16_t, int32_t>( 0, 65535) );
|
|
82
|
+
STATIC_REQUIRE(saturateCastTest<uint16_t, uint32_t>( 0, 65535) );
|
|
83
|
+
STATIC_REQUIRE(saturateCastTest<uint16_t, int64_t>( 0, 65535) );
|
|
84
|
+
STATIC_REQUIRE(saturateCastTest<uint16_t, uint64_t>( 0, 65535) );
|
|
85
|
+
|
|
86
|
+
STATIC_REQUIRE(saturateCastTest<int32_t, int8_t>( -128, 127) );
|
|
87
|
+
STATIC_REQUIRE(saturateCastTest<int32_t, uint8_t>( 0, 255) );
|
|
88
|
+
STATIC_REQUIRE(saturateCastTest<int32_t, int16_t>( -32768, 32767) );
|
|
89
|
+
STATIC_REQUIRE(saturateCastTest<int32_t, uint16_t>( 0, 65535) );
|
|
90
|
+
STATIC_REQUIRE(saturateCastTest<int32_t, int32_t>( -2147483648, 2147483647) );
|
|
91
|
+
STATIC_REQUIRE(saturateCastTest<int32_t, uint32_t>( 0, 2147483647) );
|
|
92
|
+
STATIC_REQUIRE(saturateCastTest<int32_t, int64_t>( -2147483648, 2147483647) );
|
|
93
|
+
STATIC_REQUIRE(saturateCastTest<int32_t, uint64_t>( 0, 2147483647) );
|
|
94
|
+
|
|
95
|
+
STATIC_REQUIRE(saturateCastTest<uint32_t, int8_t>( 0, 127) );
|
|
96
|
+
STATIC_REQUIRE(saturateCastTest<uint32_t, uint8_t>( 0, 255) );
|
|
97
|
+
STATIC_REQUIRE(saturateCastTest<uint32_t, int16_t>( 0, 32767) );
|
|
98
|
+
STATIC_REQUIRE(saturateCastTest<uint32_t, uint16_t>( 0, 65535) );
|
|
99
|
+
STATIC_REQUIRE(saturateCastTest<uint32_t, int32_t>( 0, 2147483647) );
|
|
100
|
+
STATIC_REQUIRE(saturateCastTest<uint32_t, uint32_t>( 0, 4294967295) );
|
|
101
|
+
STATIC_REQUIRE(saturateCastTest<uint32_t, int64_t>( 0, 4294967295) );
|
|
102
|
+
STATIC_REQUIRE(saturateCastTest<uint32_t, uint64_t>( 0, 4294967295) );
|
|
103
|
+
|
|
104
|
+
STATIC_REQUIRE(saturateCastTest<int64_t, int8_t>( -128, 127) );
|
|
105
|
+
STATIC_REQUIRE(saturateCastTest<int64_t, uint8_t>( 0, 255) );
|
|
106
|
+
STATIC_REQUIRE(saturateCastTest<int64_t, int16_t>( -32768, 32767) );
|
|
107
|
+
STATIC_REQUIRE(saturateCastTest<int64_t, uint16_t>( 0, 65535) );
|
|
108
|
+
STATIC_REQUIRE(saturateCastTest<int64_t, int32_t>( -2147483648, 2147483647) );
|
|
109
|
+
STATIC_REQUIRE(saturateCastTest<int64_t, uint32_t>( 0, 4294967295) );
|
|
110
|
+
STATIC_REQUIRE(saturateCastTest<int64_t, int64_t>( -9223372036854775808ll, 9223372036854775807ll) );
|
|
111
|
+
STATIC_REQUIRE(saturateCastTest<int64_t, uint64_t>( 0, 9223372036854775807ll) );
|
|
112
|
+
|
|
113
|
+
STATIC_REQUIRE(saturateCastTest<uint64_t, int8_t>( 0, 127) );
|
|
114
|
+
STATIC_REQUIRE(saturateCastTest<uint64_t, uint8_t>( 0, 255) );
|
|
115
|
+
STATIC_REQUIRE(saturateCastTest<uint64_t, int16_t>( 0, 32767) );
|
|
116
|
+
STATIC_REQUIRE(saturateCastTest<uint64_t, uint16_t>( 0, 65535) );
|
|
117
|
+
STATIC_REQUIRE(saturateCastTest<uint64_t, int32_t>( 0, 2147483647) );
|
|
118
|
+
STATIC_REQUIRE(saturateCastTest<uint64_t, uint32_t>( 0, 4294967295) );
|
|
119
|
+
STATIC_REQUIRE(saturateCastTest<uint64_t, int64_t>( 0, 9223372036854775807ull) );
|
|
120
|
+
STATIC_REQUIRE(saturateCastTest<uint64_t, uint64_t>( 0, 18446744073709551615ull) );
|
|
121
|
+
}
|