freedreno/a6xx: Move the IBO pipe2tex down to where it's used.

For the texture path, the pipe2tex happens in fd6_tex_const_0().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8319>
This commit is contained in:
Eric Anholt 2020-12-18 10:51:24 -08:00 committed by Marge Bot
parent 1c4613f5d4
commit d6e307dcc5

View file

@ -38,7 +38,6 @@
struct fd6_image {
struct pipe_resource *prsc;
enum pipe_format pfmt;
enum a6xx_format fmt;
enum a6xx_tex_type type;
bool srgb;
uint32_t cpp;
@ -67,7 +66,6 @@ static void translate_image(struct fd6_image *img, const struct pipe_image_view
img->prsc = prsc;
img->pfmt = format;
img->fmt = fd6_pipe2tex(format);
img->type = fd6_tex_type(prsc->target);
img->srgb = util_format_is_srgb(format);
img->cpp = rsc->layout.cpp;
@ -145,7 +143,6 @@ static void translate_buf(struct fd6_image *img, const struct pipe_shader_buffer
img->prsc = prsc;
img->pfmt = format;
img->fmt = fd6_pipe2tex(format);
img->type = fd6_tex_type(prsc->target);
img->srgb = util_format_is_srgb(format);
img->cpp = rsc->layout.cpp;
@ -249,7 +246,7 @@ static void emit_image_ssbo(struct fd_ringbuffer *ring, struct fd6_image *img)
enum a6xx_tile_mode tile_mode = fd_resource_tile_mode(img->prsc, img->level);
bool ubwc_enabled = fd_resource_ubwc_enabled(rsc, img->level);
OUT_RING(ring, A6XX_IBO_0_FMT(img->fmt) |
OUT_RING(ring, A6XX_IBO_0_FMT(fd6_pipe2tex(img->pfmt)) |
A6XX_IBO_0_TILE_MODE(tile_mode));
OUT_RING(ring, A6XX_IBO_1_WIDTH(img->width) |
A6XX_IBO_1_HEIGHT(img->height));