mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-29 11:06:07 +00:00
renderer_vulkan: another fix for vertex buffer offsets
This commit is contained in:
parent
71dda8c776
commit
c2dc7c3fd4
|
@ -429,8 +429,10 @@ void GraphicsPipeline::BindVertexBuffers(StreamBuffer& staging) const {
|
|||
for (u32 i = 0; i < num_buffers; ++i) {
|
||||
const auto& buffer = guest_buffers[i];
|
||||
const auto& host_buffer = std::ranges::find_if(
|
||||
ranges_merged.cbegin(), ranges_merged.cend(),
|
||||
[&](const BufferRange& range) { return (buffer.base_address >= range.base_address); });
|
||||
ranges_merged.cbegin(), ranges_merged.cend(), [&](const BufferRange& range) {
|
||||
return (buffer.base_address >= range.base_address &&
|
||||
buffer.base_address < range.end_address);
|
||||
});
|
||||
assert(host_buffer != ranges_merged.cend());
|
||||
|
||||
host_buffers[i] = staging.Handle();
|
||||
|
|
|
@ -232,8 +232,7 @@ void StreamBuffer::WaitPendingOperations(u64 requested_upper_bound) {
|
|||
}
|
||||
|
||||
u64 StreamBuffer::Copy(VAddr src, size_t size, size_t alignment /*= 0*/) {
|
||||
static const u64 MinUniformAlignment = instance.UniformMinAlignment();
|
||||
const auto [data, offset, _] = Map(size, MinUniformAlignment);
|
||||
const auto [data, offset, _] = Map(size, alignment);
|
||||
std::memcpy(data, reinterpret_cast<const void*>(src), size);
|
||||
Commit(size);
|
||||
return offset;
|
||||
|
|
Loading…
Reference in a new issue