summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_draw.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-09-05 14:23:04 -0700
committerEric Anholt <[email protected]>2014-09-09 07:29:16 -0700
commitfd6e4fccade0a5e2a4877d01a57c255a47a06200 (patch)
treebf90291fe074d1c8bb19a1973e5cc69c58bf5a4f /src/gallium/drivers/vc4/vc4_draw.c
parent2cbecee4b772acf425156ab3fb7b7e36ddb42d51 (diff)
vc4: Flip around the depth/stencil fields.
After implementing depth stores, it looks like this is the way things actually are, according to hiz-depth-read-fbo-d24-s0's probes.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_draw.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_draw.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_draw.c b/src/gallium/drivers/vc4/vc4_draw.c
index 311be6b7ec4..d1035bb30ab 100644
--- a/src/gallium/drivers/vc4/vc4_draw.c
+++ b/src/gallium/drivers/vc4/vc4_draw.c
@@ -224,8 +224,12 @@ vc4_clear(struct pipe_context *pctx, unsigned buffers,
color->f);
}
- if (buffers & PIPE_CLEAR_DEPTH)
+ if (buffers & PIPE_CLEAR_DEPTH) {
+ /* Though the depth buffer is stored with Z in the high 24,
+ * for this field we just need to store it in the low 24.
+ */
vc4->clear_depth = util_pack_z(PIPE_FORMAT_Z24X8_UNORM, depth);
+ }
vc4->cleared |= buffers;
vc4->resolve |= buffers;