vrend: Bind framebuffer when creating context

This make sure we have a valid framebuffer in current context.
Some GPU driver like MALI is buggy and will crash on glEndQuery with targets
like GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN if no valid framebuffer in
current context.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Lepton Wu 4 years ago
parent c76f046f05
commit c488abed8d
  1. 1
      src/vrend_renderer.c

@ -10309,6 +10309,7 @@ void vrend_renderer_create_sub_ctx(struct vrend_context *ctx, int sub_ctx_id)
}
glGenFramebuffers(1, &sub->fb_id);
glBindFramebuffer(GL_FRAMEBUFFER, sub->fb_id);
glGenFramebuffers(2, sub->blit_fb_ids);
list_inithead(&sub->programs);

Loading…
Cancel
Save