diff options
author | Eric Anholt <[email protected]> | 2019-11-21 14:53:58 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-12-11 04:24:18 +0000 |
commit | 97be9503bb1aba3017b1ff682e14f9a6c60d91a0 (patch) | |
tree | aa76661f95fd2e5d3beb93da3a3bec726819ae61 /src/freedreno | |
parent | 69d7782b155b72707d95a2f6b0c0776afbb888e3 (diff) |
freedreno: Drop the extra offset field for mipmap slices.
We can just bake the UBWC-goes-first delta into the slices at setup time.
I did have to fix up the resource shadowing swap path to swap the slice
fields, as it was missing and regressed the format reinterpets otherwise.
Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/freedreno')
-rw-r--r-- | src/freedreno/fdl/freedreno_layout.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/freedreno/fdl/freedreno_layout.h b/src/freedreno/fdl/freedreno_layout.h index c17120a8ac6..40989c33371 100644 --- a/src/freedreno/fdl/freedreno_layout.h +++ b/src/freedreno/fdl/freedreno_layout.h @@ -100,7 +100,6 @@ struct fdl_layout { uint32_t width0, height0, depth0; /* UBWC specific fields: */ - uint32_t offset; /* offset to start of pixel data */ uint32_t ubwc_offset; /* offset to UBWC meta data */ uint32_t ubwc_pitch; uint32_t ubwc_size; @@ -119,9 +118,7 @@ static inline uint32_t fdl_surface_offset(const struct fdl_layout *layout, unsigned level, unsigned layer) { const struct fdl_slice *slice = &layout->slices[level]; - unsigned offset = slice->offset; - offset += fdl_layer_stride(layout, level) * layer; - return offset + layout->offset; + return slice->offset + fdl_layer_stride(layout, level) * layer; } static inline uint32_t |