opengl: fix unmap size for globals buffer

Globals data is mapped based on a device alignment.
This commit is contained in:
Arjan Molenaar 2025-01-02 21:52:04 +01:00
parent 2753e0f828
commit fee5f971a7

View File

@ -753,7 +753,9 @@ gsk_gpu_frame_submit (GskGpuFrame *self,
if (priv->globals_buffer)
{
gsk_gpu_buffer_unmap (priv->globals_buffer, sizeof (GskGpuGlobalsInstance) * priv->n_globals);
gsize globals_size = gsk_gpu_device_get_globals_aligned_size (gsk_gpu_frame_get_device (self));
gsk_gpu_buffer_unmap (priv->globals_buffer, globals_size * priv->n_globals);
priv->globals_buffer_data = NULL;
}