@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 2011-
|
|
2
|
+
* Copyright 2011-2026 Branimir Karadzic. All rights reserved.
|
|
3
3
|
* License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -129,6 +129,18 @@ namespace bgfx { namespace d3d12
|
|
|
129
129
|
D3D12_CULL_MODE_BACK,
|
|
130
130
|
};
|
|
131
131
|
|
|
132
|
+
static const D3D12_SHADING_RATE s_shadingRate[] =
|
|
133
|
+
{
|
|
134
|
+
D3D12_SHADING_RATE_1X1,
|
|
135
|
+
D3D12_SHADING_RATE_1X2,
|
|
136
|
+
D3D12_SHADING_RATE_2X1,
|
|
137
|
+
D3D12_SHADING_RATE_2X2,
|
|
138
|
+
D3D12_SHADING_RATE_2X4,
|
|
139
|
+
D3D12_SHADING_RATE_4X2,
|
|
140
|
+
D3D12_SHADING_RATE_4X4,
|
|
141
|
+
};
|
|
142
|
+
static_assert(ShadingRate::Count == BX_COUNTOF(s_shadingRate) );
|
|
143
|
+
|
|
132
144
|
static const D3D12_TEXTURE_ADDRESS_MODE s_textureAddress[] =
|
|
133
145
|
{
|
|
134
146
|
D3D12_TEXTURE_ADDRESS_MODE_WRAP,
|
|
@@ -204,6 +216,10 @@ namespace bgfx { namespace d3d12
|
|
|
204
216
|
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING }, // ETC2
|
|
205
217
|
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING }, // ETC2A
|
|
206
218
|
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING }, // ETC2A1
|
|
219
|
+
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING }, // EACR11 UNORM
|
|
220
|
+
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING }, // EACR11 SNORM
|
|
221
|
+
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING }, // EACRG11 UNORM
|
|
222
|
+
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING }, // EACRG11 SNORM
|
|
207
223
|
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING }, // PTC12
|
|
208
224
|
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING }, // PTC14
|
|
209
225
|
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING }, // PTC12A
|
|
@@ -543,12 +559,12 @@ namespace bgfx { namespace d3d12
|
|
|
543
559
|
#endif // BX_PLATFORM_WINDOWS
|
|
544
560
|
}
|
|
545
561
|
|
|
546
|
-
ID3D12Resource* createCommittedResource(ID3D12Device* _device, HeapProperty::Enum _heapProperty, const D3D12_RESOURCE_DESC* _resourceDesc, const D3D12_CLEAR_VALUE* _clearValue, bool _memSet = false)
|
|
562
|
+
ID3D12Resource* createCommittedResource(ID3D12Device* _device, HeapProperty::Enum _heapProperty, const D3D12_RESOURCE_DESC* _resourceDesc, const D3D12_CLEAR_VALUE* _clearValue, bool _memSet = false, D3D12_HEAP_FLAGS _heapFlags = D3D12_HEAP_FLAG_NONE)
|
|
547
563
|
{
|
|
548
564
|
const HeapProperty& heapProperty = s_heapProperties[_heapProperty];
|
|
549
565
|
ID3D12Resource* resource;
|
|
550
566
|
DX_CHECK(_device->CreateCommittedResource(&heapProperty.m_properties
|
|
551
|
-
,
|
|
567
|
+
, _heapFlags
|
|
552
568
|
, _resourceDesc
|
|
553
569
|
, heapProperty.m_state
|
|
554
570
|
, _clearValue
|
|
@@ -577,7 +593,7 @@ namespace bgfx { namespace d3d12
|
|
|
577
593
|
return resource;
|
|
578
594
|
}
|
|
579
595
|
|
|
580
|
-
ID3D12Resource* createCommittedResource(ID3D12Device* _device, HeapProperty::Enum _heapProperty, uint64_t _size, D3D12_RESOURCE_FLAGS _flags = D3D12_RESOURCE_FLAG_NONE)
|
|
596
|
+
ID3D12Resource* createCommittedResource(ID3D12Device* _device, HeapProperty::Enum _heapProperty, uint64_t _size, D3D12_RESOURCE_FLAGS _flags = D3D12_RESOURCE_FLAG_NONE, D3D12_HEAP_FLAGS _heapFlags = D3D12_HEAP_FLAG_NONE)
|
|
581
597
|
{
|
|
582
598
|
D3D12_RESOURCE_DESC resourceDesc = {};
|
|
583
599
|
resourceDesc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
|
|
@@ -592,7 +608,7 @@ namespace bgfx { namespace d3d12
|
|
|
592
608
|
resourceDesc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
|
|
593
609
|
resourceDesc.Flags = _flags;
|
|
594
610
|
|
|
595
|
-
return createCommittedResource(_device, _heapProperty, &resourceDesc, NULL);
|
|
611
|
+
return createCommittedResource(_device, _heapProperty, &resourceDesc, NULL, false, _heapFlags);
|
|
596
612
|
}
|
|
597
613
|
|
|
598
614
|
inline bool isLost(HRESULT _hr)
|
|
@@ -652,6 +668,8 @@ namespace bgfx { namespace d3d12
|
|
|
652
668
|
}
|
|
653
669
|
}
|
|
654
670
|
|
|
671
|
+
typedef HRESULT (WINAPI* PFN_D3D12_ENABLE_EXPERIMENTAL_FEATURES)(uint32_t _numFeatures, const IID* _iids, void* _configurationStructs, uint32_t* _configurationStructSizes);
|
|
672
|
+
|
|
655
673
|
#if USE_D3D12_DYNAMIC_LIB
|
|
656
674
|
static PFN_D3D12_ENABLE_EXPERIMENTAL_FEATURES D3D12EnableExperimentalFeatures;
|
|
657
675
|
static PFN_D3D12_CREATE_DEVICE D3D12CreateDevice;
|
|
@@ -698,9 +716,19 @@ namespace bgfx { namespace d3d12
|
|
|
698
716
|
}
|
|
699
717
|
|
|
700
718
|
#if BGFX_CONFIG_DEBUG_ANNOTATION && (BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT)
|
|
701
|
-
|
|
719
|
+
|
|
720
|
+
struct StubPIXEventsThreadInfo
|
|
702
721
|
{
|
|
703
|
-
|
|
722
|
+
void* block;
|
|
723
|
+
void* biasedLimit;
|
|
724
|
+
void* destination;
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
static StubPIXEventsThreadInfo s_pixEventsThreadInfo = {};
|
|
728
|
+
|
|
729
|
+
static struct PIXEventsThreadInfo* WINAPI stubPIXGetThreadInfo()
|
|
730
|
+
{
|
|
731
|
+
return (struct PIXEventsThreadInfo*)& s_pixEventsThreadInfo;
|
|
704
732
|
}
|
|
705
733
|
|
|
706
734
|
uint64_t WINAPI stubPIXEventsReplaceBlock(PIXEventsThreadInfo* _threadInfo, bool _getEarliestTime)
|
|
@@ -726,6 +754,7 @@ namespace bgfx { namespace d3d12
|
|
|
726
754
|
, m_backBufferColorIdx(0)
|
|
727
755
|
, m_rtMsaa(false)
|
|
728
756
|
, m_directAccessSupport(false)
|
|
757
|
+
, m_variableRateShadingSupport(false)
|
|
729
758
|
{
|
|
730
759
|
}
|
|
731
760
|
|
|
@@ -1090,6 +1119,9 @@ namespace bgfx { namespace d3d12
|
|
|
1090
1119
|
BX_TRACE("\tAdditionalShadingRatesSupported %d", options6.AdditionalShadingRatesSupported);
|
|
1091
1120
|
BX_TRACE("\tPerPrimitiveShadingRateSupportedWithViewportIndexing %d", options6.PerPrimitiveShadingRateSupportedWithViewportIndexing);
|
|
1092
1121
|
BX_TRACE("\tVariableShadingRateTier %d", options6.VariableShadingRateTier);
|
|
1122
|
+
|
|
1123
|
+
m_variableRateShadingSupport = D3D12_VARIABLE_SHADING_RATE_TIER_NOT_SUPPORTED != options6.VariableShadingRateTier;
|
|
1124
|
+
|
|
1093
1125
|
BX_TRACE("\tShadingRateImageTileSize %d", options6.ShadingRateImageTileSize);
|
|
1094
1126
|
BX_TRACE("\tBackgroundProcessingSupported %d", options6.BackgroundProcessingSupported);
|
|
1095
1127
|
break;
|
|
@@ -1234,7 +1266,7 @@ namespace bgfx { namespace d3d12
|
|
|
1234
1266
|
|
|
1235
1267
|
initHeapProperties(m_device);
|
|
1236
1268
|
|
|
1237
|
-
m_cmd.init(m_device);
|
|
1269
|
+
m_cmd.init(m_device, (ID3D12CommandQueue*)g_platformData.queue);
|
|
1238
1270
|
m_device->SetPrivateDataInterface(IID_ID3D12CommandQueue, m_cmd.m_commandQueue);
|
|
1239
1271
|
errorState = ErrorState::CreatedCommandQueue;
|
|
1240
1272
|
|
|
@@ -1399,51 +1431,184 @@ namespace bgfx { namespace d3d12
|
|
|
1399
1431
|
, BGFX_CONFIG_MAX_TEXTURES + BGFX_CONFIG_MAX_SHADERS + BGFX_CONFIG_MAX_DRAW_CALLS
|
|
1400
1432
|
);
|
|
1401
1433
|
}
|
|
1434
|
+
|
|
1402
1435
|
m_samplerAllocator.create(D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER
|
|
1403
1436
|
, 2048
|
|
1404
1437
|
, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS
|
|
1405
1438
|
);
|
|
1406
1439
|
|
|
1407
|
-
D3D12_DESCRIPTOR_RANGE
|
|
1440
|
+
const D3D12_DESCRIPTOR_RANGE samplerDescRange =
|
|
1408
1441
|
{
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1442
|
+
.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER,
|
|
1443
|
+
.NumDescriptors = BGFX_CONFIG_MAX_TEXTURE_SAMPLERS,
|
|
1444
|
+
.BaseShaderRegister = 0,
|
|
1445
|
+
.RegisterSpace = 0,
|
|
1446
|
+
.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND,
|
|
1413
1447
|
};
|
|
1414
|
-
static_assert(BX_COUNTOF(descRange) == Rdt::Count);
|
|
1415
1448
|
|
|
1416
|
-
|
|
1449
|
+
const D3D12_DESCRIPTOR_RANGE srvDescRange =
|
|
1417
1450
|
{
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1451
|
+
.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV,
|
|
1452
|
+
.NumDescriptors = BGFX_CONFIG_MAX_TEXTURE_SAMPLERS,
|
|
1453
|
+
.BaseShaderRegister = 0,
|
|
1454
|
+
.RegisterSpace = 0,
|
|
1455
|
+
.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND,
|
|
1422
1456
|
};
|
|
1423
|
-
rootParameter[Rdt::CBV].Descriptor.RegisterSpace = 0;
|
|
1424
|
-
rootParameter[Rdt::CBV].Descriptor.ShaderRegister = 0;
|
|
1425
|
-
|
|
1426
|
-
D3D12_ROOT_SIGNATURE_DESC descRootSignature;
|
|
1427
|
-
descRootSignature.NumParameters = BX_COUNTOF(rootParameter);
|
|
1428
|
-
descRootSignature.pParameters = rootParameter;
|
|
1429
|
-
descRootSignature.NumStaticSamplers = 0;
|
|
1430
|
-
descRootSignature.pStaticSamplers = NULL;
|
|
1431
|
-
descRootSignature.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
|
|
1432
|
-
|
|
1433
|
-
ID3DBlob* outBlob;
|
|
1434
|
-
ID3DBlob* errorBlob;
|
|
1435
|
-
DX_CHECK(D3D12SerializeRootSignature(&descRootSignature
|
|
1436
|
-
, D3D_ROOT_SIGNATURE_VERSION_1
|
|
1437
|
-
, &outBlob
|
|
1438
|
-
, &errorBlob
|
|
1439
|
-
) );
|
|
1440
1457
|
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
,
|
|
1444
|
-
,
|
|
1445
|
-
,
|
|
1446
|
-
|
|
1458
|
+
const D3D12_DESCRIPTOR_RANGE uavDescRange =
|
|
1459
|
+
{
|
|
1460
|
+
.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_UAV,
|
|
1461
|
+
.NumDescriptors = BGFX_CONFIG_MAX_TEXTURE_SAMPLERS,
|
|
1462
|
+
.BaseShaderRegister = 0,
|
|
1463
|
+
.RegisterSpace = 0,
|
|
1464
|
+
.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND,
|
|
1465
|
+
};
|
|
1466
|
+
|
|
1467
|
+
{
|
|
1468
|
+
const D3D12_ROOT_PARAMETER renderRootParameter[] =
|
|
1469
|
+
{
|
|
1470
|
+
{ .ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE,
|
|
1471
|
+
.DescriptorTable =
|
|
1472
|
+
{
|
|
1473
|
+
.NumDescriptorRanges = 1,
|
|
1474
|
+
.pDescriptorRanges = &samplerDescRange,
|
|
1475
|
+
},
|
|
1476
|
+
.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
|
|
1477
|
+
},
|
|
1478
|
+
{ .ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE,
|
|
1479
|
+
.DescriptorTable =
|
|
1480
|
+
{
|
|
1481
|
+
.NumDescriptorRanges = 1,
|
|
1482
|
+
.pDescriptorRanges = &srvDescRange,
|
|
1483
|
+
},
|
|
1484
|
+
.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV,
|
|
1488
|
+
.Constants =
|
|
1489
|
+
{
|
|
1490
|
+
.ShaderRegister = 0,
|
|
1491
|
+
.RegisterSpace = 0,
|
|
1492
|
+
.Num32BitValues = 0,
|
|
1493
|
+
},
|
|
1494
|
+
.ShaderVisibility = D3D12_SHADER_VISIBILITY_VERTEX,
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV,
|
|
1498
|
+
.Constants =
|
|
1499
|
+
{
|
|
1500
|
+
.ShaderRegister = 0,
|
|
1501
|
+
.RegisterSpace = 0,
|
|
1502
|
+
.Num32BitValues = 0,
|
|
1503
|
+
},
|
|
1504
|
+
.ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL,
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE,
|
|
1508
|
+
.DescriptorTable =
|
|
1509
|
+
{
|
|
1510
|
+
.NumDescriptorRanges = 1,
|
|
1511
|
+
.pDescriptorRanges = &uavDescRange,
|
|
1512
|
+
},
|
|
1513
|
+
.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
|
|
1514
|
+
},
|
|
1515
|
+
};
|
|
1516
|
+
static_assert(BX_COUNTOF(renderRootParameter) == RenderRp::Count, "");
|
|
1517
|
+
|
|
1518
|
+
const D3D12_ROOT_SIGNATURE_DESC renderRootSignatureDesc =
|
|
1519
|
+
{
|
|
1520
|
+
.NumParameters = BX_COUNTOF(renderRootParameter),
|
|
1521
|
+
.pParameters = renderRootParameter,
|
|
1522
|
+
.NumStaticSamplers = 0,
|
|
1523
|
+
.pStaticSamplers = NULL,
|
|
1524
|
+
.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT,
|
|
1525
|
+
};
|
|
1526
|
+
|
|
1527
|
+
ID3DBlob* outBlob;
|
|
1528
|
+
DX_CHECK(D3D12SerializeRootSignature(
|
|
1529
|
+
&renderRootSignatureDesc
|
|
1530
|
+
, D3D_ROOT_SIGNATURE_VERSION_1
|
|
1531
|
+
, &outBlob
|
|
1532
|
+
, NULL
|
|
1533
|
+
) );
|
|
1534
|
+
|
|
1535
|
+
DX_CHECK(m_device->CreateRootSignature(
|
|
1536
|
+
0
|
|
1537
|
+
, outBlob->GetBufferPointer()
|
|
1538
|
+
, outBlob->GetBufferSize()
|
|
1539
|
+
, IID_ID3D12RootSignature
|
|
1540
|
+
, (void**)&m_rootSignature
|
|
1541
|
+
) );
|
|
1542
|
+
DX_RELEASE(outBlob, 0);
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
{
|
|
1546
|
+
const D3D12_ROOT_PARAMETER computeRootParameter[] =
|
|
1547
|
+
{
|
|
1548
|
+
{ .ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE,
|
|
1549
|
+
.DescriptorTable =
|
|
1550
|
+
{
|
|
1551
|
+
.NumDescriptorRanges = 1,
|
|
1552
|
+
.pDescriptorRanges = &samplerDescRange,
|
|
1553
|
+
},
|
|
1554
|
+
.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
|
|
1555
|
+
},
|
|
1556
|
+
{ .ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE,
|
|
1557
|
+
.DescriptorTable =
|
|
1558
|
+
{
|
|
1559
|
+
.NumDescriptorRanges = 1,
|
|
1560
|
+
.pDescriptorRanges = &srvDescRange,
|
|
1561
|
+
},
|
|
1562
|
+
.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV,
|
|
1566
|
+
.Constants =
|
|
1567
|
+
{
|
|
1568
|
+
.ShaderRegister = 0,
|
|
1569
|
+
.RegisterSpace = 0,
|
|
1570
|
+
.Num32BitValues = 0,
|
|
1571
|
+
},
|
|
1572
|
+
.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE,
|
|
1576
|
+
.DescriptorTable =
|
|
1577
|
+
{
|
|
1578
|
+
.NumDescriptorRanges = 1,
|
|
1579
|
+
.pDescriptorRanges = &uavDescRange,
|
|
1580
|
+
},
|
|
1581
|
+
.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
|
|
1582
|
+
},
|
|
1583
|
+
};
|
|
1584
|
+
static_assert(BX_COUNTOF(computeRootParameter) == ComputeRp::Count, "");
|
|
1585
|
+
|
|
1586
|
+
const D3D12_ROOT_SIGNATURE_DESC computeRootSignatureDesc =
|
|
1587
|
+
{
|
|
1588
|
+
.NumParameters = BX_COUNTOF(computeRootParameter),
|
|
1589
|
+
.pParameters = computeRootParameter,
|
|
1590
|
+
.NumStaticSamplers = 0,
|
|
1591
|
+
.pStaticSamplers = NULL,
|
|
1592
|
+
.Flags = D3D12_ROOT_SIGNATURE_FLAG_NONE,
|
|
1593
|
+
};
|
|
1594
|
+
|
|
1595
|
+
ID3DBlob* outBlob;
|
|
1596
|
+
DX_CHECK(D3D12SerializeRootSignature(
|
|
1597
|
+
&computeRootSignatureDesc
|
|
1598
|
+
, D3D_ROOT_SIGNATURE_VERSION_1
|
|
1599
|
+
, &outBlob
|
|
1600
|
+
, NULL
|
|
1601
|
+
) );
|
|
1602
|
+
|
|
1603
|
+
DX_CHECK(m_device->CreateRootSignature(
|
|
1604
|
+
0
|
|
1605
|
+
, outBlob->GetBufferPointer()
|
|
1606
|
+
, outBlob->GetBufferSize()
|
|
1607
|
+
, IID_ID3D12RootSignature
|
|
1608
|
+
, (void**)&m_computeRootSignature
|
|
1609
|
+
) );
|
|
1610
|
+
DX_RELEASE(outBlob, 0);
|
|
1611
|
+
}
|
|
1447
1612
|
|
|
1448
1613
|
///
|
|
1449
1614
|
m_directAccessSupport = true
|
|
@@ -1452,32 +1617,34 @@ namespace bgfx { namespace d3d12
|
|
|
1452
1617
|
;
|
|
1453
1618
|
|
|
1454
1619
|
g_caps.supported |= ( 0
|
|
1455
|
-
|
|
|
1456
|
-
|
|
|
1620
|
+
| BGFX_CAPS_ALPHA_TO_COVERAGE
|
|
1621
|
+
| BGFX_CAPS_BLEND_INDEPENDENT
|
|
1622
|
+
| BGFX_CAPS_COMPUTE
|
|
1623
|
+
| BGFX_CAPS_DRAW_INDIRECT
|
|
1624
|
+
| BGFX_CAPS_DRAW_INDIRECT_COUNT
|
|
1625
|
+
| BGFX_CAPS_FRAGMENT_DEPTH
|
|
1626
|
+
| (m_options.ROVsSupported ? BGFX_CAPS_FRAGMENT_ORDERING : 0)
|
|
1627
|
+
| BGFX_CAPS_IMAGE_RW
|
|
1457
1628
|
| BGFX_CAPS_INDEX32
|
|
1458
1629
|
| BGFX_CAPS_INSTANCING
|
|
1459
|
-
|
|
|
1630
|
+
| BGFX_CAPS_OCCLUSION_QUERY
|
|
1631
|
+
| BGFX_CAPS_PRIMITIVE_ID
|
|
1632
|
+
| (BX_ENABLED(BX_PLATFORM_WINDOWS) ? BGFX_CAPS_SWAP_CHAIN : 0)
|
|
1633
|
+
| BGFX_CAPS_TEXTURE_2D_ARRAY
|
|
1634
|
+
| BGFX_CAPS_TEXTURE_3D
|
|
1635
|
+
| BGFX_CAPS_TEXTURE_BLIT
|
|
1636
|
+
| BGFX_CAPS_TEXTURE_COMPARE_ALL
|
|
1637
|
+
| BGFX_CAPS_TEXTURE_CUBE_ARRAY
|
|
1638
|
+
| (m_directAccessSupport ? BGFX_CAPS_TEXTURE_DIRECT_ACCESS : 0)
|
|
1639
|
+
| BGFX_CAPS_TEXTURE_EXTERNAL
|
|
1640
|
+
| BGFX_CAPS_TEXTURE_READ_BACK
|
|
1641
|
+
| (m_variableRateShadingSupport ? BGFX_CAPS_VARIABLE_RATE_SHADING : 0)
|
|
1460
1642
|
| BGFX_CAPS_VERTEX_ATTRIB_HALF
|
|
1461
1643
|
| BGFX_CAPS_VERTEX_ATTRIB_UINT10
|
|
1462
1644
|
| BGFX_CAPS_VERTEX_ATTRIB_INT8
|
|
1463
1645
|
| BGFX_CAPS_VERTEX_ATTRIB_UINT16
|
|
1464
1646
|
| BGFX_CAPS_VERTEX_ID
|
|
1465
|
-
| BGFX_CAPS_FRAGMENT_DEPTH
|
|
1466
|
-
| BGFX_CAPS_BLEND_INDEPENDENT
|
|
1467
|
-
| BGFX_CAPS_COMPUTE
|
|
1468
|
-
| (m_options.ROVsSupported ? BGFX_CAPS_FRAGMENT_ORDERING : 0)
|
|
1469
|
-
| (m_directAccessSupport ? BGFX_CAPS_TEXTURE_DIRECT_ACCESS : 0)
|
|
1470
|
-
| (BX_ENABLED(BX_PLATFORM_WINDOWS) ? BGFX_CAPS_SWAP_CHAIN : 0)
|
|
1471
|
-
| BGFX_CAPS_TEXTURE_BLIT
|
|
1472
|
-
| BGFX_CAPS_TEXTURE_READ_BACK
|
|
1473
|
-
| BGFX_CAPS_OCCLUSION_QUERY
|
|
1474
|
-
| BGFX_CAPS_ALPHA_TO_COVERAGE
|
|
1475
|
-
| BGFX_CAPS_TEXTURE_2D_ARRAY
|
|
1476
|
-
| BGFX_CAPS_TEXTURE_CUBE_ARRAY
|
|
1477
|
-
| BGFX_CAPS_IMAGE_RW
|
|
1478
1647
|
| BGFX_CAPS_VIEWPORT_LAYER_ARRAY
|
|
1479
|
-
| BGFX_CAPS_DRAW_INDIRECT_COUNT
|
|
1480
|
-
| BGFX_CAPS_PRIMITIVE_ID
|
|
1481
1648
|
);
|
|
1482
1649
|
g_caps.limits.maxTextureSize = D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION;
|
|
1483
1650
|
g_caps.limits.maxTextureLayers = D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION;
|
|
@@ -1487,9 +1654,10 @@ namespace bgfx { namespace d3d12
|
|
|
1487
1654
|
|
|
1488
1655
|
for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
|
|
1489
1656
|
{
|
|
1490
|
-
|
|
1657
|
+
uint32_t support = BGFX_CAPS_FORMAT_TEXTURE_NONE;
|
|
1491
1658
|
|
|
1492
|
-
const
|
|
1659
|
+
const bool isDepthFormat = bimg::isDepth(bimg::TextureFormat::Enum(ii));
|
|
1660
|
+
const DXGI_FORMAT fmt = isDepthFormat
|
|
1493
1661
|
? s_textureFormat[ii].m_fmtDsv
|
|
1494
1662
|
: s_textureFormat[ii].m_fmt
|
|
1495
1663
|
;
|
|
@@ -1560,12 +1728,49 @@ namespace bgfx { namespace d3d12
|
|
|
1560
1728
|
? BGFX_CAPS_FORMAT_TEXTURE_MSAA
|
|
1561
1729
|
: BGFX_CAPS_FORMAT_TEXTURE_NONE
|
|
1562
1730
|
;
|
|
1731
|
+
|
|
1732
|
+
support |= 0 != (data.Support1 & (0
|
|
1733
|
+
| D3D12_FORMAT_SUPPORT1_DISPLAY
|
|
1734
|
+
) )
|
|
1735
|
+
? BGFX_CAPS_FORMAT_TEXTURE_BACKBUFFER
|
|
1736
|
+
: BGFX_CAPS_FORMAT_TEXTURE_NONE
|
|
1737
|
+
;
|
|
1738
|
+
|
|
1739
|
+
support |= 0 != (data.Support1 & D3D12_FORMAT_SUPPORT1_DISPLAY)
|
|
1740
|
+
|| 0 != (data.Support2 & D3D12_FORMAT_SUPPORT2_DISPLAYABLE)
|
|
1741
|
+
? BGFX_CAPS_FORMAT_TEXTURE_BACKBUFFER
|
|
1742
|
+
: BGFX_CAPS_FORMAT_TEXTURE_NONE
|
|
1743
|
+
;
|
|
1563
1744
|
}
|
|
1564
1745
|
else
|
|
1565
1746
|
{
|
|
1566
1747
|
BX_TRACE("CheckFeatureSupport failed with %x for format %s.", hr, getName(TextureFormat::Enum(ii) ) );
|
|
1567
1748
|
}
|
|
1568
1749
|
|
|
1750
|
+
if (isDepthFormat)
|
|
1751
|
+
{
|
|
1752
|
+
const DXGI_FORMAT fmtDepthSampling = s_textureFormat[ii].m_fmtSrv;
|
|
1753
|
+
if (DXGI_FORMAT_UNKNOWN != fmtDepthSampling)
|
|
1754
|
+
{
|
|
1755
|
+
D3D12_FEATURE_DATA_FORMAT_SUPPORT dataSampling;
|
|
1756
|
+
dataSampling.Format = fmtDepthSampling;
|
|
1757
|
+
hr = m_device->CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT, &dataSampling, sizeof(dataSampling));
|
|
1758
|
+
if (SUCCEEDED(hr))
|
|
1759
|
+
{
|
|
1760
|
+
support |= 0 != (dataSampling.Support1 & (0
|
|
1761
|
+
| D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD
|
|
1762
|
+
))
|
|
1763
|
+
? BGFX_CAPS_FORMAT_TEXTURE_MSAA
|
|
1764
|
+
: BGFX_CAPS_FORMAT_TEXTURE_NONE
|
|
1765
|
+
;
|
|
1766
|
+
}
|
|
1767
|
+
else
|
|
1768
|
+
{
|
|
1769
|
+
BX_TRACE("CheckFeatureSupport depth srv failed with %x for format %s.", hr, getName(TextureFormat::Enum(ii)));
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1569
1774
|
if (0 != (support & BGFX_CAPS_FORMAT_TEXTURE_IMAGE_READ) )
|
|
1570
1775
|
{
|
|
1571
1776
|
// clear image flag for additional testing
|
|
@@ -1625,6 +1830,12 @@ namespace bgfx { namespace d3d12
|
|
|
1625
1830
|
? BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB
|
|
1626
1831
|
: BGFX_CAPS_FORMAT_TEXTURE_NONE
|
|
1627
1832
|
;
|
|
1833
|
+
|
|
1834
|
+
support |= 0 != (data.Support1 & D3D12_FORMAT_SUPPORT1_DISPLAY)
|
|
1835
|
+
|| 0 != (data.Support2 & D3D12_FORMAT_SUPPORT2_DISPLAYABLE)
|
|
1836
|
+
? BGFX_CAPS_FORMAT_TEXTURE_BACKBUFFER
|
|
1837
|
+
: BGFX_CAPS_FORMAT_TEXTURE_NONE
|
|
1838
|
+
;
|
|
1628
1839
|
}
|
|
1629
1840
|
else
|
|
1630
1841
|
{
|
|
@@ -1777,6 +1988,7 @@ namespace bgfx { namespace d3d12
|
|
|
1777
1988
|
DX_RELEASE(m_commandSignature[ii], 0);
|
|
1778
1989
|
}
|
|
1779
1990
|
|
|
1991
|
+
DX_RELEASE(m_computeRootSignature, 0);
|
|
1780
1992
|
DX_RELEASE(m_rootSignature, 0);
|
|
1781
1993
|
DX_RELEASE(m_msaaRt, 0);
|
|
1782
1994
|
DX_RELEASE(m_swapChain, 0);
|
|
@@ -1851,7 +2063,7 @@ namespace bgfx { namespace d3d12
|
|
|
1851
2063
|
hr = m_swapChain->Present(syncInterval, presentFlags);
|
|
1852
2064
|
}
|
|
1853
2065
|
|
|
1854
|
-
int64_t now = bx::getHPCounter();
|
|
2066
|
+
const int64_t now = bx::getHPCounter();
|
|
1855
2067
|
m_presentElapsed = now - start;
|
|
1856
2068
|
|
|
1857
2069
|
m_lost = isLost(hr);
|
|
@@ -1947,13 +2159,9 @@ namespace bgfx { namespace d3d12
|
|
|
1947
2159
|
m_program[_handle.idx].destroy();
|
|
1948
2160
|
}
|
|
1949
2161
|
|
|
1950
|
-
void* createTexture(TextureHandle _handle, const Memory* _mem, uint64_t _flags, uint8_t _skip) override
|
|
1951
|
-
{
|
|
1952
|
-
return m_textures[_handle.idx].create(_mem, _flags, _skip);
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
|
-
void updateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/) override
|
|
2162
|
+
void* createTexture(TextureHandle _handle, const Memory* _mem, uint64_t _flags, uint8_t _skip, uint64_t _external) override
|
|
1956
2163
|
{
|
|
2164
|
+
return m_textures[_handle.idx].create(_mem, _flags, _skip, _external);
|
|
1957
2165
|
}
|
|
1958
2166
|
|
|
1959
2167
|
void updateTexture(TextureHandle _handle, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) override
|
|
@@ -1961,11 +2169,7 @@ namespace bgfx { namespace d3d12
|
|
|
1961
2169
|
m_textures[_handle.idx].update(m_commandList, _side, _mip, _rect, _z, _depth, _pitch, _mem);
|
|
1962
2170
|
}
|
|
1963
2171
|
|
|
1964
|
-
void
|
|
1965
|
-
{
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
void readTexture(TextureHandle _handle, void* _data, uint8_t _mip ) override
|
|
2172
|
+
void readTexture(TextureHandle _handle, void* _data, uint8_t _mip) override
|
|
1969
2173
|
{
|
|
1970
2174
|
const TextureD3D12& texture = m_textures[_handle.idx];
|
|
1971
2175
|
|
|
@@ -1988,8 +2192,8 @@ namespace bgfx { namespace d3d12
|
|
|
1988
2192
|
|
|
1989
2193
|
ID3D12Resource* readback = createCommittedResource(m_device, HeapProperty::ReadBack, total);
|
|
1990
2194
|
|
|
1991
|
-
uint32_t srcWidth = bx::
|
|
1992
|
-
uint32_t srcHeight = bx::
|
|
2195
|
+
const uint32_t srcWidth = bx::max(1u, texture.m_width >>_mip);
|
|
2196
|
+
const uint32_t srcHeight = bx::max(1u, texture.m_height>>_mip);
|
|
1993
2197
|
|
|
1994
2198
|
D3D12_BOX box;
|
|
1995
2199
|
box.left = 0;
|
|
@@ -2046,7 +2250,7 @@ namespace bgfx { namespace d3d12
|
|
|
2046
2250
|
bx::write(&writer, tc, bx::ErrorAssert{});
|
|
2047
2251
|
|
|
2048
2252
|
texture.destroy();
|
|
2049
|
-
texture.create(mem, texture.m_flags, 0);
|
|
2253
|
+
texture.create(mem, texture.m_flags, 0, 0);
|
|
2050
2254
|
|
|
2051
2255
|
release(mem);
|
|
2052
2256
|
}
|
|
@@ -2151,6 +2355,28 @@ namespace bgfx { namespace d3d12
|
|
|
2151
2355
|
|
|
2152
2356
|
D3D12_RESOURCE_DESC desc = getResourceDesc(backBuffer);
|
|
2153
2357
|
|
|
2358
|
+
TextureFormat::Enum colorFormat = TextureFormat::Enum::Count;
|
|
2359
|
+
for (int i = 0; i < TextureFormat::Enum::Count; i++)
|
|
2360
|
+
{
|
|
2361
|
+
if (s_textureFormat[i].m_fmt == desc.Format)
|
|
2362
|
+
{
|
|
2363
|
+
colorFormat = TextureFormat::Enum(i);
|
|
2364
|
+
break;
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
if (s_textureFormat[i].m_fmtSrgb == desc.Format)
|
|
2368
|
+
{
|
|
2369
|
+
colorFormat = TextureFormat::Enum(i);
|
|
2370
|
+
break;
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
if (colorFormat == TextureFormat::Enum::Count)
|
|
2375
|
+
{
|
|
2376
|
+
BX_TRACE("Unable to capture screenshot %s.", _filePath);
|
|
2377
|
+
return;
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2154
2380
|
const uint32_t width = (uint32_t)desc.Width;
|
|
2155
2381
|
const uint32_t height = (uint32_t)desc.Height;
|
|
2156
2382
|
|
|
@@ -2188,22 +2414,17 @@ namespace bgfx { namespace d3d12
|
|
|
2188
2414
|
|
|
2189
2415
|
void* data;
|
|
2190
2416
|
readback->Map(0, NULL, (void**)&data);
|
|
2191
|
-
|
|
2192
|
-
data
|
|
2193
|
-
, layout.Footprint.RowPitch
|
|
2194
|
-
, width
|
|
2195
|
-
, height
|
|
2196
|
-
, data
|
|
2197
|
-
, layout.Footprint.RowPitch
|
|
2198
|
-
);
|
|
2417
|
+
|
|
2199
2418
|
g_callback->screenShot(_filePath
|
|
2200
2419
|
, width
|
|
2201
2420
|
, height
|
|
2202
2421
|
, layout.Footprint.RowPitch
|
|
2422
|
+
, colorFormat
|
|
2203
2423
|
, data
|
|
2204
2424
|
, (uint32_t)total
|
|
2205
2425
|
, false
|
|
2206
2426
|
);
|
|
2427
|
+
|
|
2207
2428
|
D3D12_RANGE writeRange = { 0, 0 };
|
|
2208
2429
|
readback->Unmap(0, &writeRange);
|
|
2209
2430
|
|
|
@@ -2266,9 +2487,11 @@ namespace bgfx { namespace d3d12
|
|
|
2266
2487
|
|
|
2267
2488
|
void submitBlit(BlitState& _bs, uint16_t _view);
|
|
2268
2489
|
|
|
2490
|
+
void submitUniformCache(UniformCacheState& _ucs, uint16_t _view);
|
|
2491
|
+
|
|
2269
2492
|
void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) override;
|
|
2270
2493
|
|
|
2271
|
-
void
|
|
2494
|
+
void dbgTextRenderBegin(TextVideoMemBlitter& _blitter) override
|
|
2272
2495
|
{
|
|
2273
2496
|
const uint32_t width = m_scd.width;
|
|
2274
2497
|
const uint32_t height = m_scd.height;
|
|
@@ -2311,7 +2534,7 @@ namespace bgfx { namespace d3d12
|
|
|
2311
2534
|
float proj[16];
|
|
2312
2535
|
bx::mtxOrtho(proj, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f, 0.0f, false);
|
|
2313
2536
|
|
|
2314
|
-
PredefinedUniform& predefined = m_program[_blitter.m_program.idx].m_predefined[0];
|
|
2537
|
+
const PredefinedUniform& predefined = m_program[_blitter.m_program.idx].m_predefined[0];
|
|
2315
2538
|
uint8_t flags = predefined.m_type;
|
|
2316
2539
|
setShaderUniform(flags, predefined.m_loc, proj, 4);
|
|
2317
2540
|
|
|
@@ -2325,18 +2548,19 @@ namespace bgfx { namespace d3d12
|
|
|
2325
2548
|
scratchBuffer.getHeap(),
|
|
2326
2549
|
};
|
|
2327
2550
|
m_commandList->SetDescriptorHeaps(BX_COUNTOF(heaps), heaps);
|
|
2328
|
-
m_commandList->SetGraphicsRootConstantBufferView(
|
|
2551
|
+
m_commandList->SetGraphicsRootConstantBufferView(RenderRp::CBV, gpuAddress);
|
|
2552
|
+
m_commandList->SetGraphicsRootConstantBufferView(RenderRp::CBF, gpuAddress + m_program[_blitter.m_program.idx].m_vsh->m_size);
|
|
2329
2553
|
|
|
2330
2554
|
TextureD3D12& texture = m_textures[_blitter.m_texture.idx];
|
|
2331
|
-
uint32_t samplerFlags[] = { uint32_t(texture.m_flags & BGFX_SAMPLER_BITS_MASK) };
|
|
2332
|
-
uint16_t samplerStateIdx = getSamplerState(samplerFlags, BX_COUNTOF(samplerFlags), NULL);
|
|
2333
|
-
m_commandList->SetGraphicsRootDescriptorTable(
|
|
2555
|
+
const uint32_t samplerFlags[] = { uint32_t(texture.m_flags & BGFX_SAMPLER_BITS_MASK) };
|
|
2556
|
+
const uint16_t samplerStateIdx = getSamplerState(samplerFlags, BX_COUNTOF(samplerFlags), NULL);
|
|
2557
|
+
m_commandList->SetGraphicsRootDescriptorTable(RenderRp::Sampler, m_samplerAllocator.get(samplerStateIdx) );
|
|
2334
2558
|
D3D12_GPU_DESCRIPTOR_HANDLE srvHandle;
|
|
2335
2559
|
scratchBuffer.allocSrv(srvHandle, texture);
|
|
2336
|
-
m_commandList->SetGraphicsRootDescriptorTable(
|
|
2560
|
+
m_commandList->SetGraphicsRootDescriptorTable(RenderRp::SRV, srvHandle);
|
|
2337
2561
|
|
|
2338
|
-
VertexBufferD3D12&
|
|
2339
|
-
const VertexLayout& layout
|
|
2562
|
+
const VertexBufferD3D12& vb = m_vertexBuffers[_blitter.m_vb->handle.idx];
|
|
2563
|
+
const VertexLayout& layout = m_vertexLayouts[_blitter.m_vb->layoutHandle.idx];
|
|
2340
2564
|
D3D12_VERTEX_BUFFER_VIEW viewDesc;
|
|
2341
2565
|
viewDesc.BufferLocation = vb.m_gpuVA;
|
|
2342
2566
|
viewDesc.StrideInBytes = layout.m_stride;
|
|
@@ -2353,7 +2577,7 @@ namespace bgfx { namespace d3d12
|
|
|
2353
2577
|
m_commandList->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
|
|
2354
2578
|
}
|
|
2355
2579
|
|
|
2356
|
-
void
|
|
2580
|
+
void dbgTextRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) override
|
|
2357
2581
|
{
|
|
2358
2582
|
const uint32_t numVertices = _numIndices*4/6;
|
|
2359
2583
|
if (0 < numVertices)
|
|
@@ -2361,15 +2585,14 @@ namespace bgfx { namespace d3d12
|
|
|
2361
2585
|
m_indexBuffers [_blitter.m_ib->handle.idx].update(m_commandList, 0, _numIndices*2, _blitter.m_ib->data);
|
|
2362
2586
|
m_vertexBuffers[_blitter.m_vb->handle.idx].update(m_commandList, 0, numVertices*_blitter.m_layout.m_stride, _blitter.m_vb->data, true);
|
|
2363
2587
|
|
|
2364
|
-
m_commandList->DrawIndexedInstanced(_numIndices
|
|
2365
|
-
, 1
|
|
2366
|
-
, 0
|
|
2367
|
-
, 0
|
|
2368
|
-
, 0
|
|
2369
|
-
);
|
|
2588
|
+
m_commandList->DrawIndexedInstanced(_numIndices, 1, 0, 0, 0);
|
|
2370
2589
|
}
|
|
2371
2590
|
}
|
|
2372
2591
|
|
|
2592
|
+
void dbgTextRenderEnd(TextVideoMemBlitter& /*_blitter*/) override
|
|
2593
|
+
{
|
|
2594
|
+
}
|
|
2595
|
+
|
|
2373
2596
|
void preReset()
|
|
2374
2597
|
{
|
|
2375
2598
|
finishAll();
|
|
@@ -2768,7 +2991,10 @@ namespace bgfx { namespace d3d12
|
|
|
2768
2991
|
{
|
|
2769
2992
|
FrameBufferD3D12& frameBuffer = m_frameBuffers[m_fbh.idx];
|
|
2770
2993
|
|
|
2771
|
-
if (m_rtMsaa)
|
|
2994
|
+
if (m_rtMsaa)
|
|
2995
|
+
{
|
|
2996
|
+
frameBuffer.resolve();
|
|
2997
|
+
}
|
|
2772
2998
|
|
|
2773
2999
|
if (NULL == frameBuffer.m_swapChain)
|
|
2774
3000
|
{
|
|
@@ -2795,7 +3021,7 @@ namespace bgfx { namespace d3d12
|
|
|
2795
3021
|
if (NULL != m_swapChain)
|
|
2796
3022
|
{
|
|
2797
3023
|
m_rtvHandle = getCPUHandleHeapStart(m_rtvDescriptorHeap);
|
|
2798
|
-
uint32_t rtvDescriptorSize = m_device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV);
|
|
3024
|
+
const uint32_t rtvDescriptorSize = m_device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV);
|
|
2799
3025
|
m_rtvHandle.ptr += m_backBufferColorIdx * rtvDescriptorSize;
|
|
2800
3026
|
m_dsvHandle = getCPUHandleHeapStart(m_dsvDescriptorHeap);
|
|
2801
3027
|
|
|
@@ -3110,7 +3336,7 @@ namespace bgfx { namespace d3d12
|
|
|
3110
3336
|
D3D12_COMPUTE_PIPELINE_STATE_DESC desc;
|
|
3111
3337
|
bx::memSet(&desc, 0, sizeof(desc) );
|
|
3112
3338
|
|
|
3113
|
-
desc.pRootSignature =
|
|
3339
|
+
desc.pRootSignature = m_computeRootSignature;
|
|
3114
3340
|
desc.CS.pShaderBytecode = program.m_vsh->m_code->data;
|
|
3115
3341
|
desc.CS.BytecodeLength = program.m_vsh->m_code->size;
|
|
3116
3342
|
desc.NodeMask = 1;
|
|
@@ -3132,7 +3358,8 @@ namespace bgfx { namespace d3d12
|
|
|
3132
3358
|
desc.CachedPSO.pCachedBlob = reader.getDataPtr();
|
|
3133
3359
|
desc.CachedPSO.CachedBlobSizeInBytes = (size_t)reader.remaining();
|
|
3134
3360
|
|
|
3135
|
-
HRESULT hr = m_device->CreateComputePipelineState(
|
|
3361
|
+
HRESULT hr = m_device->CreateComputePipelineState(
|
|
3362
|
+
&desc
|
|
3136
3363
|
, IID_ID3D12PipelineState
|
|
3137
3364
|
, (void**)&pso
|
|
3138
3365
|
);
|
|
@@ -3146,7 +3373,8 @@ namespace bgfx { namespace d3d12
|
|
|
3146
3373
|
|
|
3147
3374
|
if (NULL == pso)
|
|
3148
3375
|
{
|
|
3149
|
-
DX_CHECK(m_device->CreateComputePipelineState(
|
|
3376
|
+
DX_CHECK(m_device->CreateComputePipelineState(
|
|
3377
|
+
&desc
|
|
3150
3378
|
, IID_ID3D12PipelineState
|
|
3151
3379
|
, (void**)&pso
|
|
3152
3380
|
) );
|
|
@@ -3202,7 +3430,7 @@ namespace bgfx { namespace d3d12
|
|
|
3202
3430
|
| BGFX_STATE_PT_MASK
|
|
3203
3431
|
;
|
|
3204
3432
|
|
|
3205
|
-
_stencil &=
|
|
3433
|
+
_stencil &= kStencilNoRefMask;
|
|
3206
3434
|
|
|
3207
3435
|
VertexLayout layout;
|
|
3208
3436
|
if (0 < _numStreams)
|
|
@@ -3259,6 +3487,10 @@ namespace bgfx { namespace d3d12
|
|
|
3259
3487
|
|
|
3260
3488
|
if (NULL != program.m_fsh)
|
|
3261
3489
|
{
|
|
3490
|
+
desc.PS.pShaderBytecode = program.m_fsh->m_code->data;
|
|
3491
|
+
desc.PS.BytecodeLength = program.m_fsh->m_code->size;
|
|
3492
|
+
|
|
3493
|
+
#if 0
|
|
3262
3494
|
bx::MemoryReader rd(program.m_fsh->m_code->data, program.m_fsh->m_code->size);
|
|
3263
3495
|
|
|
3264
3496
|
DxbcContext dxbc;
|
|
@@ -3323,6 +3555,7 @@ namespace bgfx { namespace d3d12
|
|
|
3323
3555
|
desc.PS.pShaderBytecode = program.m_fsh->m_code->data;
|
|
3324
3556
|
desc.PS.BytecodeLength = program.m_fsh->m_code->size;
|
|
3325
3557
|
}
|
|
3558
|
+
#endif // 0
|
|
3326
3559
|
}
|
|
3327
3560
|
else
|
|
3328
3561
|
{
|
|
@@ -3725,6 +3958,7 @@ namespace bgfx { namespace d3d12
|
|
|
3725
3958
|
DescriptorAllocatorD3D12 m_samplerAllocator;
|
|
3726
3959
|
|
|
3727
3960
|
ID3D12RootSignature* m_rootSignature;
|
|
3961
|
+
ID3D12RootSignature* m_computeRootSignature;
|
|
3728
3962
|
ID3D12CommandSignature* m_commandSignature[3];
|
|
3729
3963
|
|
|
3730
3964
|
CommandQueueD3D12 m_cmd;
|
|
@@ -3762,6 +3996,7 @@ namespace bgfx { namespace d3d12
|
|
|
3762
3996
|
uint32_t m_backBufferColorIdx;
|
|
3763
3997
|
bool m_rtMsaa;
|
|
3764
3998
|
bool m_directAccessSupport;
|
|
3999
|
+
bool m_variableRateShadingSupport;
|
|
3765
4000
|
};
|
|
3766
4001
|
|
|
3767
4002
|
static RendererContextD3D12* s_renderD3D12;
|
|
@@ -4090,29 +4325,41 @@ namespace bgfx { namespace d3d12
|
|
|
4090
4325
|
return gpuHandle;
|
|
4091
4326
|
}
|
|
4092
4327
|
|
|
4093
|
-
void CommandQueueD3D12::init(ID3D12Device* _device)
|
|
4328
|
+
void CommandQueueD3D12::init(ID3D12Device* _device, ID3D12CommandQueue* _queue)
|
|
4094
4329
|
{
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4330
|
+
m_externalQueue = NULL != _queue;
|
|
4331
|
+
|
|
4332
|
+
if (NULL != _queue)
|
|
4333
|
+
{
|
|
4334
|
+
m_commandQueue = _queue;
|
|
4335
|
+
}
|
|
4336
|
+
else
|
|
4337
|
+
{
|
|
4338
|
+
D3D12_COMMAND_QUEUE_DESC queueDesc;
|
|
4339
|
+
queueDesc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT;
|
|
4340
|
+
queueDesc.Priority = 0;
|
|
4341
|
+
queueDesc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
|
|
4342
|
+
queueDesc.NodeMask = 1;
|
|
4343
|
+
DX_CHECK(_device->CreateCommandQueue(
|
|
4344
|
+
&queueDesc
|
|
4345
|
+
, IID_ID3D12CommandQueue
|
|
4346
|
+
, (void**)&m_commandQueue
|
|
4347
|
+
) );
|
|
4348
|
+
}
|
|
4104
4349
|
|
|
4105
4350
|
m_completedFence = 0;
|
|
4106
4351
|
m_currentFence = 0;
|
|
4107
|
-
DX_CHECK(_device->CreateFence(
|
|
4352
|
+
DX_CHECK(_device->CreateFence(
|
|
4353
|
+
0
|
|
4108
4354
|
, D3D12_FENCE_FLAG_NONE
|
|
4109
4355
|
, IID_ID3D12Fence
|
|
4110
4356
|
, (void**)&m_fence
|
|
4111
4357
|
) );
|
|
4112
4358
|
|
|
4113
|
-
for (uint32_t ii = 0; ii <
|
|
4359
|
+
for (uint32_t ii = 0; ii < kMaxCommandLists; ++ii)
|
|
4114
4360
|
{
|
|
4115
|
-
DX_CHECK(_device->CreateCommandAllocator(
|
|
4361
|
+
DX_CHECK(_device->CreateCommandAllocator(
|
|
4362
|
+
D3D12_COMMAND_LIST_TYPE_DIRECT
|
|
4116
4363
|
, IID_ID3D12CommandAllocator
|
|
4117
4364
|
, (void**)&m_commandList[ii].m_commandAllocator
|
|
4118
4365
|
) );
|
|
@@ -4127,6 +4374,30 @@ namespace bgfx { namespace d3d12
|
|
|
4127
4374
|
|
|
4128
4375
|
DX_CHECK(m_commandList[ii].m_commandList->Close() );
|
|
4129
4376
|
}
|
|
4377
|
+
|
|
4378
|
+
const D3D12_QUERY_HEAP_DESC queryHeapDesc =
|
|
4379
|
+
{
|
|
4380
|
+
.Type = D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS,
|
|
4381
|
+
.Count = kMaxCommandLists,
|
|
4382
|
+
.NodeMask = 1,
|
|
4383
|
+
};
|
|
4384
|
+
|
|
4385
|
+
DX_CHECK(_device->CreateQueryHeap(
|
|
4386
|
+
&queryHeapDesc
|
|
4387
|
+
, IID_ID3D12QueryHeap
|
|
4388
|
+
, (void**)&m_pipelineStatsQueryHeap
|
|
4389
|
+
) );
|
|
4390
|
+
setDebugObjectName(m_pipelineStatsQueryHeap, "Pipeline Statistics Query Heap");
|
|
4391
|
+
|
|
4392
|
+
m_pipelineStatsReadBack = createCommittedResource(_device, HeapProperty::ReadBack, kMaxCommandLists*sizeof(D3D12_QUERY_DATA_PIPELINE_STATISTICS) );
|
|
4393
|
+
setDebugObjectName(m_pipelineStatsReadBack, "Pipeline Statistics Read-Back");
|
|
4394
|
+
|
|
4395
|
+
const D3D12_RANGE range =
|
|
4396
|
+
{
|
|
4397
|
+
.Begin = 0,
|
|
4398
|
+
.End = kMaxCommandLists*sizeof(D3D12_QUERY_DATA_PIPELINE_STATISTICS),
|
|
4399
|
+
};
|
|
4400
|
+
m_pipelineStatsReadBack->Map(0, &range, (void**)&m_pipelineStats);
|
|
4130
4401
|
}
|
|
4131
4402
|
|
|
4132
4403
|
void CommandQueueD3D12::shutdown()
|
|
@@ -4135,13 +4406,25 @@ namespace bgfx { namespace d3d12
|
|
|
4135
4406
|
|
|
4136
4407
|
DX_RELEASE(m_fence, 0);
|
|
4137
4408
|
|
|
4138
|
-
for (uint32_t ii = 0; ii <
|
|
4409
|
+
for (uint32_t ii = 0; ii < kMaxCommandLists; ++ii)
|
|
4139
4410
|
{
|
|
4140
4411
|
DX_RELEASE(m_commandList[ii].m_commandAllocator, 0);
|
|
4141
4412
|
DX_RELEASE(m_commandList[ii].m_commandList, 0);
|
|
4142
4413
|
}
|
|
4143
4414
|
|
|
4144
|
-
|
|
4415
|
+
if (!m_externalQueue)
|
|
4416
|
+
{
|
|
4417
|
+
DX_RELEASE(m_commandQueue, 0);
|
|
4418
|
+
}
|
|
4419
|
+
|
|
4420
|
+
const D3D12_RANGE range =
|
|
4421
|
+
{
|
|
4422
|
+
.Begin = 0,
|
|
4423
|
+
.End = kMaxCommandLists*sizeof(D3D12_QUERY_DATA_PIPELINE_STATISTICS),
|
|
4424
|
+
};
|
|
4425
|
+
m_pipelineStatsReadBack->Unmap(0, &range);
|
|
4426
|
+
DX_RELEASE(m_pipelineStatsQueryHeap, 0);
|
|
4427
|
+
DX_RELEASE(m_pipelineStatsReadBack, 0);
|
|
4145
4428
|
}
|
|
4146
4429
|
|
|
4147
4430
|
ID3D12GraphicsCommandList* CommandQueueD3D12::alloc()
|
|
@@ -4154,12 +4437,38 @@ namespace bgfx { namespace d3d12
|
|
|
4154
4437
|
CommandList& commandList = m_commandList[m_control.m_current];
|
|
4155
4438
|
DX_CHECK(commandList.m_commandAllocator->Reset() );
|
|
4156
4439
|
DX_CHECK(commandList.m_commandList->Reset(commandList.m_commandAllocator, NULL) );
|
|
4440
|
+
commandList.m_commandList->BeginQuery(
|
|
4441
|
+
m_pipelineStatsQueryHeap
|
|
4442
|
+
, D3D12_QUERY_TYPE_PIPELINE_STATISTICS
|
|
4443
|
+
, m_control.m_current
|
|
4444
|
+
);
|
|
4157
4445
|
return commandList.m_commandList;
|
|
4158
4446
|
}
|
|
4159
4447
|
|
|
4160
4448
|
uint64_t CommandQueueD3D12::kick()
|
|
4161
4449
|
{
|
|
4162
|
-
|
|
4450
|
+
const uint32_t currentIdx = m_control.m_current;
|
|
4451
|
+
CommandList& commandList = m_commandList[currentIdx];
|
|
4452
|
+
|
|
4453
|
+
for (TextureHandle th : m_external)
|
|
4454
|
+
{
|
|
4455
|
+
s_renderD3D12->m_textures[th.idx].setState(commandList.m_commandList, D3D12_RESOURCE_STATE_COMMON);
|
|
4456
|
+
}
|
|
4457
|
+
|
|
4458
|
+
commandList.m_commandList->EndQuery(
|
|
4459
|
+
m_pipelineStatsQueryHeap
|
|
4460
|
+
, D3D12_QUERY_TYPE_PIPELINE_STATISTICS
|
|
4461
|
+
, currentIdx
|
|
4462
|
+
);
|
|
4463
|
+
commandList.m_commandList->ResolveQueryData(
|
|
4464
|
+
m_pipelineStatsQueryHeap
|
|
4465
|
+
, D3D12_QUERY_TYPE_PIPELINE_STATISTICS
|
|
4466
|
+
, currentIdx
|
|
4467
|
+
, 1
|
|
4468
|
+
, m_pipelineStatsReadBack
|
|
4469
|
+
, currentIdx*sizeof(D3D12_QUERY_DATA_PIPELINE_STATISTICS)
|
|
4470
|
+
);
|
|
4471
|
+
|
|
4163
4472
|
DX_CHECK(commandList.m_commandList->Close() );
|
|
4164
4473
|
|
|
4165
4474
|
ID3D12CommandList* commandLists[] = { commandList.m_commandList };
|
|
@@ -4181,7 +4490,7 @@ namespace bgfx { namespace d3d12
|
|
|
4181
4490
|
|
|
4182
4491
|
void CommandQueueD3D12::finish(uint64_t _waitFence, bool _finishAll)
|
|
4183
4492
|
{
|
|
4184
|
-
while (0 < m_control.
|
|
4493
|
+
while (0 < m_control.getNumUsed() )
|
|
4185
4494
|
{
|
|
4186
4495
|
consume();
|
|
4187
4496
|
|
|
@@ -4192,12 +4501,12 @@ namespace bgfx { namespace d3d12
|
|
|
4192
4501
|
}
|
|
4193
4502
|
}
|
|
4194
4503
|
|
|
4195
|
-
BX_ASSERT(0 == m_control.
|
|
4504
|
+
BX_ASSERT(0 == m_control.getNumUsed(), "");
|
|
4196
4505
|
}
|
|
4197
4506
|
|
|
4198
4507
|
bool CommandQueueD3D12::tryFinish(uint64_t _waitFence)
|
|
4199
4508
|
{
|
|
4200
|
-
if (0 < m_control.
|
|
4509
|
+
if (0 < m_control.getNumUsed() )
|
|
4201
4510
|
{
|
|
4202
4511
|
if (consume(0)
|
|
4203
4512
|
&& _waitFence <= m_completedFence)
|
|
@@ -4236,6 +4545,8 @@ namespace bgfx { namespace d3d12
|
|
|
4236
4545
|
}
|
|
4237
4546
|
ra.clear();
|
|
4238
4547
|
|
|
4548
|
+
m_pipelineStatsSum.add(m_pipelineStats[m_control.m_read]);
|
|
4549
|
+
|
|
4239
4550
|
m_control.consume(1);
|
|
4240
4551
|
|
|
4241
4552
|
return true;
|
|
@@ -4245,6 +4556,25 @@ namespace bgfx { namespace d3d12
|
|
|
4245
4556
|
return false;
|
|
4246
4557
|
}
|
|
4247
4558
|
|
|
4559
|
+
void CommandQueueD3D12::addExternal(TextureHandle _handle)
|
|
4560
|
+
{
|
|
4561
|
+
m_external.push_back(_handle);
|
|
4562
|
+
}
|
|
4563
|
+
|
|
4564
|
+
void CommandQueueD3D12::removeExternal(TextureHandle _handle)
|
|
4565
|
+
{
|
|
4566
|
+
for (ExternalTextureArray::iterator it = m_external.begin(), itEnd = m_external.end(); it != itEnd; ++it)
|
|
4567
|
+
{
|
|
4568
|
+
if (it->idx == _handle.idx)
|
|
4569
|
+
{
|
|
4570
|
+
m_external.erase(it);
|
|
4571
|
+
return;
|
|
4572
|
+
}
|
|
4573
|
+
}
|
|
4574
|
+
|
|
4575
|
+
BX_ASSERT(false, "Removing external texture failed!");
|
|
4576
|
+
}
|
|
4577
|
+
|
|
4248
4578
|
void BatchD3D12::create(uint32_t _maxDrawPerBatch)
|
|
4249
4579
|
{
|
|
4250
4580
|
m_maxDrawPerBatch = _maxDrawPerBatch;
|
|
@@ -4256,13 +4586,14 @@ namespace bgfx { namespace d3d12
|
|
|
4256
4586
|
|
|
4257
4587
|
D3D12_INDIRECT_ARGUMENT_DESC drawArgDesc[] =
|
|
4258
4588
|
{
|
|
4259
|
-
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 0
|
|
4260
|
-
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 1
|
|
4261
|
-
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 2
|
|
4262
|
-
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 3
|
|
4263
|
-
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 4
|
|
4264
|
-
{ D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW, { {
|
|
4265
|
-
{
|
|
4589
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 0 } } },
|
|
4590
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 1 } } },
|
|
4591
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 2 } } },
|
|
4592
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 3 } } },
|
|
4593
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 4 } } },
|
|
4594
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW, { { RenderRp::CBV } } },
|
|
4595
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW, { { RenderRp::CBF } } },
|
|
4596
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_DRAW, { { 0 } } },
|
|
4266
4597
|
};
|
|
4267
4598
|
|
|
4268
4599
|
D3D12_COMMAND_SIGNATURE_DESC drawCommandSignature =
|
|
@@ -4281,14 +4612,15 @@ namespace bgfx { namespace d3d12
|
|
|
4281
4612
|
|
|
4282
4613
|
D3D12_INDIRECT_ARGUMENT_DESC drawIndexedArgDesc[] =
|
|
4283
4614
|
{
|
|
4284
|
-
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 0
|
|
4285
|
-
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 1
|
|
4286
|
-
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 2
|
|
4287
|
-
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 3
|
|
4288
|
-
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 4
|
|
4289
|
-
{ D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW, { { 0
|
|
4290
|
-
{ D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW, { {
|
|
4291
|
-
{
|
|
4615
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 0 } } },
|
|
4616
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 1 } } },
|
|
4617
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 2 } } },
|
|
4618
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 3 } } },
|
|
4619
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 4 } } },
|
|
4620
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW, { { 0 } } },
|
|
4621
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW, { { RenderRp::CBV } } },
|
|
4622
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW, { { RenderRp::CBF } } },
|
|
4623
|
+
{ D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED, { { 0 } } },
|
|
4292
4624
|
};
|
|
4293
4625
|
|
|
4294
4626
|
D3D12_COMMAND_SIGNATURE_DESC drawIndexedCommandSignature =
|
|
@@ -4351,15 +4683,12 @@ namespace bgfx { namespace d3d12
|
|
|
4351
4683
|
|
|
4352
4684
|
if (UINT32_MAX != _draw.m_streamMask)
|
|
4353
4685
|
{
|
|
4354
|
-
for (
|
|
4355
|
-
;
|
|
4356
|
-
;
|
|
4686
|
+
for (BitMaskToIndexIteratorT it(_draw.m_streamMask)
|
|
4687
|
+
; !it.isDone()
|
|
4688
|
+
; it.next(), numStreams++
|
|
4357
4689
|
)
|
|
4358
4690
|
{
|
|
4359
|
-
const
|
|
4360
|
-
streamMask >>= ntz;
|
|
4361
|
-
idx += ntz;
|
|
4362
|
-
|
|
4691
|
+
const uint8_t idx = it.idx;
|
|
4363
4692
|
const Stream& stream = _draw.m_stream[idx];
|
|
4364
4693
|
|
|
4365
4694
|
uint16_t handle = stream.m_handle.idx;
|
|
@@ -4386,11 +4715,12 @@ namespace bgfx { namespace d3d12
|
|
|
4386
4715
|
return numStreams;
|
|
4387
4716
|
}
|
|
4388
4717
|
|
|
4389
|
-
uint32_t BatchD3D12::draw(ID3D12GraphicsCommandList* _commandList, D3D12_GPU_VIRTUAL_ADDRESS _cbv, const RenderDraw& _draw)
|
|
4718
|
+
uint32_t BatchD3D12::draw(ID3D12GraphicsCommandList* _commandList, D3D12_GPU_VIRTUAL_ADDRESS _cbv, D3D12_GPU_VIRTUAL_ADDRESS _cbf, const RenderDraw& _draw)
|
|
4390
4719
|
{
|
|
4391
4720
|
if (isValid(_draw.m_indirectBuffer) )
|
|
4392
4721
|
{
|
|
4393
|
-
_commandList->SetGraphicsRootConstantBufferView(
|
|
4722
|
+
_commandList->SetGraphicsRootConstantBufferView(RenderRp::CBV, _cbv);
|
|
4723
|
+
_commandList->SetGraphicsRootConstantBufferView(RenderRp::CBF, _cbf);
|
|
4394
4724
|
|
|
4395
4725
|
D3D12_VERTEX_BUFFER_VIEW vbvs[BGFX_CONFIG_MAX_VERTEX_STREAMS+1];
|
|
4396
4726
|
|
|
@@ -4482,6 +4812,7 @@ namespace bgfx { namespace d3d12
|
|
|
4482
4812
|
{
|
|
4483
4813
|
DrawIndirectCommand& cmd = getCmd<DrawIndirectCommand>(Draw);
|
|
4484
4814
|
cmd.cbv = _cbv;
|
|
4815
|
+
cmd.cbf = _cbf;
|
|
4485
4816
|
|
|
4486
4817
|
uint32_t numVertices;
|
|
4487
4818
|
uint8_t numStreams = fill(_commandList, cmd.vbv, _draw, numVertices);
|
|
@@ -4523,6 +4854,7 @@ namespace bgfx { namespace d3d12
|
|
|
4523
4854
|
|
|
4524
4855
|
DrawIndexedIndirectCommand& cmd = getCmd<DrawIndexedIndirectCommand>(DrawIndexed);
|
|
4525
4856
|
cmd.cbv = _cbv;
|
|
4857
|
+
cmd.cbf = _cbf;
|
|
4526
4858
|
cmd.ibv.BufferLocation = ib.m_gpuVA;
|
|
4527
4859
|
cmd.ibv.SizeInBytes = ib.m_size;
|
|
4528
4860
|
cmd.ibv.Format = indexFormat;
|
|
@@ -4606,7 +4938,8 @@ namespace bgfx { namespace d3d12
|
|
|
4606
4938
|
if (m_current.cbv != cmd.cbv)
|
|
4607
4939
|
{
|
|
4608
4940
|
m_current.cbv = cmd.cbv;
|
|
4609
|
-
_commandList->SetGraphicsRootConstantBufferView(
|
|
4941
|
+
_commandList->SetGraphicsRootConstantBufferView(RenderRp::CBV, cmd.cbv);
|
|
4942
|
+
_commandList->SetGraphicsRootConstantBufferView(RenderRp::CBF, cmd.cbf);
|
|
4610
4943
|
}
|
|
4611
4944
|
|
|
4612
4945
|
if (0 != bx::memCmp(m_current.vbv, cmd.vbv, sizeof(cmd.vbv) ) )
|
|
@@ -4636,7 +4969,8 @@ namespace bgfx { namespace d3d12
|
|
|
4636
4969
|
if (m_current.cbv != cmd.cbv)
|
|
4637
4970
|
{
|
|
4638
4971
|
m_current.cbv = cmd.cbv;
|
|
4639
|
-
_commandList->SetGraphicsRootConstantBufferView(
|
|
4972
|
+
_commandList->SetGraphicsRootConstantBufferView(RenderRp::CBV, cmd.cbv);
|
|
4973
|
+
_commandList->SetGraphicsRootConstantBufferView(RenderRp::CBF, cmd.cbf);
|
|
4640
4974
|
}
|
|
4641
4975
|
|
|
4642
4976
|
if (0 != bx::memCmp(m_current.vbv, cmd.vbv, sizeof(cmd.vbv) ) )
|
|
@@ -5148,7 +5482,7 @@ namespace bgfx { namespace d3d12
|
|
|
5148
5482
|
return result;
|
|
5149
5483
|
}
|
|
5150
5484
|
|
|
5151
|
-
void* TextureD3D12::create(const Memory* _mem, uint64_t _flags, uint8_t _skip)
|
|
5485
|
+
void* TextureD3D12::create(const Memory* _mem, uint64_t _flags, uint8_t _skip, uint64_t _external)
|
|
5152
5486
|
{
|
|
5153
5487
|
bimg::ImageContainer imageContainer;
|
|
5154
5488
|
|
|
@@ -5203,10 +5537,11 @@ namespace bgfx { namespace d3d12
|
|
|
5203
5537
|
const bool compressed = bimg::isCompressed(bimg::TextureFormat::Enum(m_textureFormat) );
|
|
5204
5538
|
const bool swizzle = TextureFormat::BGRA8 == m_textureFormat && 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE);
|
|
5205
5539
|
|
|
5206
|
-
const bool writeOnly
|
|
5207
|
-
const bool computeWrite
|
|
5208
|
-
const bool renderTarget
|
|
5209
|
-
const bool blit
|
|
5540
|
+
const bool writeOnly = 0 != (m_flags & BGFX_TEXTURE_RT_WRITE_ONLY);
|
|
5541
|
+
const bool computeWrite = 0 != (m_flags & BGFX_TEXTURE_COMPUTE_WRITE);
|
|
5542
|
+
const bool renderTarget = 0 != (m_flags & BGFX_TEXTURE_RT_MASK);
|
|
5543
|
+
const bool blit = 0 != (m_flags & BGFX_TEXTURE_BLIT_DST);
|
|
5544
|
+
const bool externalShared = 0 != (m_flags & BGFX_TEXTURE_EXTERNAL_SHARED);
|
|
5210
5545
|
|
|
5211
5546
|
const uint32_t msaaQuality = bx::uint32_satsub((m_flags & BGFX_TEXTURE_RT_MSAA_MASK) >> BGFX_TEXTURE_RT_MSAA_SHIFT, 1);
|
|
5212
5547
|
const DXGI_SAMPLE_DESC& msaa = s_msaa[msaaQuality];
|
|
@@ -5476,7 +5811,46 @@ namespace bgfx { namespace d3d12
|
|
|
5476
5811
|
break;
|
|
5477
5812
|
}
|
|
5478
5813
|
|
|
5479
|
-
|
|
5814
|
+
if (0 != _external)
|
|
5815
|
+
{
|
|
5816
|
+
if (externalShared)
|
|
5817
|
+
{
|
|
5818
|
+
DX_CHECK(device->OpenSharedHandle(HANDLE(_external), IID_ID3D12Resource, (void**)&m_ptr) );
|
|
5819
|
+
}
|
|
5820
|
+
else
|
|
5821
|
+
{
|
|
5822
|
+
m_ptr = (ID3D12Resource*)_external;
|
|
5823
|
+
}
|
|
5824
|
+
|
|
5825
|
+
m_flags |= BGFX_SAMPLER_INTERNAL_SHARED;
|
|
5826
|
+
m_state = D3D12_RESOURCE_STATE_COMMON;
|
|
5827
|
+
|
|
5828
|
+
s_renderD3D12->m_cmd.addExternal({ uint16_t(this - s_renderD3D12->m_textures) });
|
|
5829
|
+
}
|
|
5830
|
+
else
|
|
5831
|
+
{
|
|
5832
|
+
m_ptr = createCommittedResource(
|
|
5833
|
+
device
|
|
5834
|
+
, HeapProperty::Texture
|
|
5835
|
+
, &resourceDesc
|
|
5836
|
+
, clearValue
|
|
5837
|
+
, renderTarget
|
|
5838
|
+
, externalShared
|
|
5839
|
+
? D3D12_HEAP_FLAG_SHARED
|
|
5840
|
+
: D3D12_HEAP_FLAG_NONE
|
|
5841
|
+
);
|
|
5842
|
+
|
|
5843
|
+
if (externalShared)
|
|
5844
|
+
{
|
|
5845
|
+
DX_CHECK(device->CreateSharedHandle(
|
|
5846
|
+
m_ptr
|
|
5847
|
+
, NULL
|
|
5848
|
+
, GENERIC_ALL
|
|
5849
|
+
, NULL
|
|
5850
|
+
, &m_handle
|
|
5851
|
+
) );
|
|
5852
|
+
}
|
|
5853
|
+
}
|
|
5480
5854
|
|
|
5481
5855
|
if (directAccess)
|
|
5482
5856
|
{
|
|
@@ -5507,10 +5881,6 @@ namespace bgfx { namespace d3d12
|
|
|
5507
5881
|
|
|
5508
5882
|
s_renderD3D12->m_cmd.release(staging);
|
|
5509
5883
|
}
|
|
5510
|
-
else
|
|
5511
|
-
{
|
|
5512
|
-
setState(commandList, state);
|
|
5513
|
-
}
|
|
5514
5884
|
|
|
5515
5885
|
if (0 != kk)
|
|
5516
5886
|
{
|
|
@@ -5557,17 +5927,33 @@ namespace bgfx { namespace d3d12
|
|
|
5557
5927
|
m_directAccessPtr = NULL;
|
|
5558
5928
|
}
|
|
5559
5929
|
|
|
5560
|
-
|
|
5930
|
+
const bool external = 0 != (m_flags & BGFX_SAMPLER_INTERNAL_SHARED);
|
|
5931
|
+
const bool externalShared = 0 != (m_flags & BGFX_TEXTURE_EXTERNAL_SHARED);
|
|
5932
|
+
|
|
5933
|
+
if (externalShared)
|
|
5934
|
+
{
|
|
5935
|
+
#if !BX_PLATFORM_LINUX
|
|
5936
|
+
CloseHandle(m_handle);
|
|
5937
|
+
m_handle = NULL;
|
|
5938
|
+
#endif // !BX_PLATFORM_LINUX
|
|
5939
|
+
}
|
|
5940
|
+
|
|
5941
|
+
if (external)
|
|
5942
|
+
{
|
|
5943
|
+
s_renderD3D12->m_cmd.removeExternal({ uint16_t(this - s_renderD3D12->m_textures) });
|
|
5944
|
+
}
|
|
5945
|
+
else
|
|
5561
5946
|
{
|
|
5562
5947
|
s_renderD3D12->m_cmd.release(m_ptr);
|
|
5563
|
-
|
|
5564
|
-
m_state = D3D12_RESOURCE_STATE_COMMON;
|
|
5948
|
+
}
|
|
5565
5949
|
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5950
|
+
m_ptr = NULL;
|
|
5951
|
+
m_state = D3D12_RESOURCE_STATE_COMMON;
|
|
5952
|
+
|
|
5953
|
+
if (NULL != m_singleMsaa)
|
|
5954
|
+
{
|
|
5955
|
+
s_renderD3D12->m_cmd.release(m_singleMsaa);
|
|
5956
|
+
m_singleMsaa = NULL;
|
|
5571
5957
|
}
|
|
5572
5958
|
}
|
|
5573
5959
|
}
|
|
@@ -5657,10 +6043,7 @@ namespace bgfx { namespace d3d12
|
|
|
5657
6043
|
D3D12_RANGE readRange = { 0, 0 };
|
|
5658
6044
|
DX_CHECK(staging->Map(0, &readRange, (void**)&dstData) );
|
|
5659
6045
|
|
|
5660
|
-
|
|
5661
|
-
{
|
|
5662
|
-
bx::memCopy(&dstData[ii*rowPitch], &srcData[ii*srcpitch], srcpitch);
|
|
5663
|
-
}
|
|
6046
|
+
bx::memCopy(dstData, rowPitch, srcData, srcpitch, rectpitch, numRows);
|
|
5664
6047
|
|
|
5665
6048
|
if (NULL != temp)
|
|
5666
6049
|
{
|
|
@@ -6130,24 +6513,32 @@ namespace bgfx { namespace d3d12
|
|
|
6130
6513
|
|
|
6131
6514
|
void TimerQueryD3D12::init()
|
|
6132
6515
|
{
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
queryHeapDesc
|
|
6136
|
-
|
|
6137
|
-
|
|
6516
|
+
ID3D12Device* device = s_renderD3D12->m_device;
|
|
6517
|
+
|
|
6518
|
+
D3D12_QUERY_HEAP_DESC queryHeapDesc =
|
|
6519
|
+
{
|
|
6520
|
+
.Type = D3D12_QUERY_HEAP_TYPE_TIMESTAMP,
|
|
6521
|
+
.Count = m_control.m_size * 2,
|
|
6522
|
+
.NodeMask = 1,
|
|
6523
|
+
};
|
|
6524
|
+
|
|
6525
|
+
DX_CHECK(device->CreateQueryHeap(
|
|
6526
|
+
&queryHeapDesc
|
|
6138
6527
|
, IID_ID3D12QueryHeap
|
|
6139
6528
|
, (void**)&m_queryHeap
|
|
6140
6529
|
) );
|
|
6530
|
+
setDebugObjectName(m_queryHeap, "Timer Query Heap");
|
|
6141
6531
|
|
|
6142
6532
|
const uint32_t size = queryHeapDesc.Count*sizeof(uint64_t);
|
|
6143
|
-
m_readback = createCommittedResource(
|
|
6533
|
+
m_readback = createCommittedResource(device
|
|
6144
6534
|
, HeapProperty::ReadBack
|
|
6145
6535
|
, size
|
|
6146
6536
|
);
|
|
6537
|
+
setDebugObjectName(m_readback, "Timer Query Read-Back");
|
|
6147
6538
|
|
|
6148
6539
|
DX_CHECK(s_renderD3D12->m_cmd.m_commandQueue->GetTimestampFrequency(&m_frequency) );
|
|
6149
6540
|
|
|
6150
|
-
D3D12_RANGE range = { 0, size };
|
|
6541
|
+
D3D12_RANGE range = { .Begin = 0, .End = size };
|
|
6151
6542
|
m_readback->Map(0, &range, (void**)&m_queryResult);
|
|
6152
6543
|
|
|
6153
6544
|
for (uint32_t ii = 0; ii < BX_COUNTOF(m_result); ++ii)
|
|
@@ -6170,6 +6561,8 @@ namespace bgfx { namespace d3d12
|
|
|
6170
6561
|
|
|
6171
6562
|
uint32_t TimerQueryD3D12::begin(uint32_t _resultIdx, uint32_t _frameNum)
|
|
6172
6563
|
{
|
|
6564
|
+
ID3D12GraphicsCommandList* commandList = s_renderD3D12->m_commandList;
|
|
6565
|
+
|
|
6173
6566
|
while (0 == m_control.reserve(1) )
|
|
6174
6567
|
{
|
|
6175
6568
|
m_control.consume(1);
|
|
@@ -6184,8 +6577,6 @@ namespace bgfx { namespace d3d12
|
|
|
6184
6577
|
query.m_ready = false;
|
|
6185
6578
|
query.m_frameNum = _frameNum;
|
|
6186
6579
|
|
|
6187
|
-
ID3D12GraphicsCommandList* commandList = s_renderD3D12->m_commandList;
|
|
6188
|
-
|
|
6189
6580
|
uint32_t offset = idx * 2 + 0;
|
|
6190
6581
|
commandList->EndQuery(m_queryHeap
|
|
6191
6582
|
, D3D12_QUERY_TYPE_TIMESTAMP
|
|
@@ -6199,13 +6590,13 @@ namespace bgfx { namespace d3d12
|
|
|
6199
6590
|
|
|
6200
6591
|
void TimerQueryD3D12::end(uint32_t _idx)
|
|
6201
6592
|
{
|
|
6593
|
+
ID3D12GraphicsCommandList* commandList = s_renderD3D12->m_commandList;
|
|
6594
|
+
|
|
6202
6595
|
Query& query = m_query[_idx];
|
|
6203
6596
|
query.m_ready = true;
|
|
6204
6597
|
query.m_fence = s_renderD3D12->m_cmd.m_currentFence - 1;
|
|
6205
6598
|
uint32_t offset = _idx * 2;
|
|
6206
6599
|
|
|
6207
|
-
ID3D12GraphicsCommandList* commandList = s_renderD3D12->m_commandList;
|
|
6208
|
-
|
|
6209
6600
|
commandList->EndQuery(m_queryHeap
|
|
6210
6601
|
, D3D12_QUERY_TYPE_TIMESTAMP
|
|
6211
6602
|
, offset + 1
|
|
@@ -6225,7 +6616,7 @@ namespace bgfx { namespace d3d12
|
|
|
6225
6616
|
|
|
6226
6617
|
bool TimerQueryD3D12::update()
|
|
6227
6618
|
{
|
|
6228
|
-
if (0 != m_control.
|
|
6619
|
+
if (0 != m_control.getNumUsed() )
|
|
6229
6620
|
{
|
|
6230
6621
|
uint32_t idx = m_control.m_read;
|
|
6231
6622
|
Query& query = m_query[idx];
|
|
@@ -6268,10 +6659,11 @@ namespace bgfx { namespace d3d12
|
|
|
6268
6659
|
) );
|
|
6269
6660
|
|
|
6270
6661
|
const uint32_t size = BX_COUNTOF(m_handle)*sizeof(uint64_t);
|
|
6271
|
-
m_readback = createCommittedResource(
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6662
|
+
m_readback = createCommittedResource(
|
|
6663
|
+
s_renderD3D12->m_device
|
|
6664
|
+
, HeapProperty::ReadBack
|
|
6665
|
+
, size
|
|
6666
|
+
);
|
|
6275
6667
|
|
|
6276
6668
|
D3D12_RANGE range = { 0, size };
|
|
6277
6669
|
m_readback->Map(0, &range, (void**)&m_result);
|
|
@@ -6326,7 +6718,7 @@ namespace bgfx { namespace d3d12
|
|
|
6326
6718
|
{
|
|
6327
6719
|
const uint32_t size = m_control.m_size;
|
|
6328
6720
|
|
|
6329
|
-
for (uint32_t ii = 0, num = m_control.
|
|
6721
|
+
for (uint32_t ii = 0, num = m_control.getNumUsed(); ii < num; ++ii)
|
|
6330
6722
|
{
|
|
6331
6723
|
OcclusionQueryHandle& handle = m_handle[(m_control.m_read + ii) % size];
|
|
6332
6724
|
if (handle.idx == _handle.idx)
|
|
@@ -6462,6 +6854,16 @@ namespace bgfx { namespace d3d12
|
|
|
6462
6854
|
}
|
|
6463
6855
|
}
|
|
6464
6856
|
|
|
6857
|
+
void RendererContextD3D12::submitUniformCache(UniformCacheState& _ucs, uint16_t _view)
|
|
6858
|
+
{
|
|
6859
|
+
while (_ucs.hasItem(_view) )
|
|
6860
|
+
{
|
|
6861
|
+
const UniformCacheItem& uci = _ucs.advance();
|
|
6862
|
+
|
|
6863
|
+
bx::memCopy(m_uniforms[uci.m_handle], &_ucs.m_frame->m_uniformCacheFrame.m_data[uci.m_offset], uci.m_size);
|
|
6864
|
+
}
|
|
6865
|
+
}
|
|
6866
|
+
|
|
6465
6867
|
void RendererContextD3D12::submit(Frame* _render, ClearQuad& /*_clearQuad*/, TextVideoMemBlitter& _textVideoMemBlitter)
|
|
6466
6868
|
{
|
|
6467
6869
|
if (m_lost
|
|
@@ -6509,9 +6911,6 @@ namespace bgfx { namespace d3d12
|
|
|
6509
6911
|
static ViewState viewState;
|
|
6510
6912
|
viewState.reset(_render);
|
|
6511
6913
|
|
|
6512
|
-
// bool wireframe = !!(_render->m_debug&BGFX_DEBUG_WIREFRAME);
|
|
6513
|
-
// setDebugWireframe(wireframe);
|
|
6514
|
-
|
|
6515
6914
|
uint16_t currentSamplerStateIdx = kInvalidHandle;
|
|
6516
6915
|
ProgramHandle currentProgram = BGFX_INVALID_HANDLE;
|
|
6517
6916
|
uint32_t currentBindHash = 0;
|
|
@@ -6522,6 +6921,7 @@ namespace bgfx { namespace d3d12
|
|
|
6522
6921
|
uint16_t view = UINT16_MAX;
|
|
6523
6922
|
FrameBufferHandle fbh = { BGFX_CONFIG_MAX_FRAME_BUFFERS };
|
|
6524
6923
|
|
|
6924
|
+
UniformCacheState ucs(_render);
|
|
6525
6925
|
BlitState bs(_render);
|
|
6526
6926
|
|
|
6527
6927
|
uint32_t blendFactor = 0;
|
|
@@ -6648,12 +7048,14 @@ namespace bgfx { namespace d3d12
|
|
|
6648
7048
|
|
|
6649
7049
|
profiler.begin(view);
|
|
6650
7050
|
|
|
7051
|
+
const View& renderView = _render->m_view[view];
|
|
7052
|
+
|
|
6651
7053
|
fbh = _render->m_view[view].m_fbh;
|
|
6652
7054
|
setFrameBuffer(fbh);
|
|
6653
7055
|
|
|
6654
|
-
viewState.m_rect =
|
|
6655
|
-
const Rect& rect =
|
|
6656
|
-
const Rect& scissorRect =
|
|
7056
|
+
viewState.m_rect = renderView.m_rect;
|
|
7057
|
+
const Rect& rect = renderView.m_rect;
|
|
7058
|
+
const Rect& scissorRect = renderView.m_scissor;
|
|
6657
7059
|
viewHasScissor = !scissorRect.isZero();
|
|
6658
7060
|
viewScissorRect = viewHasScissor ? scissorRect : rect;
|
|
6659
7061
|
|
|
@@ -6674,7 +7076,7 @@ namespace bgfx { namespace d3d12
|
|
|
6674
7076
|
m_commandList->RSSetScissorRects(1, &rc);
|
|
6675
7077
|
restoreScissor = false;
|
|
6676
7078
|
|
|
6677
|
-
Clear& clr =
|
|
7079
|
+
const Clear& clr = renderView.m_clear;
|
|
6678
7080
|
if (BGFX_CLEAR_NONE != clr.m_flags)
|
|
6679
7081
|
{
|
|
6680
7082
|
Rect clearRect = rect;
|
|
@@ -6684,7 +7086,13 @@ namespace bgfx { namespace d3d12
|
|
|
6684
7086
|
|
|
6685
7087
|
prim = s_primInfo[Topology::Count]; // Force primitive type update.
|
|
6686
7088
|
|
|
7089
|
+
submitUniformCache(ucs, view);
|
|
6687
7090
|
submitBlit(bs, view);
|
|
7091
|
+
|
|
7092
|
+
if (m_variableRateShadingSupport)
|
|
7093
|
+
{
|
|
7094
|
+
reinterpret_cast<ID3D12GraphicsCommandList5*>(m_commandList)->RSSetShadingRate(s_shadingRate[renderView.m_shadingRate], NULL);
|
|
7095
|
+
}
|
|
6688
7096
|
}
|
|
6689
7097
|
|
|
6690
7098
|
if (isCompute)
|
|
@@ -6704,7 +7112,7 @@ namespace bgfx { namespace d3d12
|
|
|
6704
7112
|
{
|
|
6705
7113
|
commandListChanged = false;
|
|
6706
7114
|
|
|
6707
|
-
m_commandList->SetComputeRootSignature(
|
|
7115
|
+
m_commandList->SetComputeRootSignature(m_computeRootSignature);
|
|
6708
7116
|
ID3D12DescriptorHeap* heaps[] = {
|
|
6709
7117
|
m_samplerAllocator.getHeap(),
|
|
6710
7118
|
scratchBuffer.getHeap(),
|
|
@@ -6823,10 +7231,10 @@ namespace bgfx { namespace d3d12
|
|
|
6823
7231
|
if (samplerStateIdx != currentSamplerStateIdx)
|
|
6824
7232
|
{
|
|
6825
7233
|
currentSamplerStateIdx = samplerStateIdx;
|
|
6826
|
-
m_commandList->SetComputeRootDescriptorTable(
|
|
7234
|
+
m_commandList->SetComputeRootDescriptorTable(ComputeRp::Sampler, m_samplerAllocator.get(samplerStateIdx) );
|
|
6827
7235
|
}
|
|
6828
|
-
m_commandList->SetComputeRootDescriptorTable(
|
|
6829
|
-
m_commandList->SetComputeRootDescriptorTable(
|
|
7236
|
+
m_commandList->SetComputeRootDescriptorTable(ComputeRp::SRV, bindCached->m_srvHandle);
|
|
7237
|
+
m_commandList->SetComputeRootDescriptorTable(ComputeRp::UAV, bindCached->m_srvHandle);
|
|
6830
7238
|
}
|
|
6831
7239
|
}
|
|
6832
7240
|
|
|
@@ -6855,7 +7263,7 @@ namespace bgfx { namespace d3d12
|
|
|
6855
7263
|
ProgramD3D12& program = m_program[currentProgram.idx];
|
|
6856
7264
|
viewState.setPredefined<4>(this, view, program, _render, compute);
|
|
6857
7265
|
commitShaderConstants(key.m_program, gpuAddress);
|
|
6858
|
-
m_commandList->SetComputeRootConstantBufferView(
|
|
7266
|
+
m_commandList->SetComputeRootConstantBufferView(ComputeRp::CBV, gpuAddress);
|
|
6859
7267
|
}
|
|
6860
7268
|
|
|
6861
7269
|
if (isValid(compute.m_indirectBuffer) )
|
|
@@ -6988,14 +7396,12 @@ namespace bgfx { namespace d3d12
|
|
|
6988
7396
|
uint8_t numStreams = 0;
|
|
6989
7397
|
if (UINT32_MAX != draw.m_streamMask)
|
|
6990
7398
|
{
|
|
6991
|
-
for (
|
|
6992
|
-
;
|
|
6993
|
-
;
|
|
7399
|
+
for (BitMaskToIndexIteratorT it(draw.m_streamMask)
|
|
7400
|
+
; !it.isDone()
|
|
7401
|
+
; it.next(), numStreams++
|
|
6994
7402
|
)
|
|
6995
7403
|
{
|
|
6996
|
-
const
|
|
6997
|
-
streamMask >>= ntz;
|
|
6998
|
-
idx += ntz;
|
|
7404
|
+
const uint8_t idx = it.idx;
|
|
6999
7405
|
|
|
7000
7406
|
currentState.m_stream[idx].m_layoutHandle = draw.m_stream[idx].m_layoutHandle;
|
|
7001
7407
|
currentState.m_stream[idx].m_handle = draw.m_stream[idx].m_handle;
|
|
@@ -7137,11 +7543,11 @@ namespace bgfx { namespace d3d12
|
|
|
7137
7543
|
if (samplerStateIdx != currentSamplerStateIdx)
|
|
7138
7544
|
{
|
|
7139
7545
|
currentSamplerStateIdx = samplerStateIdx;
|
|
7140
|
-
m_commandList->SetGraphicsRootDescriptorTable(
|
|
7546
|
+
m_commandList->SetGraphicsRootDescriptorTable(RenderRp::Sampler, m_samplerAllocator.get(samplerStateIdx) );
|
|
7141
7547
|
}
|
|
7142
7548
|
|
|
7143
|
-
m_commandList->SetGraphicsRootDescriptorTable(
|
|
7144
|
-
m_commandList->SetGraphicsRootDescriptorTable(
|
|
7549
|
+
m_commandList->SetGraphicsRootDescriptorTable(RenderRp::SRV, bindCached->m_srvHandle);
|
|
7550
|
+
m_commandList->SetGraphicsRootDescriptorTable(RenderRp::UAV, bindCached->m_srvHandle);
|
|
7145
7551
|
}
|
|
7146
7552
|
}
|
|
7147
7553
|
|
|
@@ -7254,7 +7660,7 @@ namespace bgfx { namespace d3d12
|
|
|
7254
7660
|
commitShaderConstants(key.m_program, gpuAddress);
|
|
7255
7661
|
}
|
|
7256
7662
|
|
|
7257
|
-
uint32_t numIndices = m_batch.draw(m_commandList, gpuAddress, draw);
|
|
7663
|
+
uint32_t numIndices = m_batch.draw(m_commandList, gpuAddress, gpuAddress + m_program[currentProgram.idx].m_vsh->m_size, draw);
|
|
7258
7664
|
uint32_t numPrimsSubmitted = numIndices / prim.m_div - prim.m_sub;
|
|
7259
7665
|
uint32_t numPrimsRendered = numPrimsSubmitted*draw.m_numInstances;
|
|
7260
7666
|
|
|
@@ -7330,7 +7736,7 @@ namespace bgfx { namespace d3d12
|
|
|
7330
7736
|
maxGpuLatency = bx::uint32_imax(maxGpuLatency, result.m_pending-1);
|
|
7331
7737
|
}
|
|
7332
7738
|
|
|
7333
|
-
maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.
|
|
7739
|
+
maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.getNumUsed()-1);
|
|
7334
7740
|
|
|
7335
7741
|
const int64_t timerFreq = bx::getHPFrequency();
|
|
7336
7742
|
|
|
@@ -7364,7 +7770,6 @@ namespace bgfx { namespace d3d12
|
|
|
7364
7770
|
{
|
|
7365
7771
|
BGFX_D3D12_PROFILER_BEGIN_LITERAL("debugstats", kColorFrame);
|
|
7366
7772
|
|
|
7367
|
-
// m_needPresent = true;
|
|
7368
7773
|
TextVideoMem& tvm = m_textVideoMem;
|
|
7369
7774
|
|
|
7370
7775
|
static int64_t next = timeEnd;
|
|
@@ -7519,10 +7924,21 @@ namespace bgfx { namespace d3d12
|
|
|
7519
7924
|
, m_pipelineStateCache.getCount()
|
|
7520
7925
|
, m_samplerStateCache.getCount()
|
|
7521
7926
|
, bindLru.getCount()
|
|
7522
|
-
, m_cmd.m_control.
|
|
7927
|
+
, m_cmd.m_control.getNumUsed()
|
|
7523
7928
|
);
|
|
7524
7929
|
pos++;
|
|
7525
7930
|
|
|
7931
|
+
tvm.printf(10, pos++, 0x8b, " Pipeline Statistics:");
|
|
7932
|
+
const CommandQueueD3D12::PipelineStats& pipelineStats = m_cmd.m_pipelineStatsSum;
|
|
7933
|
+
tvm.printf(10, pos++, 0x8b, " IAVertices: %llu", pipelineStats.IAVertices);
|
|
7934
|
+
tvm.printf(10, pos++, 0x8b, " IAPrimitives: %llu", pipelineStats.IAPrimitives);
|
|
7935
|
+
tvm.printf(10, pos++, 0x8b, " VSInvocations: %llu", pipelineStats.VSInvocations);
|
|
7936
|
+
tvm.printf(10, pos++, 0x8b, " CInvocations: %llu", pipelineStats.CInvocations);
|
|
7937
|
+
tvm.printf(10, pos++, 0x8b, " CPrimitives: %llu", pipelineStats.CPrimitives);
|
|
7938
|
+
tvm.printf(10, pos++, 0x8b, " PSInvocations: %llu", pipelineStats.PSInvocations);
|
|
7939
|
+
tvm.printf(10, pos++, 0x8b, " CSInvocations: %llu", pipelineStats.CSInvocations);
|
|
7940
|
+
pos++;
|
|
7941
|
+
|
|
7526
7942
|
double captureMs = double(captureElapsed)*toMs;
|
|
7527
7943
|
tvm.printf(10, pos++, 0x8b, " Capture: %7.4f [ms] ", captureMs);
|
|
7528
7944
|
|
|
@@ -7538,7 +7954,7 @@ namespace bgfx { namespace d3d12
|
|
|
7538
7954
|
presentMax = m_presentElapsed;
|
|
7539
7955
|
}
|
|
7540
7956
|
|
|
7541
|
-
|
|
7957
|
+
dbgTextSubmit(this, _textVideoMemBlitter, tvm);
|
|
7542
7958
|
|
|
7543
7959
|
BGFX_D3D12_PROFILER_END();
|
|
7544
7960
|
}
|
|
@@ -7546,7 +7962,7 @@ namespace bgfx { namespace d3d12
|
|
|
7546
7962
|
{
|
|
7547
7963
|
BGFX_D3D12_PROFILER_BEGIN_LITERAL("debugtext", kColorFrame);
|
|
7548
7964
|
|
|
7549
|
-
|
|
7965
|
+
dbgTextSubmit(this, _textVideoMemBlitter, _render->m_textVideoMem);
|
|
7550
7966
|
|
|
7551
7967
|
BGFX_D3D12_PROFILER_END();
|
|
7552
7968
|
}
|
|
@@ -7591,6 +8007,7 @@ namespace bgfx { namespace d3d12
|
|
|
7591
8007
|
#endif // BX_PLATFORM_WINDOWS
|
|
7592
8008
|
|
|
7593
8009
|
m_backBufferColorFence[m_backBufferColorIdx] = kick();
|
|
8010
|
+
m_cmd.m_pipelineStatsSum.reset();
|
|
7594
8011
|
}
|
|
7595
8012
|
|
|
7596
8013
|
} /* namespace d3d12 */ } // namespace bgfx
|