Comments (12)
Don't know how this is related to bx or bgfx? What's the actual issue here?!
from bgfx.
If you enable the confirming preprocessor, bx and bgfx cannot compile
from bgfx.
But what's the issue?
What about GCC and Clang, they don't have conforming processor?
from bgfx.
The issue is you have preprocessor macros that only run on msvc (that overcome the issues), precisely because msvc has a non conforming preprocessor, like this one: https://github.com/bkaradzic/bx/blob/dc3bf2990e62e8e8764de1f430637aa26e333296/include/bx/macros.h#L14
from bgfx.
I think he's saying that the workarounds are no longer needed with an up-to-date version of MSVC (potentially after adding the /Zc:preprocessor
flag. Not really an issue if you ask me, but more of a hint that these can be refactored in the future.
from bgfx.
I think he's saying that the workarounds are no longer needed with an up-to-date version of MSVC (potentially after adding the
/Zc:preprocessor
flag. Not really an issue if you ask me, but more of a hint that these can be refactored in the future.
Nope, you actually can't ever refactor these out, unless you want to drop support for all MSVC compilers older than VS 2017 V15.8 (and that don't have the flag set), additionally, leaving it alone will prevent this from compiling on C++20 for MSVC (or if the flag has been set) because the current MSVC macros workarounds break during compilation with a conforming preprocessor.
Because of the cpp world we live in, the msvc macro workarounds just need to check if the non conforming preprocessor is also enabled, otherwise you lose backwards or forwards compatibility.
from bgfx.
leaving it alone will prevent this from compiling on C++20 for MSVC
bx/bgfx/etc. is only C++17 right now. ETA for C++20 adoption is sometime in 2025.
At some point I'll just flip the switch to new MSVC conforming preprocessor. Until then we assume it doesn't have conforming preprocessor.
from bgfx.
leaving it alone will prevent this from compiling on C++20 for MSVC
bx/bgfx/etc. is only C++17 right now. ETA for C++20 adoption is sometime in 2025.
At some point I'll just flip the switch to new MSVC conforming preprocessor. Until then we assume it doesn't have conforming preprocessor.
Unless I'm misreading something in GENie, BGFX compiles as c++14 on MSVC...
But also why are you even against adding a few lines of code to support a compiler option that you're going to have to support next year anyway?
from bgfx.
Unless I'm misreading something in GENie, BGFX compiles as c++14 on MSVC...
But also why are you even against adding a few lines of code to support a compiler option that you're going to have to support next year anyway?
Because every separate code path adds maintenance cost... Once I decide it's time to support it, I'll spend time to remove old code paths.
from bgfx.
Ah, I missed that because I forgot to check BX.
Because every separate code path adds maintenance cost... Once I decide it's time to support it, I'll spend time to remove old code paths.
But it's not a separate code path, it's adding an extra condition to the couple places that have this divergent behavior, the only way that this would add a new line of code is if you chose to wrap the checking in a "BX_HAS_TRADITIONAL_MSVC_PREPROCESSOR" macro or something like that, either way your just &&-ing an extra conditional(s) onto the couple places with the already if elsed MSVC traditional preprocessor behavior.
from bgfx.
@Zarklord you're wasting my time... I don't have time to bikeshed about some nonsense. If you need this, you can fork bx/bgfx and modify it for yourself.
I don't see the issue with current setup.
from bgfx.
@Zarklord you're wasting my time... I don't have time to bikeshed about some nonsense. If you need this, you can fork bx/bgfx and modify it for yourself.
I don't see the issue with current setup.
It's ironic that your complaining about not having time to talk about this when it would have taken less time to fix the problem than write that comment...
Regardless I look forward to you making this change anyway in like 6 months to a year when you go to support c++20 👍🏻.
from bgfx.
Related Issues (20)
- Shifted window buffer location when resizing a window HOT 1
- Vulkan Backend - incorrect mipmap generation for cubemap frame buffers. HOT 4
- Unable to build bgfx for iOS Simulator x86_64 arch HOT 4
- Vulkan on Android: the frame isn't updating (ONLY THE FIRST FRAME IS RENDERED) HOT 4
- Screenshot taken always from the main window backbuffer on MacOS/Metal
- Index buffer offset not being set with dynamic index buffer and indirect call HOT 25
- gl_NumWorkGroups doesn't compile when the target is DirectX HOT 1
- Feature request: Support FSR 3 instead of FSR 1
- Allow one executable to run with Vulkan on Wayland and X11 HOT 1
- Examples crash on startup on Ubuntu 22.04 HOT 7
- A D3D11 debuglayer warning in 00-helloworld example project.
- setViewMode sequential mode seems to be broken HOT 2
- bgfx:blit on texture arrays does not handle layers past the first one consistently
- [vulkan] Synchronization issue: vkAcquireNextImage uses a semaphore which is in use. HOT 4
- [vulkan] example-07-callback does not work well with a tiling wm.
- Dxgi::shutdown() asserts on 4 GPUs host
- Example 08-update: Non 1x1 texel block size ImageFormats get copied incorrectly from buffer to image in Vulkan. HOT 2
- Metal renderer compiler error in XCode version 15.0 and 15.1 HOT 5
- Dynamic vertex buffer getting overwritten by update after being submitted HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bgfx.