diff options
author | Eric Anholt <[email protected]> | 2014-08-01 13:32:49 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-08-11 14:45:31 -0700 |
commit | 4160ac5ee41630a5c9fc4e1f3520f0fabf42cb14 (patch) | |
tree | b9fa27c50da704655560e2d2a9f5b2e94288049f /src/gallium/drivers/vc4/vc4_draw.c | |
parent | 2259cc5aebcb16636b1399dd438beed9d9867e67 (diff) |
vc4: Add support for depth clears and tests within a tile.
This doesn't load/store the Z contents across submits yet. It also
disables early Z, since it's going to require tracking of Z functions
across multiple state updates to track the early Z direction and whether
it can be used.
v2: Move the key setup to before the search for the key.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_draw.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_draw.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_draw.c b/src/gallium/drivers/vc4/vc4_draw.c index 3b8a5d9b91e..77bbecf2a4e 100644 --- a/src/gallium/drivers/vc4/vc4_draw.c +++ b/src/gallium/drivers/vc4/vc4_draw.c @@ -181,7 +181,7 @@ vc4_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) cl_u8(&vc4->shader_rec, i * 16); /* CS VPM offset */ } - if (vc4->zsa && vc4->zsa->depth.enabled) { + if (vc4->zsa && vc4->zsa->base.depth.enabled) { vc4->resolve |= PIPE_CLEAR_DEPTH; } vc4->resolve |= PIPE_CLEAR_COLOR0; @@ -215,6 +215,9 @@ vc4_clear(struct pipe_context *pctx, unsigned buffers, color->f); } + if (buffers & PIPE_CLEAR_DEPTH) + vc4->clear_depth = util_pack_z(PIPE_FORMAT_Z24X8_UNORM, depth); + vc4->cleared |= buffers; vc4->resolve |= buffers; |