mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-29 17:26:25 +02:00
Vulkan: Use compute shader for non-indirect unsupported topology index buffer conversions
See merge request ryubing/ryujinx!5
This commit is contained in:
parent
0652d7e740
commit
04561a0cd3
2 changed files with 27 additions and 61 deletions
|
@ -47,28 +47,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
return primitiveCount * OffsetIndex.Length;
|
||||
}
|
||||
|
||||
public IEnumerable<int> GetIndexMapping(int indexCount)
|
||||
{
|
||||
int primitiveCount = GetPrimitiveCount(indexCount);
|
||||
int index = BaseIndex;
|
||||
|
||||
for (int i = 0; i < primitiveCount; i++)
|
||||
{
|
||||
if (RepeatStart)
|
||||
{
|
||||
// Used for triangle fan
|
||||
yield return 0;
|
||||
}
|
||||
|
||||
for (int j = RepeatStart ? 1 : 0; j < OffsetIndex.Length; j++)
|
||||
{
|
||||
yield return index + OffsetIndex[j];
|
||||
}
|
||||
|
||||
index += IndexStride;
|
||||
}
|
||||
}
|
||||
|
||||
public BufferHandle GetRepeatingBuffer(int vertexCount, out int indexCount)
|
||||
{
|
||||
int primitiveCount = GetPrimitiveCount(vertexCount);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue