diff options
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_fbo.c | 12 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_flush.c | 1 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_extensions.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_manager.c | 4 |
4 files changed, 12 insertions, 7 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.c b/mesalib/src/mesa/state_tracker/st_cb_fbo.c index adee00bd2..04907c9f7 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_fbo.c +++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.c @@ -225,14 +225,16 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx, * gl_renderbuffer::Delete() */ static void -st_renderbuffer_delete(struct gl_renderbuffer *rb) +st_renderbuffer_delete(struct gl_context *ctx, struct gl_renderbuffer *rb) { struct st_renderbuffer *strb = st_renderbuffer(rb); - ASSERT(strb); - pipe_surface_reference(&strb->surface, NULL); + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; + + pipe_surface_release(pipe, &strb->surface); pipe_resource_reference(&strb->texture, NULL); free(strb->data); - _mesa_delete_renderbuffer(rb); + _mesa_delete_renderbuffer(ctx, rb); } @@ -434,7 +436,7 @@ st_render_texture(struct gl_context *ctx, pipe_resource_reference( &strb->texture, pt ); - pipe_surface_reference(&strb->surface, NULL); + pipe_surface_release(pipe, &strb->surface); assert(strb->rtt_level <= strb->texture->last_level); diff --git a/mesalib/src/mesa/state_tracker/st_cb_flush.c b/mesalib/src/mesa/state_tracker/st_cb_flush.c index b4372ae7c..7c9f91f1b 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_flush.c +++ b/mesalib/src/mesa/state_tracker/st_cb_flush.c @@ -79,6 +79,7 @@ display_front_buffer(struct st_context *st) void st_flush( struct st_context *st, struct pipe_fence_handle **fence ) { + FLUSH_VERTICES(st->ctx, 0); FLUSH_CURRENT(st->ctx, 0); st_flush_bitmap_cache(st); diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c index 7570d6894..62a736bb6 100644 --- a/mesalib/src/mesa/state_tracker/st_extensions.c +++ b/mesalib/src/mesa/state_tracker/st_extensions.c @@ -527,7 +527,7 @@ void st_init_extensions(struct st_context *st) ctx->Extensions.NV_texture_rectangle = GL_TRUE; ctx->Extensions.OES_EGL_image = GL_TRUE; - if (ctx->API != API_OPENGL) + if (ctx->API != API_OPENGL_COMPAT) ctx->Extensions.OES_EGL_image_external = GL_TRUE; ctx->Extensions.OES_draw_texture = GL_TRUE; diff --git a/mesalib/src/mesa/state_tracker/st_manager.c b/mesalib/src/mesa/state_tracker/st_manager.c index 5576a0d6c..0b9add95e 100644 --- a/mesalib/src/mesa/state_tracker/st_manager.c +++ b/mesalib/src/mesa/state_tracker/st_manager.c @@ -615,7 +615,7 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, switch (attribs->profile) { case ST_PROFILE_DEFAULT: - api = API_OPENGL; + api = API_OPENGL_COMPAT; break; case ST_PROFILE_OPENGL_ES1: api = API_OPENGLES; @@ -673,6 +673,8 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, st->iface.copy = st_context_copy; st->iface.share = st_context_share; st->iface.st_context_private = (void *) smapi; + st->iface.cso_context = st->cso_context; + st->iface.pipe = st->pipe; *error = ST_CONTEXT_SUCCESS; return &st->iface; |