* bx: Small platform detection/usage improvements
* Use BX_PLATFORM_POSIX where needed
The semaphone implementation already uses BX_PLATFORM_POSIX to include
<pthread.h> on all the POSIX platforms; do the same also in other places
for consistency. This is done also for <sched.h>, which is a POSIX API,
and sched_yield() from it is already guarded by BX_PLATFORM_POSIX.
* Drop support for GNU libc older than 2.12
glibc 2.12 was released on 2010, and at this point any supported Linux
distro has that version or way greather than that.
From bkaradzic/bx@b59b7debd3
* bx: fix <pthread/pthread.h> include on Hurd
<pthread/pthread.h> does not exist, the standard <pthread.h> does exist
so switch to it.
* osd/modules/file: use dirent::d_type on any GNU libc platform
This BSD extension is provided by GNU libc, so enable its usage with
that C library.
* osd/modules/file: use <pty.h> on any GNU libc platform
openpty() is implemented by GNU libc for all the OSes, so include
<pty.h> when using that C library.
* osd/modules/file: cast dirent::d_name to const char* before using it
According to POSIX [1], the type of dirent::d_name is loosely defined
as "char d_name[]", as array with an undefined size. In particular, few
ways are seen in the wild:
(a) "char d_name[size]", i.e. as proper array with a full size
(b) "char d_name[1]"/"char d_name[0]", i.e. as C flexible arrays
Regardless of its type, dirent::d_name is used as if it was a classic
const char *, i.e. as pointer to a null-terminated string.
util::string_format() uses C++ templates to collect all the arguments,
and thus it will use the actual type of dirent::d_name. In case of (a)
there is no issue, however for (b) the result is that only the first
character is used.
To ensure that dirent::d_name is fully used, explicitly cast it to
const char * before passing it to util::string_format(), so the whole
string is used.
[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/dirent.h.html
This was not straightforward, and we're now ahead of the ImGui version
in upstream bgfx.
Updated the bgfx-specific memory editor widget rather than just
partially removing the code.
Had to add an explicit template instantiation to imgui_widgets.cpp to
avoid a link error in the bgfx-specific range slider widget.
Got the imgconfig.h header a lot closer to the template from upstream
ImGui.
* Properly support Wayland under EGL and Vulkan. (#3358)
* Dynamically load libwayland-egl.so.1 when dealing with Wayland to remove dependencies at program startup. (#3359)
* Cleanup.
* Support both X11 and Wayland in the same build. (#3360)
* Support both X11 and Wayland in the same build.
- Works for both Vulkan and OpenGL.
- Remove --with-wayland from genie options.
- Vulkan loads all three extensions for surface creation instead of only one.
- Add width and height parameter to GlContext::createSwapChain(), which is needed for EGL to create
a SwapChain with the given window size.
- Dirty-fix the example-22-windows to recreate the FrameBuffer by first destroying and then
recreating to make sure the window is released of its swapchain.
- Fix dbgText glitch in example-22-windows.
- Remove old X11-related dependencies for GLFW3.
* Formatting.
* Adapt to latest bgfx wayland code
* Cleanup.
* Fix Vulkan swapchain invalidation issue. (#3379)
* Fix Vulkan swapchain invalidation issue.
* Always clamp render pass to frame buffer size.
* Fix formatting.
* Hopefully fix macOS build
* Hopefully fix macOS build, attempt 2
---------
Co-authored-by: Martijn Courteaux <courteauxmartijn@gmail.com>
Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* Updated to GENie 1181.
* Applied local fix for GENie resource include directory bug, sent upstream as bkaradzic/GENie#572.
* Set MSVC flags to use conformant preprocessor, standards conformance mode, and assume UTF-8 encoding.
sol::optional<T&>::emplace was broken, and depended on the compiler not
checking that members exist if the template wasn't instantiated. See
ThePHD/sol2#1606 and ThePHD/sol2#1648.
- Update to Softloat 3 from 2
- FREM and FMOD now generate the quotient bits in FPSR, required by Apple's SANE to do sin/cos/tan properly.
- FMOVE of a float to a Dx integer register generates the exception status bits, fixing square roots in SANE
- Rewrote how FMOVEM instructions are decoded and executed, fixing issues including skipping too few or too many
opcode bytes and causing serious weird behavior.
- FPU instructions all now have more realistic cycle timings for a 68881.
- All FPU instructions now generate exception bits in FPSR.
3rdparty/softfloat3: Updates [R. Belmont]
- Softfloat3 was always being built for a big-endian host, causing incorrect math on LE x64 and AArch64 machines.
- Fixed up Softfloat3 to build properly as part of MAME and up-ported the Bochs extensions. In latest Bochs, they
were only partially up-ported and Softfloat3 had been hacked up to be more like 2; here they're fixed to work
with stock Softfloat3.
When taking a pointer to a static member function template in a class
template, clang reports a substitution error if the noexcept
specification uses an expression that depends on class template
arguments.
See llvm/llvm-project#91362 on GitHub.