Skip to content

Update c++20#46

Open
SergioRZMasson wants to merge 140 commits intoBabylonJS:masterfrom
SergioRZMasson:update-c++20
Open

Update c++20#46
SergioRZMasson wants to merge 140 commits intoBabylonJS:masterfrom
SergioRZMasson:update-c++20

Conversation

@SergioRZMasson
Copy link

Updated latest changes from original repo. The goal is to update bgfx.cmake with latest version of bimg, bx and bgfx and update all projects to C++ 20.

bkaradzic and others added 30 commits November 4, 2025 14:15
* Added uniform frequency.

* Cleanup.

* Cleanup.
)

* VK: Don't assert when it fails to set debug object name.

* VK: Show VkResult as decimal to match vulkan.h.
killerdevildog and others added 7 commits February 17, 2026 19:27
…radzic#3593)

Replace stl::list (tinystl::vector with O(n) push_front) with a sorted
stl::vector free list that maintains address-order invariant.

Key improvements:
- free(): uses bx::upperBound for O(log n) sorted insertion + immediate
  adjacent-block coalescing instead of O(n) push_front with deferred merge
- compact(): O(1) check (m_used empty?) instead of O(n log n) sort +
  O(n) linear merge pass on every call
- alloc(): first-fit scan over cache-friendly contiguous memory instead
  of pointer-chasing through fragmented list
- add(): sorted insert with coalescing via bx::upperBound, same as free()

Uses bx::upperBound from the bx foundation library for binary search,
no std:: usage. Added operator> to Free struct for bx::compareAscending
compatibility.

The public API and behavioral semantics are unchanged. All existing
callers (dynamic index/vertex buffer allocators, uniform cache store
allocator) continue to work identically.
* Added external texture parameter.

* Use uint64_t instead of uintptr_t for external texture because VkImage is always 64-bit.
* vulkan: Do not hard-depend on Vulkan 1.2 and Vulkan 1.1.

* fix(ub): vector iterators are not the same as taking address of position.

* fix(ub): Mask bit iterator had implicit promotion bug.

* fix(ub): Vulkan backend shouldn't copy fragment shader source if there is none.
…r leaner builds. (bkaradzic#3594)

* Make SPIRV, HLSL, DXIL, Metal backends optional to allow for leaner builds.

* New and automatic detection of available compilers to enable backends.

* Forgot to fixup Metal.

* Cleanup. Check for glsl-optimizer likewise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.