projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r600g: don't leak driver const buffers
[mesa.git]
/
src
/
gallium
/
drivers
/
r600
/
r600_pipe.c
diff --git
a/src/gallium/drivers/r600/r600_pipe.c
b/src/gallium/drivers/r600/r600_pipe.c
index 08fdd361049d73501747b246049d08172adabd93..8abd60231f9ae2f63f4b0dee5f3b2072a81b1293 100644
(file)
--- a/
src/gallium/drivers/r600/r600_pipe.c
+++ b/
src/gallium/drivers/r600/r600_pipe.c
@@
-68,6
+68,7
@@
static const struct debug_named_value r600_debug_options[] = {
static void r600_destroy_context(struct pipe_context *context)
{
struct r600_context *rctx = (struct r600_context *)context;
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_isa_destroy(rctx->isa);
@@
-76,6
+77,11
@@
static void r600_destroy_context(struct pipe_context *context)
pipe_resource_reference((struct pipe_resource**)&rctx->dummy_cmask, NULL);
pipe_resource_reference((struct pipe_resource**)&rctx->dummy_fmask, NULL);
pipe_resource_reference((struct pipe_resource**)&rctx->dummy_cmask, NULL);
pipe_resource_reference((struct pipe_resource**)&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->fixed_func_tcs_shader)
rctx->b.b.delete_tcs_state(&rctx->b.b, rctx->fixed_func_tcs_shader);