etnaviv: clear all bits for 24bpp depth without stencil
authorJonathan Marek <jonathan@marek.ca>
Mon, 24 Jun 2019 21:05:06 +0000 (17:05 -0400)
committerJonathan Marek <jonathan@marek.ca>
Sun, 30 Jun 2019 01:49:50 +0000 (21:49 -0400)
For fast clear to happen, all bits must be cleared.

This allows using fast clear for 24bpp depth without stencil.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_blt.c

index d1693c77fe35df17ac7e817c89d04de0b3471631..1f13bbc31cdbc82bfff8b4510ef5a63a3ac24b6d 100644 (file)
@@ -261,10 +261,10 @@ etna_blit_clear_zs_blt(struct pipe_context *pctx, struct pipe_surface *dst,
    /* Get the channels to clear */
    switch (surf->base.format) {
    case PIPE_FORMAT_Z16_UNORM:
+   case PIPE_FORMAT_X8Z24_UNORM:
       clear_bits_depth = 0xffffffff;
       clear_bits_stencil = 0x00000000;
       break;
-   case PIPE_FORMAT_X8Z24_UNORM:
    case PIPE_FORMAT_S8_UINT_Z24_UNORM:
       clear_bits_depth = 0xffffff00;
       clear_bits_stencil = 0x000000ff;