diff options
author | Kristian H. Kristensen <[email protected]> | 2019-10-31 14:43:58 -0700 |
---|---|---|
committer | Kristian H. Kristensen <[email protected]> | 2019-11-07 16:36:36 -0800 |
commit | 3d16ec4a717266bb702b718ec05e083b83eb5490 (patch) | |
tree | 1e24bbcd60866f7265fb5039391afcc85f6fb0eb | |
parent | 50124afe3408108dc742c81dca3c071194ed678d (diff) |
freedreno/a6x: Rename z/s formats
What we call eRB6_Z24_UNORM_S8_UINT now is actually
RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8 and RB6_X8Z24_UNORM is actually
RB6_Z24_UNORM_S8_UINT.
Signed-off-by: Kristian H. Kristensen <[email protected]>
Acked-by: Eric Anholt <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
-rw-r--r-- | src/freedreno/registers/a6xx.xml | 4 | ||||
-rw-r--r-- | src/freedreno/vulkan/tu_blit.c | 10 | ||||
-rw-r--r-- | src/freedreno/vulkan/tu_formats.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_blitter.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_format.c | 14 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_format.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_resource.c | 2 |
7 files changed, 20 insertions, 20 deletions
diff --git a/src/freedreno/registers/a6xx.xml b/src/freedreno/registers/a6xx.xml index 3f78cd58cf7..7f464f1a480 100644 --- a/src/freedreno/registers/a6xx.xml +++ b/src/freedreno/registers/a6xx.xml @@ -53,8 +53,8 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd"> <value value="0x82" name="RB6_R32G32B32A32_FLOAT"/> <value value="0x83" name="RB6_R32G32B32A32_UINT"/> <value value="0x84" name="RB6_R32G32B32A32_SINT"/> - <value value="0x91" name="RB6_Z24_UNORM_S8_UINT"/> - <value value="0xa0" name="RB6_X8Z24_UNORM"/> + <value value="0x91" name="RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8"/> + <value value="0xa0" name="RB6_Z24_UNORM_S8_UINT"/> </enum> <!-- these might be same as a5xx --> diff --git a/src/freedreno/vulkan/tu_blit.c b/src/freedreno/vulkan/tu_blit.c index 33e0fd45a55..15de704a339 100644 --- a/src/freedreno/vulkan/tu_blit.c +++ b/src/freedreno/vulkan/tu_blit.c @@ -65,8 +65,8 @@ blit_image_info(const struct tu_blit_surf *img, bool src, bool stencil_read) enum a3xx_color_swap swap = img->tiled ? WZYX : fmt->swap; if (rb == RB6_R10G10B10A2_UNORM && src) rb = RB6_R10G10B10A2_FLOAT16; - if (rb == RB6_X8Z24_UNORM) - rb = RB6_Z24_UNORM_S8_UINT; + if (rb == RB6_Z24_UNORM_S8_UINT) + rb = RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8; if (stencil_read) swap = XYZW; @@ -85,8 +85,8 @@ emit_blit_step(struct tu_cmd_buffer *cmdbuf, const struct tu_blit *blt) tu_cs_reserve_space(cmdbuf->device, cs, 52); enum a6xx_color_fmt fmt = tu6_get_native_format(blt->dst.fmt)->rb; - if (fmt == RB6_X8Z24_UNORM) - fmt = RB6_Z24_UNORM_S8_UINT; + if (fmt == RB6_Z24_UNORM_S8_UINT) + fmt = RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8; enum a6xx_2d_ifmt ifmt = tu6_rb_fmt_to_ifmt(fmt); @@ -97,7 +97,7 @@ emit_blit_step(struct tu_cmd_buffer *cmdbuf, const struct tu_blit *blt) uint32_t blit_cntl = A6XX_RB_2D_BLIT_CNTL_ROTATE(blt->rotation) | A6XX_RB_2D_BLIT_CNTL_COLOR_FORMAT(fmt) | /* not required? */ - COND(fmt == RB6_Z24_UNORM_S8_UINT, A6XX_RB_2D_BLIT_CNTL_D24S8) | + COND(fmt == RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8, A6XX_RB_2D_BLIT_CNTL_D24S8) | A6XX_RB_2D_BLIT_CNTL_MASK(0xf) | A6XX_RB_2D_BLIT_CNTL_IFMT(ifmt); diff --git a/src/freedreno/vulkan/tu_formats.c b/src/freedreno/vulkan/tu_formats.c index 1bd0df66673..6cedf24b61f 100644 --- a/src/freedreno/vulkan/tu_formats.c +++ b/src/freedreno/vulkan/tu_formats.c @@ -249,11 +249,11 @@ TU_FORMAT_TABLE(tu6_format_table0) = { /* depth/stencil */ TU6_xTC(D16_UNORM, 16_UNORM, R16_UNORM, WZYX), /* 124 */ - TU6_xTC(X8_D24_UNORM_PACK32, X8Z24_UNORM, X8Z24_UNORM, WZYX), /* 125 */ + TU6_xTC(X8_D24_UNORM_PACK32, Z24_UNORM_S8_UINT, Z24_UNORM_S8_UINT, WZYX), /* 125 */ TU6_xTC(D32_SFLOAT, 32_FLOAT, R32_FLOAT, WZYX), /* 126 */ TU6_xTC(S8_UINT, 8_UINT, R8_UINT, WZYX), /* 127 */ TU6_xxx(D16_UNORM_S8_UINT, X8Z16_UNORM, X8Z16_UNORM, WZYX), /* 128 */ - TU6_xTC(D24_UNORM_S8_UINT, X8Z24_UNORM, X8Z24_UNORM, WZYX), /* 129 */ + TU6_xTC(D24_UNORM_S8_UINT, Z24_UNORM_S8_UINT, Z24_UNORM_S8_UINT, WZYX), /* 129 */ TU6_xxx(D32_SFLOAT_S8_UINT, x, x, WZYX), /* 130 */ /* compressed */ @@ -341,8 +341,8 @@ tu6_rb_fmt_to_ifmt(enum a6xx_color_fmt fmt) case RB6_R4G4B4A4_UNORM: case RB6_R5G5B5A1_UNORM: case RB6_R5G6B5_UNORM: - case RB6_X8Z24_UNORM: case RB6_Z24_UNORM_S8_UINT: + case RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8: return R2D_UNORM8; case RB6_R32_UINT: diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c index 79541e5cb54..39c5ee6f339 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c @@ -432,7 +432,7 @@ emit_blit_or_clear_texture(struct fd_context *ctx, struct fd_ringbuffer *ring, color->ui[2] = (depth_unorm24 >> 16) & 0xff; color->ui[3] = stencil; - dfmt = RB6_Z24_UNORM_S8_UINT; + dfmt = RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8; break; } case PIPE_FORMAT_B5G6R5_UNORM: diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_format.c b/src/gallium/drivers/freedreno/a6xx/fd6_format.c index a3d857fb88c..0e9078bd71a 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_format.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_format.c @@ -215,15 +215,15 @@ static struct fd6_format formats[PIPE_FORMAT_COUNT] = { VT(R11G11B10_FLOAT, 11_11_10_FLOAT, R11G11B10_FLOAT, WZYX), _T(R9G9B9E5_FLOAT, 9_9_9_E5_FLOAT, NONE, WZYX), - _T(Z24X8_UNORM, X8Z24_UNORM, X8Z24_UNORM, WZYX), - _T(X24S8_UINT, 8_8_8_8_UINT, X8Z24_UNORM, WZYX), - _T(Z24_UNORM_S8_UINT, X8Z24_UNORM, X8Z24_UNORM, WZYX), - _T(Z32_FLOAT, 32_FLOAT, R32_FLOAT, WZYX), - _T(Z32_FLOAT_S8X24_UINT, 32_FLOAT, R32_FLOAT, WZYX), - _T(X32_S8X24_UINT, 8_UINT, R8_UINT, WZYX), + _T(Z24X8_UNORM, X8Z24_UNORM, Z24_UNORM_S8_UINT, WZYX), + _T(X24S8_UINT, 8_8_8_8_UINT, Z24_UNORM_S8_UINT, WZYX), + _T(Z24_UNORM_S8_UINT, X8Z24_UNORM, Z24_UNORM_S8_UINT, WZYX), + _T(Z32_FLOAT, 32_FLOAT, R32_FLOAT, WZYX), + _T(Z32_FLOAT_S8X24_UINT, 32_FLOAT, R32_FLOAT, WZYX), + _T(X32_S8X24_UINT, 8_UINT, R8_UINT, WZYX), /* special format for blits: */ - _T(Z24_UNORM_S8_UINT_AS_R8G8B8A8, Z24_UNORM_S8_UINT, Z24_UNORM_S8_UINT, WZYX), + _T(Z24_UNORM_S8_UINT_AS_R8G8B8A8, Z24_UNORM_S8_UINT, Z24_UNORM_S8_UINT_AS_R8G8B8A8, WZYX), /* 48-bit */ V_(R16G16B16_UNORM, 16_16_16_UNORM, NONE, WZYX), diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_format.h b/src/gallium/drivers/freedreno/a6xx/fd6_format.h index 3c1e0a0e5d4..8da5f08be50 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_format.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_format.h @@ -110,8 +110,8 @@ fd6_ifmt(enum a6xx_color_fmt fmt) case RB6_R5G5B5A1_UNORM: case RB6_R5G6B5_UNORM: case RB6_R10G10B10A2_UINT: - case RB6_X8Z24_UNORM: case RB6_Z24_UNORM_S8_UINT: + case RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8: return R2D_RAW; default: unreachable("bad format"); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_resource.c b/src/gallium/drivers/freedreno/a6xx/fd6_resource.c index 8f8f7f20d1f..e9f561e08b5 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_resource.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_resource.c @@ -206,8 +206,8 @@ ok_ubwc_format(enum pipe_format pfmt) case RB6_R8G8_SINT: case RB6_R8G8_UINT: case RB6_R8G8_UNORM: - case RB6_X8Z24_UNORM: case RB6_Z24_UNORM_S8_UINT: + case RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8: return true; default: return false; |