
When gl_renderer_attach is called, surface->buffer_ref.buffer points to the buffer. So if the surface state needs to be created, we have : gl_renderer_attach -> get_surface_state -> gl_renderer_create_surface -> gl_renderer_attach Fixes: 895b1fdcb2 ("gl-renderer: Attach buffer during surface state creation if possible") Signed-off-by: Loïc Yhuel <loic.yhuel@softathome.com>