static void r600_destroy_context(struct pipe_context *context) { struct r600_context *rctx = (struct r600_context *)context; unsigned sh; r600_isa_destroy(rctx->isa); r600_sb_context_destroy(rctx->sb_context); r600_resource_reference(&rctx->dummy_cmask, NULL); r600_resource_reference(&rctx->dummy_fmask, NULL); for (sh = 0; sh < PIPE_SHADER_TYPES; sh++) { rctx->b.b.set_constant_buffer(&rctx->b.b, sh, R600_BUFFER_INFO_CONST_BUFFER, NULL); free(rctx->driver_consts[sh].constants); } if (rctx->fixed_func_tcs_shader) rctx->b.b.delete_tcs_state(&rctx->b.b, rctx->fixed_func_tcs_shader); if (rctx->dummy_pixel_shader) { rctx->b.b.delete_fs_state(&rctx->b.b, rctx->dummy_pixel_shader); } if (rctx->custom_dsa_flush) { rctx->b.b.delete_depth_stencil_alpha_state(&rctx->b.b, rctx->custom_dsa_flush); } if (rctx->custom_blend_resolve) { rctx->b.b.delete_blend_state(&rctx->b.b, rctx->custom_blend_resolve); } if (rctx->custom_blend_decompress) { rctx->b.b.delete_blend_state(&rctx->b.b, rctx->custom_blend_decompress); } if (rctx->custom_blend_fastclear) { rctx->b.b.delete_blend_state(&rctx->b.b, rctx->custom_blend_fastclear); } util_unreference_framebuffer_state(&rctx->framebuffer.state); if (rctx->blitter) { util_blitter_destroy(rctx->blitter); } if (rctx->allocator_fetch_shader) { u_suballocator_destroy(rctx->allocator_fetch_shader); } r600_release_command_buffer(&rctx->start_cs_cmd); FREE(rctx->start_compute_cs_cmd.buf); r600_common_context_cleanup(&rctx->b); r600_resource_reference(&rctx->trace_buf, NULL); r600_resource_reference(&rctx->last_trace_buf, NULL); radeon_clear_saved_cs(&rctx->last_gfx); FREE(rctx); }
static void r600_destroy_context(struct pipe_context *context) { struct r600_context *rctx = (struct r600_context *)context; r600_isa_destroy(rctx->isa); r600_sb_context_destroy(rctx->sb_context); pipe_resource_reference((struct pipe_resource**)&rctx->dummy_cmask, NULL); pipe_resource_reference((struct pipe_resource**)&rctx->dummy_fmask, NULL); if (rctx->fixed_func_tcs_shader) rctx->b.b.delete_tcs_state(&rctx->b.b, rctx->fixed_func_tcs_shader); if (rctx->dummy_pixel_shader) { rctx->b.b.delete_fs_state(&rctx->b.b, rctx->dummy_pixel_shader); } if (rctx->custom_dsa_flush) { rctx->b.b.delete_depth_stencil_alpha_state(&rctx->b.b, rctx->custom_dsa_flush); } if (rctx->custom_blend_resolve) { rctx->b.b.delete_blend_state(&rctx->b.b, rctx->custom_blend_resolve); } if (rctx->custom_blend_decompress) { rctx->b.b.delete_blend_state(&rctx->b.b, rctx->custom_blend_decompress); } if (rctx->custom_blend_fastclear) { rctx->b.b.delete_blend_state(&rctx->b.b, rctx->custom_blend_fastclear); } util_unreference_framebuffer_state(&rctx->framebuffer.state); if (rctx->blitter) { util_blitter_destroy(rctx->blitter); } if (rctx->allocator_fetch_shader) { u_suballocator_destroy(rctx->allocator_fetch_shader); } r600_release_command_buffer(&rctx->start_cs_cmd); FREE(rctx->start_compute_cs_cmd.buf); r600_common_context_cleanup(&rctx->b); FREE(rctx); }