Comments (10)
Ok! I'll close this issue then. Please open another issue for that crash if you're stuck!
from sokol.
Strange indeed, according to here MTLGPUFamilyApple8
should be available since macOS SDK 10.15+
https://developer.apple.com/documentation/metal/mtlgpufamily/mtlgpufamilyapple8
What does xcrun --sdk macosx --show-sdk-path
say? (to check what SDK version is used, for instance here it says: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk
)
I was hoping that the way I'm conditionally compiling this code inside ifdefs would fix the issue now for older SDK version, but looks I did something wrong there:
Lines 10757 to 10770 in 5bfa842
from sokol.
Just ran:
xcrun --sdk macosx --show-sdk-path
And it's showing:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk
I assume this means I could fix this by upgrading Xcode then? Though I would definitely expect yeah that it should still work with older versions.
from sokol.
Hmm ok, getting closer. On my old Intel Mac with SDK 11.3 this whole code block is skipped, so it builds just fine.
But the code block is compiled with SDK 12.x, but I guess this MTLGPUFamily8
is not yet defined in SDK 12.3 (which means the documentation is wrong, but that's not unusual unfortunately).
Upgrading the SDK or even Xcode would workaround the problem, but I'd better find a solution that also works with the 12.3 SDK, I just need to add a couple more ifdefs I guess.
I'll try to look into this in the evening, but it'll be a bit hard for me to test.
from sokol.
Btw, this define shouldn't be needed:
#define USE_SOKOL_APP
...also SOKOL_LOG has been replaced with the new runtime logging callback and sokol_log.h :)
from sokol.
It's really strange, there's nothing in the Metal headers (of SDK 14.0 at least) which would indicate when MTLGPUFamilyApple8
became available:
from sokol.
Can you check what this enum MTLGPUFamily
looks like on your SDK version? The path for your SDK version should be:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h
from sokol.
...I'm actually wondering why I explicitely added the MTLGPUFamily8 check, I would expect that this is a superset of MTLGPUFamily7... need to dig around a bit in the git history...
from sokol.
...yeah I simply removed the MTLGPUFamily8 check since the clamp_to_border_color feature should be covered by MTLGPUFamily7.
Can you check if this works for you now?
from sokol.
Just tried latest and it seems to compile without issue! However the program crashes on sokol_gfx setup but I think that's an issue for me and bindings.
Just for reference though, here's the enum for me:
Can you check what this enum
MTLGPUFamily
looks like on your SDK version? The path for your SDK version should be:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h
typedef NS_ENUM(NSInteger, MTLGPUFamily)
{
MTLGPUFamilyApple1 = 1001,
MTLGPUFamilyApple2 = 1002,
MTLGPUFamilyApple3 = 1003,
MTLGPUFamilyApple4 = 1004,
MTLGPUFamilyApple5 = 1005,
MTLGPUFamilyApple6 = 1006,
MTLGPUFamilyApple7 = 1007,
MTLGPUFamilyMac1 = 2001,
MTLGPUFamilyMac2 = 2002,
MTLGPUFamilyCommon1 = 3001,
MTLGPUFamilyCommon2 = 3002,
MTLGPUFamilyCommon3 = 3003,
MTLGPUFamilyMacCatalyst1 = 4001,
MTLGPUFamilyMacCatalyst2 = 4002,
} API_AVAILABLE(macos(10.15), ios(13.0));
from sokol.
Related Issues (20)
- test
- Sokol Fetch Http response 200 is reported as an error HOT 7
- [sokol_gfx d3d11] update_image is wrong for 3d textures HOT 10
- Offscreen with alpha background. Is it possible? HOT 4
- [webgpu] Bindgroups cache breaks down with init/uninit pattern.
- macOS huge memory usage when window minimized HOT 1
- Questions regarding default GL version HOT 5
- App Window Size on Android HOT 3
- Default value _sg_gl_uniform_t::gl_loc when uniform_desc's name isn't given in sokol_gfx HOT 1
- sokol_gfx.h: wrong define in log related to SOKOL_TRACE_HOOKS HOT 1
- WebGPU TextureView validation error HOT 6
- sokol_fetch on Android
- partial updates to buffers/textures (e.g. offset and size args to glBufferSubData, glTexSubImage) HOT 1
- Right shift is recognized as "invalid key" on Windows. HOT 9
- SAPP_EVENT_CHAR for Space is fired when Ctrl+Space is pressed. HOT 2
- Key events on Linux always use the **first** keyboard layout in the system's keyboard layout list. HOT 1
- Continuous Bind Slots Restriction Unnecessary? HOT 3
- Feature request: Please drop the direct use of int, short, etc in favour of int_least32_t, int_least16_t HOT 9
- attributeless rendering support HOT 2
- WebGL Offscreen rending is broken in Chrome v127 on Mac M1 and MacOS 14.5. HOT 22
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 sokol.