From 34164ce622d7fd08c03385a9522edfd1df99c8b1 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 7 Apr 2018 06:16:51 -0700 Subject: [PATCH] iris: isv freeing fixes --- src/gallium/drivers/iris/iris_state.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 4b400eee01f..7b4b66bd7cf 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -273,16 +273,10 @@ translate_fill_mode(unsigned pipe_polymode) return map[pipe_polymode]; } -static struct iris_address -bo_addr(struct iris_bo *bo) -{ - return (struct iris_address) { .offset = bo->gtt_offset }; -} - - static struct iris_address ro_bo(struct iris_bo *bo, uint64_t offset) { + /* Not for CSOs! */ return (struct iris_address) { .bo = bo, .offset = offset }; } @@ -1310,8 +1304,10 @@ static void iris_sampler_view_destroy(struct pipe_context *ctx, struct pipe_sampler_view *state) { + struct iris_surface *isv = (void *) state; pipe_resource_reference(&state->texture, NULL); - free(state); + pipe_resource_reference(&isv->surface_state_resource, NULL); + free(isv); } -- 2.30.2