mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 07:46:01 +03:00
[PR #1798] [MERGED] renderer_vulkan: add support for Polygon draws #2313
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#2313
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/1798
Author: @polybiusproxy
Created: 12/15/2024
Status: ✅ Merged
Merged: 12/21/2024
Merged by: @polybiusproxy
Base:
main← Head:poly-idx📝 Commits (1)
7f1913drenderer_vulkan: add support for Polygon draws📊 Changes
4 files changed (+43 additions, -10 deletions)
View changed files
📝
src/video_core/buffer_cache/buffer_cache.cpp(+29 -7)📝
src/video_core/renderer_vulkan/liverpool_to_vk.cpp(+1 -0)📝
src/video_core/renderer_vulkan/liverpool_to_vk.h(+9 -0)📝
src/video_core/renderer_vulkan/vk_rasterizer.cpp(+4 -3)📄 Description
The Polygon primitive type works by having a specified *N* amount of vertices and having the GPU figure out how to fill said primitive—this primitive type is obsolete by now so modern rendering APIs do not support this primitive.
To emulate this, we can use the same approach for quad lists; generate an index buffer on the CPU and draw as triangle lists. Specifically for polygons, we can triangulate these by anchoring the first vertex of the polygon and connecting it with the current and next vertices.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.