Disable Vertex Buffers With 0 as IOVAs

A buffer with 0 as the start/end IOVA should be invalid as there shouldn't be any mappings at 0 in GPU VA, titles such as Puyo Puyo Tetris configure the Vertex Buffer with 0 IOVAs which leads to a segmentation fault without this exception.
This commit is contained in:
PixelyIon 2021-12-08 14:17:15 +05:30
parent cfeb8098db
commit 189b9533f2

View File

@ -1195,7 +1195,7 @@ namespace skyline::gpu::interconnect {
BufferView *GetVertexBuffer(size_t index) { BufferView *GetVertexBuffer(size_t index) {
auto &vertexBuffer{vertexBuffers.at(index)}; auto &vertexBuffer{vertexBuffers.at(index)};
if (vertexBuffer.disabled || vertexBuffer.start > vertexBuffer.end) if (vertexBuffer.disabled || vertexBuffer.start > vertexBuffer.end || vertexBuffer.start == 0 || vertexBuffer.end == 0)
return nullptr; return nullptr;
else if (vertexBuffer.view) else if (vertexBuffer.view)
return &*vertexBuffer.view; return &*vertexBuffer.view;