Giter VIP home page Giter VIP logo

Comments (7)

tolnaiz avatar tolnaiz commented on June 16, 2024 1

It's indeed working with a newer SDL. Which also solves some assumably mac specific bugs (handling hidpi mode and mouse wheel problems).

from vkquake3.

suijingfeng avatar suijingfeng commented on June 16, 2024

Sorry,as far as I know, vulkan is not supported by Apple.
can you try moltenvk ( https://moltengl.com/moltenvk/ ), but i am not familiar with it.
and i don't have a mac, so i can't reproduce this problem.
only windows and linux are tested, i can't help in your case, sorry.

from vkquake3.

tolnaiz avatar tolnaiz commented on June 16, 2024

There is https://github.com/gfx-rs/portability which is quite similar to moltenvk, and in theory, it can run vkquake3.
Sadly I had no success with either one of them, probably because I'm a complete noob in static/dynamic linking.

Let me know if you have any results.

from vkquake3.

danieleftodi avatar danieleftodi commented on June 16, 2024

@suijingfeng & @tolnaiz ... TL:DR .... I got it working 🥳 ... I'll shortly make a patch available ...

Sorry, as far as I know, vulkan is not supported by Apple.

That is a bit ... "not quite of a correct statement" 🙃😉 ... like OpenGL, Vulkan and Metal are "just a specification" ... it's not Apple, nor Microsoft nor Linux-developers that have to write the code to add a specification support into a gfx cards driver ... it's the manufacturers (AMD, Nvidia, Intel ... etc etc) ...

Like The Cherno explains in his OpenGL crash course on youtube - Welcome to OpenGL ...

The question is: has AMD, Nvidia, et. al added Vulkan API specification support into the macOS driver that they provide to Apple? ... they've done so for Microsoft and their Linux drivers ... (or just make one available for us to download and install ourselves?) ... I don't know ...

Though we know AMD has added Metal API specification into their gfx drivers for macOS ... and that is why (IMHO) MoltenVK has come about ... to create a translation layer for Vulkan API --to-the--> Metal API ... *yay all of us*

Though, IMHO, all gfx manufacturers (yeah, Apple too, with their own Apple Silicon chips) should add Vulkan API specification to their drivers, and make them available... so developers can try to code once, and support many 🙏🏻 ... so we can once and for all say farewell to OpenGL 😉

R.I.P OpenGL...

can you try moltenvk ( https://moltengl.com/moltenvk/ ), but i am not familiar with it.

TL:DR ... that is what I've done ... sort of ... or didn't have to do at all...

After RTFM-ing and some more debugging it turns out that it was the SDL2 Library that is either to old and/or was compiled without Vulkan API support (for macOS...) ...

...VKimp_SetMode()...
 bpp 32	SDL_PIXELFORMAT_ARGB8888	2560 x 1440, refresh_rate: 60Hz
 MODE: 3, 640 x 480, refresh rate: 60hz
^3 Couldn't create a window: Vulkan support is either not configured in SDL or not available in video driver
----- Client Shutdown (Client fatal crashed: VKimp_Init() - could not load Vulkan subsystem: Vulkan support is either not configured in SDL or not available in video driver) -----

so I updated the SDL2 Lib to 2.0.12 and it works 👍🏻

...Creating window (using SDL2)...
 Found SDL version 2.0.12
 Video is not initialized before, so initial it.
 SDL using driver "cocoa"
     
...VKimp_SetMode()...
 bpp 32	SDL_PIXELFORMAT_ARGB8888	2560 x 1440, refresh_rate: 60Hz
 MODE: -2, 2560 x 1440, refresh rate: 60hz
 Available modes: '2560x1440 2048x1152 1600x1200 1600x900 1344x1008 1344x756 1280x960 1280x720 1024x768 1024x576 800x600 640x480'
 Loading vulkan instance functions 
 *** Vulkan Initialization ***
 Get instance proc address. (using SDL2)
 Creating instance: vk.instance
--- Total 10 instance extensions. --- 
--- Vulkan create instance success! ---

There is https://github.com/gfx-rs/portability which is quite similar to moltenvk, and in theory, it can run vkquake3.
Sadly I had no success with either one of them, probably because I'm a complete noob in static/dynamic linking.

@tolnaiz : ... the great news is that since 2018 Valve has made sure MoltenVK becomes Open Source and that it gets incorporated into the official Vulkan SDK maintained by the Khronos Group...

And SDL2 also supports Vulkan ... meaning, one doesn't have to do much to have Vulkan support on all platforms SDL2 Lib has support for ... just make sure to compile the SDL2 library with Vulkan support, and not run an old SDL2 lib that doesn't support it (say older then some-time-in-2018-when-SDL2-added-support-for-it?...)

from vkquake3.

danieleftodi avatar danieleftodi commented on June 16, 2024

Pull request: #11

from vkquake3.

danieleftodi avatar danieleftodi commented on June 16, 2024

@tolnaiz

btw, do you have the same issue? #12

(yeah, let's continue this talk in that issue ...)

from vkquake3.

danieleftodi avatar danieleftodi commented on June 16, 2024

This [Fix] is merged, closing issue.

from vkquake3.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.