Skip to content
Snippets Groups Projects
Commit 47dc5e0d authored by Subv's avatar Subv
Browse files

Rasterizer: Flush the written region when writing shader uniform data before...

Rasterizer: Flush the written region when writing shader uniform data before copying it to the uniform buffers.

This fixes the flip_viewport uniform having invalid values when drawing.
parent 5aff2d38
No related branches found
No related tags found
No related merge requests found
......@@ -218,6 +218,9 @@ void RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) {
ubo.SetFromRegs(gpu.state.shader_stages[stage]);
std::memcpy(buffer_ptr, &ubo, sizeof(ubo));
// Flush the buffer so that the GPU can see the data we just wrote.
glFlushMappedBufferRange(GL_ARRAY_BUFFER, buffer_offset, sizeof(ubo));
// Upload uniform data as one UBO per stage
const GLintptr ubo_offset = buffer_offset;
copy_buffer(uniform_buffers[stage].handle, ubo_offset,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment