[gtk/wip/chergert/glproto] always allocate some space
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto] always allocate some space
- Date: Sat, 26 Dec 2020 19:19:43 +0000 (UTC)
commit 0b703b9c1636741e2790aa77e9fddfa33e716986
Author: Christian Hergert <chergert redhat com>
Date: Sat Dec 26 11:18:15 2020 -0800
always allocate some space
gsk/next/gskgluniformstate.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gsk/next/gskgluniformstate.c b/gsk/next/gskgluniformstate.c
index 0176df3a52..da16550065 100644
--- a/gsk/next/gskgluniformstate.c
+++ b/gsk/next/gskgluniformstate.c
@@ -214,7 +214,9 @@ setup_info:
if (location >= program_info->uniform_info->len)
g_array_set_size (program_info->uniform_info, location + 1);
- alloc_uniform_data (state->uniform_data, uniform_sizes[format] * array_count, &offset);
+ alloc_uniform_data (state->uniform_data,
+ uniform_sizes[format] * MAX (1, array_count),
+ &offset);
info = &g_array_index (program_info->uniform_info, GskGLUniformInfo, location);
info->changed = TRUE;
@@ -735,7 +737,7 @@ gsk_gl_uniform_state_end_frame (GskGLUniformState *state)
for (guint j = 0; j < program_info->uniform_info->len; j++)
{
GskGLUniformInfo *info = &g_array_index (program_info->uniform_info, GskGLUniformInfo, j);
- guint size = uniform_sizes[info->format] * info->array_count;
+ guint size = uniform_sizes[info->format] * MAX (1, info->array_count);
guint offset;
alloc_uniform_data (buffer, size, &offset);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]