Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync bgfx, bx and bimg with upstream as of 20241207 #13054

Draft
wants to merge 637 commits into
base: master
Choose a base branch
from

Conversation

belegdol
Copy link
Contributor

@belegdol belegdol commented Dec 8, 2024

Sync bgfx, bx and bimg with upstream:

The rationale for the sync are recent wayland improvements [1], [2], [3]. As an unfortunate side effect, macOS 13 or newer is required.
This seems to pass the first tests but more are needed.

[1] bkaradzic/bgfx@3303b45
[2] bkaradzic/bgfx@a6e372e
[3] bkaradzic/bgfx@e488a07

bkaradzic and others added 30 commits December 7, 2024 23:32
Kerning is now also scaled with the scaled child font when using SDF fonts. In examples/common/font_manager.cpp kerning was visibly off when scaling SDF font down.
* Enable debug information for Vulkan shaders

* Enable debug information for Metal shaders
* Fix D3D12 VBV reading size

When `stream.m_startVertex` is not 0 we target a position past the start of the buffer, so `BufferLocation + SizeInBytes` will be past the end of the buffer, which the debug layer will complaining about.

With this fix we're only creating a view for the part of the buffer we actually need to access.

* Reordered buffer size calculation.

---------

Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
…ev#3201)

* Reformatted comments; fixed a couple of oversights

* D bindings: deterministic sub-struct order

* Added missing default to IDL

* Fixed sub-struct linkage; regenerate D binds

* Culled D bindings for header-only C++ functions

* Added missing default to bgfx.idl

* cppinline now supported by all auto-gen bindings

The pattern "func.cppinline and not func.conly" is to make sure that C bindings for `bgfx_vertex_layout_has` are still generated.

* Fix mangling issue; use updated BindBC-Common API
…ands whenever the next draw would overflow the uint16_t index type. (mamedev#3207)
@belegdol
Copy link
Contributor Author

belegdol commented Dec 8, 2024

I have found one regression so far: when running with --bgfx_backend vulkan --bgfx_debug, video will be messed up until first button press. It does not happen with --bgfx_backend opengl or without --bgfx_debug. The colours live are different than when taking a screenshot but the pattern is the same.
vulkan_bgfx_debug

@belegdol
Copy link
Contributor Author

belegdol commented Dec 9, 2024

I have just tested on windows. I have found no obvious issues with dx11, dx12 or opengl renderer, but the vulkan renderer exhibits the same issue as mentioned in my previous comment.

@ICEknigh7
Copy link
Contributor

Just in case that it's something which could be fixed with this update, here's a link to an easy to reproduce bug that only happens when using bgfx: Brightness settings are randomly ignored when using bitmap_rgb32 in the screen_update function

@cuavas
Copy link
Member

cuavas commented Dec 10, 2024

Bumping the requirement to macOS 13 “Ventura” is a non-starter. We’ve only recently bumped it to macOS 11 “Big Sur”. It’s too soon to bump it up by two major versions.

Also, after the debacle with the last attempted bgfx update, I’m pretty nervous about updating bgfx in general.

@belegdol
Copy link
Contributor Author

belegdol commented Dec 10, 2024

Bumping the requirement to macOS 13 “Ventura” is a non-starter. We’ve only recently bumped it to macOS 11 “Big Sur”. It’s too soon to bump it up by two major versions.

Also, after the debacle with the last attempted bgfx update, I’m pretty nervous about updating bgfx in general.

Fair enough. Would you be willing to keep this PR open? This case, once we do want to update, pre-work would not need to be redone from scratch.
I will see if I can cherry-pick the wayland-related commits then.

@belegdol
Copy link
Contributor Author

Just in case that it's something which could be fixed with this update, here's a link to an easy to reproduce bug that only happens when using bgfx: Brightness settings are randomly ignored when using bitmap_rgb32 in the screen_update function

It does not look like it is fixed. Just as with 0.272, changing the gamma in mslug2 has no effect.

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.