From 36310d9d56510ef50318bbb370f6c3d27ba09ebd Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 21 Oct 2014 17:08:10 -0400 Subject: [PATCH] freedreno/a3xx: fix depth/stencil restore format Also fix z16 restore format which was completely wrong. Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a3xx/fd3_util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.30.2