void u_vbuf_destroy(struct u_vbuf *mgr) { struct pipe_screen *screen = mgr->pipe->screen; unsigned i; unsigned num_vb = screen->get_shader_param(screen, PIPE_SHADER_VERTEX, PIPE_SHADER_CAP_MAX_INPUTS); mgr->pipe->set_index_buffer(mgr->pipe, NULL); pipe_resource_reference(&mgr->index_buffer.buffer, NULL); mgr->pipe->set_vertex_buffers(mgr->pipe, 0, num_vb, NULL); for (i = 0; i < PIPE_MAX_ATTRIBS; i++) { pipe_resource_reference(&mgr->vertex_buffer[i].buffer, NULL); } for (i = 0; i < PIPE_MAX_ATTRIBS; i++) { pipe_resource_reference(&mgr->real_vertex_buffer[i].buffer, NULL); } pipe_resource_reference(&mgr->aux_vertex_buffer_saved.buffer, NULL); translate_cache_destroy(mgr->translate_cache); u_upload_destroy(mgr->uploader); cso_cache_delete(mgr->cso_cache); FREE(mgr); }
void draw_pt_fetch_destroy( struct pt_fetch *fetch ) { if (fetch->cache) translate_cache_destroy(fetch->cache); FREE(fetch); }
void draw_pt_emit_destroy( struct pt_emit *emit ) { if (emit->cache) translate_cache_destroy(emit->cache); FREE(emit); }
static void fetch_emit_destroy( struct draw_pt_middle_end *middle ) { struct fetch_emit_middle_end *feme = (struct fetch_emit_middle_end *)middle; if (feme->cache) translate_cache_destroy(feme->cache); FREE(middle); }
static void vbuf_destroy( struct draw_stage *stage ) { struct vbuf_stage *vbuf = vbuf_stage( stage ); if(vbuf->indices) align_free( vbuf->indices ); if (vbuf->render) vbuf->render->destroy( vbuf->render ); if (vbuf->cache) translate_cache_destroy(vbuf->cache); FREE( stage ); }
void u_vbuf_destroy(struct u_vbuf *mgrb) { struct u_vbuf_priv *mgr = (struct u_vbuf_priv*)mgrb; unsigned i; for (i = 0; i < mgr->b.nr_vertex_buffers; i++) { pipe_resource_reference(&mgr->b.vertex_buffer[i].buffer, NULL); } for (i = 0; i < mgr->b.nr_real_vertex_buffers; i++) { pipe_resource_reference(&mgr->b.real_vertex_buffer[i].buffer, NULL); } translate_cache_destroy(mgr->translate_cache); u_upload_destroy(mgr->b.uploader); FREE(mgr); }
void u_vbuf_destroy(struct u_vbuf *mgr) { unsigned i; mgr->pipe->set_vertex_buffers(mgr->pipe, 0, NULL); for (i = 0; i < mgr->nr_vertex_buffers; i++) { pipe_resource_reference(&mgr->vertex_buffer[i].buffer, NULL); } for (i = 0; i < mgr->nr_real_vertex_buffers; i++) { pipe_resource_reference(&mgr->real_vertex_buffer[i].buffer, NULL); } translate_cache_destroy(mgr->translate_cache); u_upload_destroy(mgr->uploader); cso_cache_delete(mgr->cso_cache); FREE(mgr); }