X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Frbug%2Frbug_objects.c;h=c64b14c183287279b8937d018a6d9b29342a7a9e;hb=2b9ed257c0c4db879970afb2c5981c59ca70c21b;hp=7d7cc482ae68b92020116bc10dc82e4e3ad6f038;hpb=9032d2a13ecd019206a48767d9205c0aafa7cca2;p=mesa.git diff --git a/src/gallium/drivers/rbug/rbug_objects.c b/src/gallium/drivers/rbug/rbug_objects.c index 7d7cc482ae6..c64b14c1832 100644 --- a/src/gallium/drivers/rbug/rbug_objects.c +++ b/src/gallium/drivers/rbug/rbug_objects.c @@ -98,8 +98,9 @@ rbug_surface_create(struct rbug_context *rb_context, pipe_reference_init(&rb_surface->base.reference, 1); rb_surface->base.texture = NULL; + rb_surface->base.context = &rb_context->base; + rb_surface->surface = surface; /* we own the surface already */ pipe_resource_reference(&rb_surface->base.texture, &rb_resource->base); - rb_surface->surface = surface; return &rb_surface->base; @@ -113,8 +114,7 @@ rbug_surface_destroy(struct rbug_context *rb_context, struct rbug_surface *rb_surface) { pipe_resource_reference(&rb_surface->base.texture, NULL); - rb_context->pipe->surface_destroy(rb_context->pipe, - rb_surface->surface); + pipe_surface_reference(&rb_surface->surface, NULL); FREE(rb_surface); } @@ -184,7 +184,7 @@ rbug_transfer_create(struct rbug_context *rb_context, return &rb_transfer->base; error: - rb_context->pipe->transfer_destroy(rb_context->pipe, transfer); + rb_context->pipe->transfer_unmap(rb_context->pipe, transfer); return NULL; } @@ -193,8 +193,6 @@ rbug_transfer_destroy(struct rbug_context *rb_context, struct rbug_transfer *rb_transfer) { pipe_resource_reference(&rb_transfer->base.resource, NULL); - rb_transfer->pipe->transfer_destroy(rb_context->pipe, - rb_transfer->transfer); FREE(rb_transfer); }