diff options
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_draw.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_draw.c | 6 |
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; |