From: Rob Clark Date: Tue, 21 Oct 2014 21:08:10 +0000 (-0400) Subject: freedreno/a3xx: fix depth/stencil restore format X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=36310d9d56510ef50318bbb370f6c3d27ba09ebd;p=mesa.git freedreno/a3xx: fix depth/stencil restore format Also fix z16 restore format which was completely wrong. Signed-off-by: Rob Clark --- diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_util.c b/src/gallium/drivers/freedreno/a3xx/fd3_util.c index c83f65ae421..f4433490499 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_util.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_util.c @@ -264,6 +264,9 @@ fd3_pipe2tex(enum pipe_format format) case PIPE_FORMAT_I8_UNORM: return TFMT_NORM_UINT_8; + case PIPE_FORMAT_R8G8_UNORM: + return TFMT_NORM_UINT_8_8; + case PIPE_FORMAT_B8G8R8A8_UNORM: case PIPE_FORMAT_B8G8R8X8_UNORM: case PIPE_FORMAT_R8G8B8A8_UNORM: @@ -378,8 +381,9 @@ fd3_gmem_restore_format(enum pipe_format format) switch (format) { case PIPE_FORMAT_Z24X8_UNORM: case PIPE_FORMAT_Z24_UNORM_S8_UINT: + return PIPE_FORMAT_R8G8B8A8_UNORM; case PIPE_FORMAT_Z16_UNORM: - return PIPE_FORMAT_B8G8R8A8_UNORM; + return PIPE_FORMAT_R8G8_UNORM; default: return format; }