diff options
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_program.c')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_program.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c index c8b708c02b4..c141a91eec2 100644 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@ -677,6 +677,9 @@ out: void nv50_program_destroy(struct nv50_context *nv50, struct nv50_program *p) { + const struct pipe_shader_state pipe = p->pipe; + const ubyte type = p->type; + if (p->res) nouveau_resource_free(&p->res); @@ -686,5 +689,8 @@ nv50_program_destroy(struct nv50_context *nv50, struct nv50_program *p) if (p->fixups) FREE(p->fixups); - p->translated = FALSE; + memset(p, 0, sizeof(*p)); + + p->pipe = pipe; + p->type = type; } |