Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build-win32-shader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
-A ${{ inputs.platform }} ^
-D BX_CONFIG_DEBUG=ON ^
-D GRAPHICS_API=D3D11 ^
-D BGFX_CONFIG_MAX_FRAME_BUFFERS=256 ^
-D BABYLON_DEBUG_TRACE=ON ^
-D BABYLON_NATIVE_PLUGIN_NATIVEENGINE_COMPILESHADERS=OFF

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ jobs:
${{ steps.vars.outputs.js_define }} ^
-D BX_CONFIG_DEBUG=ON ^
-D GRAPHICS_API=${{ inputs.graphics-api }} ^
-D BGFX_CONFIG_MAX_FRAME_BUFFERS=256 ^
-D BABYLON_DEBUG_TRACE=ON ^
-D BABYLON_NATIVE_PLUGIN_NATIVEDRACO=ON ^
-D BABYLON_NATIVE_PLUGIN_NATIVEMESHOPT=ON ^
Expand Down
16 changes: 4 additions & 12 deletions Dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,10 @@ target_compile_definitions(bgfx PUBLIC BGFX_PLATFORM_SUPPORTS_WGSL=0)
# Expose the path so the OpenGL backends of our own targets can use it.
set(BGFX_KHRONOS_INCLUDE_DIR "${bgfx.cmake_SOURCE_DIR}/bgfx/3rdparty/khronos" CACHE INTERNAL "")

# Canvas plugin allocates one bgfx framebuffer per JS Canvas object and per
# text-rendering operation; combined with V8 GC pacing this can exceed the
# default 128 limit during long playground sweeps. We enforce a floor of 2048:
# CI workflows pass -DBGFX_CONFIG_MAX_FRAME_BUFFERS, and any value below 2048
# (including a smaller CI override) is clamped up so the pool never regresses
# below the size the Canvas sweeps need.
#
# 512 was sufficient only because the validation runner exited on the first
# failing test. With --keep-going a full validation sweep keeps allocating past
# that point and exhausts the pool around the FrameGraph tests, so the floor
# has to cover a complete uninterrupted run.
if(NOT BGFX_CONFIG_MAX_FRAME_BUFFERS OR BGFX_CONFIG_MAX_FRAME_BUFFERS LESS 2048)
# The Canvas polyfill holds a bgfx framebuffer per JS Canvas object and per

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds like we only need to increase this by default if you are using the canvas polyfill. Should it be conditioned on this?

# text-rendering operation, releasing them only on GC finalize, so a long
# playground sweep exceeds bgfx's default of 128.
if(NOT BGFX_CONFIG_MAX_FRAME_BUFFERS)
set(BGFX_CONFIG_MAX_FRAME_BUFFERS 2048)
Comment thread
bghgary marked this conversation as resolved.
Resolved
Comment thread
bghgary marked this conversation as resolved.
Resolved
endif()
target_compile_definitions(bgfx PRIVATE BGFX_CONFIG_MAX_FRAME_BUFFERS=${BGFX_CONFIG_MAX_FRAME_BUFFERS})
Expand Down
2 changes: 1 addition & 1 deletion nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- checkout: self

- script: |
cmake -G "Visual Studio 17 2022" -B build -A x64 -D BX_CONFIG_DEBUG=ON -D BGFX_CONFIG_MAX_FRAME_BUFFERS=256 -D BABYLON_DEBUG_TRACE=ON
cmake -G "Visual Studio 17 2022" -B build -A x64 -D BX_CONFIG_DEBUG=ON -D BABYLON_DEBUG_TRACE=ON
displayName: 'Generate solution'

- script: |
Expand Down