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

vkquake compiles ok but fails to launch under MacOS.. #132

Closed
oscarbg opened this issue Mar 3, 2018 · 9 comments
Closed

vkquake compiles ok but fails to launch under MacOS.. #132

oscarbg opened this issue Mar 3, 2018 · 9 comments

Comments

@oscarbg
Copy link

oscarbg commented Mar 3, 2018

we had a twitter interchange few days ago saying to interested on Metal and I said let's improve current situation by getting feedback to both Apple for Metal impros and MoltenVK..

so tried to compile vkquake using MacOS Vulkan SDK and to my surprise compiled ok changing only libvulkan.so for -framework vulkan..
I did previously:
brew upgrade libsdl
to use also new SDL 2.0.8 supporting Vulkan for Macos..

also seems crashes very late in the process of Vulkan init so seems good news:
will report to MoltenVK devs but anyway is easy to fix from your side this error?:
VkPrimitiveTopology value 5 is not supported for rendering
worse seems this shader compiler error:


program_source:46:20: error: called object type 'float' is not a function or function pointer
    float dot = dot(vertexnormal, ubo.shade_vector);
                ~~~^

./vkquake
Command line: ./vkquake
Found SDL version 2.0.8
Detected 4 CPUs.
Quake 1.09 (c) id Software
GLQuake 1.00 (c) id Software
FitzQuake 0.85 (c) John Fitzgibbons
FitzQuake SDL port (c) SleepwalkR, Baker
QuakeSpasm 0.93.0 (c) Ozkan Sezer, Eric Wasylishen & others
vkQuake 0.97.3 (c) Axel Gneiting & others
Host_Init
Playing shareware version.
Console initialized.
UDP_Init: skipping gethostbyname for iMac-de-oscar.local
UDP Initialized
Server using protocol 666 (FitzQuake)
Exe: 15:55:12 Mar 3 2018
256.0 megabyte heap

Vulkan Initialization
Vendor: NVIDIA
Device: AMD Radeon RX Vega 56
Using D32 depth buffer format
Creating command buffers
Initializing staging
Creating descriptor set layouts
Initializing dynamic vertex buffers
Initializing dynamic index buffers
Initializing dynamic uniform buffers
Initializing samplers
Creating pipeline layouts
Using FIFO present mode
fpCreateSwapchainKHR
Creating color buffer
AA disabled
Creating depth buffer
Creating render passes
Creating frame buffers
Creating pipelines
[MoltenVK ERROR] VK_ERROR_FORMAT_NOT_SUPPORTED: VkPrimitiveTopology value 5 is not supported for rendering.
[MoltenVK ERROR] VK_ERROR_FORMAT_NOT_SUPPORTED: VkPrimitiveTopology value 5 is not supported for rendering.
[MoltenVK ERROR] VK_ERROR_FORMAT_NOT_SUPPORTED: VkPrimitiveTopology value 5 is not supported for rendering.
[MoltenVK ERROR] VK_ERROR_FORMAT_NOT_SUPPORTED: VkPrimitiveTopology value 5 is not supported for rendering.
[MoltenVK ERROR] VK_ERROR_FORMAT_NOT_SUPPORTED: VkPrimitiveTopology value 5 is not supported for rendering.
[MoltenVK ERROR] VK_ERROR_FORMAT_NOT_SUPPORTED: VkPrimitiveTopology value 5 is not supported for rendering.
[MoltenVK ERROR] VK_ERROR_FORMAT_NOT_SUPPORTED: VkPrimitiveTopology value 5 is not supported for rendering.
[MoltenVK ERROR] VK_ERROR_INITIALIZATION_FAILED: Shader module compilation failed (code 3):

Compilation failed:

program_source:46:20: error: called object type 'float' is not a function or function pointer
float dot = dot(vertexnormal, ubo.shade_vector);
~~~^

-[MTLRenderPipelineDescriptorInternal validateWithDevice:]:2149: failed assertion `vertexFunction must not be nil.'
Abort trap: 6

@oscarbg oscarbg changed the title vkquake fails to launch under MacOS.. vkquake compiles ok but fails to launch under MacOS.. Mar 3, 2018
@Novum
Copy link
Owner

Novum commented Mar 25, 2018

How is this a vkQuake bug? This is clearly a flaw in MoltenVK. You should file a bug with them.

@Novum Novum closed this as completed Mar 25, 2018
@oscarbg
Copy link
Author

oscarbg commented Mar 29, 2018

you are correct not a vkquake bug..
just saying if it's "easy" to massage code to work on MoltenVK..
FYI the shader compiler bug has been fixed so seems right now only missing is triangle fan aka "VkPrimitiveTopology value 5" which is not supported by Metal..
don't know if much work changing triangle fan draw calls for other ones metal supports..
thanks..

@Novum
Copy link
Owner

Novum commented Mar 30, 2018

Yeah, seems like triangle fans are just not supported. I can look into making it use strips or lists.

@Novum Novum reopened this Mar 30, 2018
@oscarbg
Copy link
Author

oscarbg commented Mar 30, 2018

Would be nice.. thanks..

@Novum
Copy link
Owner

Novum commented Apr 14, 2018

Try 77f3caf

@oscarbg
Copy link
Author

oscarbg commented Apr 21, 2018

thanks...
will try now soon that Vulkan 1.1.73 SDK includes Macos binary release with fixes..
curiosity have you tested it already?
I see latest commit mentions "restrict the workaround to OSX builds only"
are you planning on providing vkquake Macos binary builds on github also?

@Novum
Copy link
Owner

Novum commented Apr 21, 2018

I do not own Apple hardware and I have no intention to buy any.

@oscarbg
Copy link
Author

oscarbg commented Apr 23, 2018

no problem now it's working!!
only some minor issues changing screen res but also not your problem
captura de pantalla 2018-04-23 a las 4 32 27

@oscarbg oscarbg closed this as completed Apr 23, 2018
@Novum
Copy link
Owner

Novum commented Apr 23, 2018

Glad that it works for you

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

No branches or pull requests

2 participants