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

VkPrimitiveTopology value 5 is not supported #1799

Closed
M1Minecraft opened this issue Dec 18, 2022 · 7 comments · Fixed by #1962
Closed

VkPrimitiveTopology value 5 is not supported #1799

M1Minecraft opened this issue Dec 18, 2022 · 7 comments · Fixed by #1962
Labels
Completed Issue has been fixed, or enhancement implemented. Information

Comments

@M1Minecraft
Copy link

I'm trying to launch a game but I get a bunch of lines in the log stating that VkPrimitiveTopology value 5 is not supported and Metal does not support triangle fans. Is there any possible way to implement this into moltenVK?

FullLog.txt

@M1Minecraft
Copy link
Author

I think somone found a fix here: #81

@rcaridade145
Copy link

RPCS3 the PS3 emulator "implemented" this a while back https://github.com/RPCS3/rpcs3/search?q=triangle+fans&type=commits

@billhollings
Copy link
Contributor

Since the app is free to submit vertices and indices at any time, and MoltenVK would have no knowledge of whether the vertices had been massaged from fan to strip yet, to do this in MoltenVK, it would be best to massage the vertices or indexes using a compute shader that copied from one buffer to another before each triangle fan draw call, and then substitute the strip buffer in just before the actual Metal draw call.

At a minimum, this would involved breaking out of the Metal renderpass to run the compute shader. We do that for tessellation right now, so we have precedence for it, but it is something to consider from a structural and performance perspective.

Are triangle fans a must-have because some games that can't be modified at the source are using them?

@rcaridade145
Copy link

Afaik this was deprecated on D3D10+ . So we're talking about a subset of old games mainly. Emulators again afaik have implemented workarounds.
If it is an opensource game that should be taken upstream. @M1Minecraft what was the game?

@billhollings billhollings added Question Answered A question was answered Information and removed Question Answered A question was answered labels Dec 28, 2022
@billhollings
Copy link
Contributor

Afaik this was deprecated on D3D10+ .

Yup. Looks like it. Thanks for pointing this out.

@IsaacMarovitz
Copy link

IsaacMarovitz commented Apr 9, 2023

Afaik this was deprecated on D3D10+ .

Yup. Looks like it. Thanks for pointing this out.

No Man's Sky uses triangle fans in its UI:

Triangle Fans rendered as Points:
Screenshot 2023-04-09 at 18 06 53

Rendered as Triangles:
image

Rendered as Triangle Strips:
image

@billhollings billhollings added the Completed Issue has been fixed, or enhancement implemented. label Jun 28, 2023
@billhollings
Copy link
Contributor

PR # #1962 implements triangle fans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Completed Issue has been fixed, or enhancement implemented. Information
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants