Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Use triangle lists instead of triangle fans #1

Merged
merged 1 commit into from
Jul 10, 2021
Merged

Use triangle lists instead of triangle fans #1

merged 1 commit into from
Jul 10, 2021

Conversation

fzwoch
Copy link

@fzwoch fzwoch commented Jul 10, 2021

To whom this may be useful. This change does allow to run this under moltenVK. moltenVK does not support the use of VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN so we just convert these primitives to VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST.

I guess a more optimized way is possible, but it does the job for me at the moment. Ideally the VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN path will remain intact and VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST is only used when the Vulkan implementation indicates via VK_KHR_portability_subset that VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN must not be used.

@danilw
Copy link
Owner

danilw commented Jul 10, 2021

oh wow thanks for making it!
il check it now

@danilw
Copy link
Owner

danilw commented Jul 10, 2021

Works I add it, thank you for making it!

Ideally the VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN path will remain intact and VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST is only used when the Vulkan implementation indicates via VK_KHR_portability_subset that VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN must not be used.

il add #define USE_TOPOLOGY_TRIANGLE_FAN to switch to FAN, by default will be used LIST

@danilw danilw merged commit bf69b39 into danilw:master Jul 10, 2021
@fzwoch fzwoch deleted the portability_subset branch July 10, 2021 15:42
danilw added a commit that referenced this pull request Jul 10, 2021
@danilw
Copy link
Owner

danilw commented Jul 10, 2021

done, also changed loop in loop index name from i to j (line 1479)

f25bae1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants