mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-24 20:36:24 -05:00
GPU: Don't use GetPointer when uploading the constbuffer data to the GPU.
This commit is contained in:
parent
7da47da66e
commit
e128e90350
1 changed files with 4 additions and 3 deletions
|
@ -571,10 +571,11 @@ void RasterizerOpenGL::SetupConstBuffers(Maxwell::ShaderStage stage,
|
||||||
buffer_draw_state.bindpoint = bindpoint;
|
buffer_draw_state.bindpoint = bindpoint;
|
||||||
|
|
||||||
VAddr addr = gpu.memory_manager->PhysicalToVirtualAddress(buffer.address);
|
VAddr addr = gpu.memory_manager->PhysicalToVirtualAddress(buffer.address);
|
||||||
const u8* data = Memory::GetPointer(addr);
|
std::vector<u8> data(used_buffer.GetSize() * sizeof(float));
|
||||||
|
Memory::ReadBlock(addr, data.data(), data.size());
|
||||||
|
|
||||||
glBindBuffer(GL_SHADER_STORAGE_BUFFER, buffer_draw_state.ssbo);
|
glBindBuffer(GL_SHADER_STORAGE_BUFFER, buffer_draw_state.ssbo);
|
||||||
glBufferData(GL_SHADER_STORAGE_BUFFER, used_buffer.GetSize() * sizeof(float), data,
|
glBufferData(GL_SHADER_STORAGE_BUFFER, data.size(), data.data(), GL_DYNAMIC_DRAW);
|
||||||
GL_DYNAMIC_DRAW);
|
|
||||||
glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0);
|
glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue