diff options
author | Lauri Kasanen <[email protected]> | 2012-01-24 21:37:07 +0200 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2012-02-02 16:42:06 -0500 |
commit | c5976017e31828dd67fb54e8c11b863fffcac70b (patch) | |
tree | b48166e7a8a84c0fa5d904ae31fed0a7c6d38e3c /src/gallium/auxiliary/postprocess/pp_init.c | |
parent | cd2e2187cb45accb13bf89ef297324332c46f379 (diff) |
gallium/postprocess: Fix depth logic
This prevents a possible lapse of the depth buffer - the situation where
the app and pp have different depth buffers.
NOTE: This is a candidate for the 8.0 stable branch.
Signed-off-by: Lauri Kasanen <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/postprocess/pp_init.c')
-rw-r--r-- | src/gallium/auxiliary/postprocess/pp_init.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/postprocess/pp_init.c b/src/gallium/auxiliary/postprocess/pp_init.c index 740d230a1e8..e2068c25e5b 100644 --- a/src/gallium/auxiliary/postprocess/pp_init.c +++ b/src/gallium/auxiliary/postprocess/pp_init.c @@ -135,7 +135,6 @@ pp_free_fbos(struct pp_queue_t *ppq) pipe_surface_reference(&ppq->inner_tmps[i], NULL); pipe_resource_reference(&ppq->inner_tmp[i], NULL); } - pipe_resource_reference(&ppq->depth, NULL); pipe_surface_reference(&ppq->stencils, NULL); pipe_resource_reference(&ppq->stencil, NULL); @@ -196,7 +195,7 @@ pp_debug(const char *fmt, ...) /** Allocate the temp FBOs. Called on makecurrent and resize. */ void pp_init_fbos(struct pp_queue_t *ppq, unsigned int w, - unsigned int h, struct pipe_resource *indepth) + unsigned int h) { struct program *p = ppq->p; /* The lazy will inherit the earth */ @@ -243,11 +242,7 @@ pp_init_fbos(struct pp_queue_t *ppq, unsigned int w, goto error; } - tmp_res.format = p->surf.format = indepth->format; tmp_res.bind = p->surf.usage = PIPE_BIND_DEPTH_STENCIL; - pipe_resource_reference(&ppq->depth, indepth); - if (!ppq->depth) - goto error; tmp_res.format = p->surf.format = PIPE_FORMAT_S8_UINT_Z24_UNORM; |