diff options
author | Eric Anholt <[email protected]> | 2020-02-25 14:42:33 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-07 18:02:56 +0000 |
commit | 9c6bfe8733f3c74f6ccf1238ab79eeb8203b72f7 (patch) | |
tree | a0221c17318195a5a61214ca40d2cecd3ba33365 /src/freedreno/fdl | |
parent | 59a222039860128dc2520fa21d7cddc48c563e2f (diff) |
freedreno/a6xx: Drop the "alignment" layout temporary.
It's just 1 for !3d, which means that the align we're doing in that case
is pointless.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3987>
Diffstat (limited to 'src/freedreno/fdl')
-rw-r--r-- | src/freedreno/fdl/fd6_layout.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/freedreno/fdl/fd6_layout.c b/src/freedreno/fdl/fd6_layout.c index 5a371c173f0..82a04f688e7 100644 --- a/src/freedreno/fdl/fd6_layout.c +++ b/src/freedreno/fdl/fd6_layout.c @@ -81,6 +81,7 @@ fdl6_layout(struct fdl_layout *layout, layout->cpp *= nr_samples; layout->format = format; layout->nr_samples = nr_samples; + layout->layer_first = !is_3d; if (depth0 > 1) layout->ubwc = false; @@ -95,14 +96,6 @@ fdl6_layout(struct fdl_layout *layout, if ((layout->cpp == 2) && (util_format_get_nr_components(format) == 2)) ta = 0; - uint32_t alignment; - if (is_3d) { - layout->layer_first = false; - alignment = 4096; - } else { - layout->layer_first = true; - alignment = 1; - } /* in layer_first layout, the level (slice) contains just one * layer (since in fact the layer contains the slices) */ @@ -169,12 +162,12 @@ fdl6_layout(struct fdl_layout *layout, */ if (is_3d) { if (level < 1 || layout->slices[level - 1].size0 > 0xf000) { - slice->size0 = align(blocks * layout->cpp, alignment); + slice->size0 = align(blocks * layout->cpp, 4096); } else { slice->size0 = layout->slices[level - 1].size0; } } else { - slice->size0 = align(blocks * layout->cpp, alignment); + slice->size0 = blocks * layout->cpp; } layout->size += slice->size0 * depth * layers_in_level; |