Merge branch 'gl-renderer-more-defensive' into 'main'

gsk: Stop setting uniforms when we are out of batches

See merge request GNOME/gtk!5981
This commit is contained in:
Matthias Clasen 2023-05-17 00:29:40 +00:00
commit 2ec1bd7248
3 changed files with 962 additions and 886 deletions

View File

@ -579,7 +579,7 @@ discard_batch (GskGLCommandQueue *self)
self->batches.len--;
}
void
gboolean
gsk_gl_command_queue_begin_draw (GskGLCommandQueue *self,
GskGLUniformProgram *program,
guint width,
@ -596,7 +596,7 @@ gsk_gl_command_queue_begin_draw (GskGLCommandQueue *self,
* of batches we can have in one frame.
*/
if (will_ignore_batch (self))
return;
return FALSE;
self->program_info = program;
@ -617,6 +617,8 @@ gsk_gl_command_queue_begin_draw (GskGLCommandQueue *self,
self->fbo_max = MAX (self->fbo_max, batch->draw.framebuffer);
self->in_draw = TRUE;
return TRUE;
}
void

View File

@ -331,7 +331,7 @@ void gsk_gl_command_queue_delete_program (GskGLCommandQueue
void gsk_gl_command_queue_clear (GskGLCommandQueue *self,
guint clear_bits,
const graphene_rect_t *viewport);
void gsk_gl_command_queue_begin_draw (GskGLCommandQueue *self,
gboolean gsk_gl_command_queue_begin_draw (GskGLCommandQueue *self,
GskGLUniformProgram *program_info,
guint width,
guint height);

File diff suppressed because it is too large Load Diff