gsk: Stop setting uniforms when we are out of batches
When the command queue is out of batches, there is no point in doing further work like allocating uniforms. This helps us avoid assertions in the uniform code that we would hit when we run out of uniform space too.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user