diff options
author | Eric Anholt <[email protected]> | 2018-04-24 17:50:50 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-04-25 09:21:54 -0700 |
commit | 0d4ce00d700631cce26c62b865b4013ef45572e7 (patch) | |
tree | 5175911c1412c473a84cf78ec11203422ac18b1a /src/gallium/drivers | |
parent | 9f3f4284c0397615bfe50ba4e50aaffe5dc64e84 (diff) |
broadcom/vc5: Fix reloads of separate stencil buffers.
Like for stores, we need to emit a separate load_general packet.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_rcl.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/gallium/drivers/vc5/vc5_rcl.c b/src/gallium/drivers/vc5/vc5_rcl.c index 32892275130..7f804aa27a5 100644 --- a/src/gallium/drivers/vc5/vc5_rcl.c +++ b/src/gallium/drivers/vc5/vc5_rcl.c @@ -226,10 +226,22 @@ vc5_rcl_emit_loads(struct vc5_job *job, struct vc5_cl *cl) if ((loads_pending & PIPE_CLEAR_DEPTHSTENCIL) && (V3D_VERSION >= 40 || (job->zsbuf && job->zsbuf->texture->nr_samples > 1))) { - load_general(cl, job->zsbuf, - zs_buffer_from_pipe_bits(loads_pending), - PIPE_CLEAR_DEPTHSTENCIL, - &loads_pending); + struct vc5_resource *rsc = vc5_resource(job->zsbuf->texture); + + if (rsc->separate_stencil && + (loads_pending & PIPE_CLEAR_STENCIL)) { + load_general(cl, job->zsbuf, + STENCIL, + PIPE_CLEAR_STENCIL, + &loads_pending); + } + + if (loads_pending & PIPE_CLEAR_DEPTHSTENCIL) { + load_general(cl, job->zsbuf, + zs_buffer_from_pipe_bits(loads_pending), + loads_pending & PIPE_CLEAR_DEPTHSTENCIL, + &loads_pending); + } } #if V3D_VERSION < 40 |