diff options
author | Eric Anholt <[email protected]> | 2019-11-20 12:40:25 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-11-26 18:46:07 +0000 |
commit | 2e62a622e78d2268fb123e2551690ef9749ef055 (patch) | |
tree | fc9d20bc44f4948ee617226874cfcb66bd465532 /src/gallium/drivers/freedreno/a3xx | |
parent | 930432577f22784493d883e0831b700428b22a32 (diff) |
freedreno: Convert the slice struct to the new resource header.
This gets the worst of the sed required for shared resource layout out of
the way. The texture layout comment is dropped now that we're referencing
the shared header, which has a more complete description.
Acked-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_gmem.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_resource.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_texture.c | 2 |
4 files changed, 7 insertions, 8 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c index 1c96eff1ad7..715b4374618 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c @@ -215,8 +215,7 @@ emit_textures(struct fd_context *ctx, struct fd_ringbuffer *ring, unsigned end = fd_sampler_last_level(&view->base); for (j = 0; j < (end - start + 1); j++) { - struct fd_resource_slice *slice = - fd_resource_slice(rsc, j + start); + struct fdl_slice *slice = fd_resource_slice(rsc, j + start); OUT_RELOC(ring, rsc->bo, slice->offset, 0, 0); } } @@ -311,7 +310,7 @@ fd3_emit_gmem_restore_tex(struct fd_ringbuffer *ring, /* note: PIPE_BUFFER disallowed for surfaces */ unsigned lvl = psurf[i]->u.tex.level; - struct fd_resource_slice *slice = fd_resource_slice(rsc, lvl); + struct fdl_slice *slice = fd_resource_slice(rsc, lvl); debug_assert(psurf[i]->u.tex.first_layer == psurf[i]->u.tex.last_layer); diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c index 20094431076..d30915bdc70 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c @@ -55,7 +55,7 @@ emit_mrt(struct fd_ringbuffer *ring, unsigned nr_bufs, enum a3xx_color_swap swap = WZYX; bool srgb = false; struct fd_resource *rsc = NULL; - struct fd_resource_slice *slice = NULL; + struct fdl_slice *slice = NULL; uint32_t stride = 0; uint32_t base = 0; uint32_t offset = 0; @@ -330,7 +330,7 @@ emit_gmem2mem_surf(struct fd_batch *batch, format = rsc->base.format; } - struct fd_resource_slice *slice = fd_resource_slice(rsc, psurf->u.tex.level); + struct fdl_slice *slice = fd_resource_slice(rsc, psurf->u.tex.level); uint32_t offset = fd_resource_offset(rsc, psurf->u.tex.level, psurf->u.tex.first_layer); @@ -738,7 +738,7 @@ fd3_emit_sysmem_prep(struct fd_batch *batch) struct pipe_surface *psurf = pfb->cbufs[i]; if (!psurf) continue; - struct fd_resource_slice *slice = + struct fdl_slice *slice = fd_resource_slice(fd_resource(psurf->texture), psurf->u.tex.level); pitch = slice->pitch; diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_resource.c b/src/gallium/drivers/freedreno/a3xx/fd3_resource.c index 7fce61be99b..b29c846e3b0 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_resource.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_resource.c @@ -37,7 +37,7 @@ setup_slices(struct fd_resource *rsc, uint32_t alignment, enum pipe_format forma uint32_t depth = prsc->depth0; for (level = 0; level <= prsc->last_level; level++) { - struct fd_resource_slice *slice = fd_resource_slice(rsc, level); + struct fdl_slice *slice = fd_resource_slice(rsc, level); uint32_t blocks; if (rsc->tile_mode) { diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c index 3abdc1677c4..e65adba3c59 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c @@ -263,7 +263,7 @@ fd3_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, A3XX_TEX_CONST_1_HEIGHT(u_minify(prsc->height0, lvl)); } /* when emitted, A3XX_TEX_CONST_2_INDX() must be OR'd in: */ - struct fd_resource_slice *slice = fd_resource_slice(rsc, lvl); + struct fdl_slice *slice = fd_resource_slice(rsc, lvl); so->texconst2 = A3XX_TEX_CONST_2_PITCH(fd3_pipe2nblocksx(cso->format, slice->pitch) * rsc->cpp); switch (prsc->target) { |