mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-23 22:58:33 +02:00
r600g: Added r600_pipe_shader_destroy().
Not yet complete. Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
9612b482e2
commit
ccb9be1056
3 changed files with 16 additions and 2 deletions
|
|
@ -208,6 +208,7 @@ void r600_init_context_resource_functions(struct r600_pipe_context *r600);
|
|||
/* r600_shader.c */
|
||||
int r600_pipe_shader_update(struct pipe_context *ctx, struct r600_pipe_shader *shader);
|
||||
int r600_pipe_shader_create(struct pipe_context *ctx, struct r600_pipe_shader *shader, const struct tgsi_token *tokens);
|
||||
void r600_pipe_shader_destroy(struct pipe_context *ctx, struct r600_pipe_shader *shader);
|
||||
int r600_find_vs_semantic_index(struct r600_shader *vs,
|
||||
struct r600_shader *ps, int id);
|
||||
|
||||
|
|
|
|||
|
|
@ -338,6 +338,17 @@ int r600_pipe_shader_create(struct pipe_context *ctx, struct r600_pipe_shader *s
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
r600_pipe_shader_destroy(struct pipe_context *ctx, struct r600_pipe_shader *shader)
|
||||
{
|
||||
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
|
||||
struct r600_bc_cf *cf, *next_cf;
|
||||
|
||||
r600_bo_reference(rctx->radeon, &shader->bo, NULL);
|
||||
|
||||
/* FIXME: is there more stuff to free? */
|
||||
}
|
||||
|
||||
/*
|
||||
* tgsi -> r600 shader
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1095,7 +1095,8 @@ static void r600_delete_ps_shader(struct pipe_context *ctx, void *state)
|
|||
if (rctx->ps_shader == shader) {
|
||||
rctx->ps_shader = NULL;
|
||||
}
|
||||
/* TODO proper delete */
|
||||
|
||||
r600_pipe_shader_destroy(ctx, shader);
|
||||
free(shader);
|
||||
}
|
||||
|
||||
|
|
@ -1107,7 +1108,8 @@ static void r600_delete_vs_shader(struct pipe_context *ctx, void *state)
|
|||
if (rctx->vs_shader == shader) {
|
||||
rctx->vs_shader = NULL;
|
||||
}
|
||||
/* TODO proper delete */
|
||||
|
||||
r600_pipe_shader_destroy(ctx, shader);
|
||||
free(shader);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue