mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 17:35:29 +03:00
Implement Host Vertex Buffer Translation
Uses the buffer cache to retrieve an equivalent host vertex buffer for a corresponding guest vertex buffer.
This commit is contained in:
parent
b6ba770a27
commit
8989305637
@ -1060,6 +1060,22 @@ namespace skyline::gpu::interconnect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BufferView *GetVertexBuffer(size_t index) {
|
||||||
|
auto &vertexBuffer{vertexBuffers.at(index)};
|
||||||
|
if (vertexBuffer.disabled || vertexBuffer.start > vertexBuffer.end)
|
||||||
|
return nullptr;
|
||||||
|
else if (vertexBuffer.view)
|
||||||
|
return &*vertexBuffer.view;
|
||||||
|
|
||||||
|
if (vertexBuffer.guest.mappings.empty()) {
|
||||||
|
auto mappings{channelCtx.asCtx->gmmu.TranslateRange(vertexBuffer.start, (vertexBuffer.end + 1) - vertexBuffer.start)};
|
||||||
|
vertexBuffer.guest.mappings.assign(mappings.begin(), mappings.end());
|
||||||
|
}
|
||||||
|
|
||||||
|
vertexBuffer.view = gpu.buffer.FindOrCreate(vertexBuffer.guest);
|
||||||
|
return vertexBuffer.view.get();
|
||||||
|
}
|
||||||
|
|
||||||
/* Input Assembly */
|
/* Input Assembly */
|
||||||
private:
|
private:
|
||||||
vk::PipelineInputAssemblyStateCreateInfo inputAssemblyState{};
|
vk::PipelineInputAssemblyStateCreateInfo inputAssemblyState{};
|
||||||
|
Loading…
Reference in New Issue
Block a user