aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a6xx/fd6_resource.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-09-10 19:28:31 +0100
committerRob Clark <[email protected]>2019-09-10 22:08:33 +0000
commit6c19d37331855d2f0411fb7c92af072c7f4ddd51 (patch)
treee7fe2f46fa2d220ba507adf40e16fd9401f21a00 /src/gallium/drivers/freedreno/a6xx/fd6_resource.c
parent85a23a8991cfb78960362114bf16304ea987f7f4 (diff)
freedreno/a6xx: fix 3d tex layout
Fixes dEQP-GLES3.functional.texture.specification.texstorage3d.size.3d_2x2x2_2_levels Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a6xx/fd6_resource.c')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_resource.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_resource.c b/src/gallium/drivers/freedreno/a6xx/fd6_resource.c
index 3d7b79fc66f..8f8f7f20d1f 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_resource.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_resource.c
@@ -133,7 +133,7 @@ setup_slices(struct fd_resource *rsc, uint32_t alignment, enum pipe_format forma
* range gets into range, we stop reducing it.
*/
if (prsc->target == PIPE_TEXTURE_3D) {
- if (level <= 1 || (rsc->slices[level - 1].size0 > 0xf000)) {
+ if (level < 1 || (rsc->slices[level - 1].size0 > 0xf000)) {
slice->size0 = align(blocks * rsc->cpp, alignment);
} else {
slice->size0 = rsc->slices[level - 1].size0;
@@ -145,11 +145,12 @@ setup_slices(struct fd_resource *rsc, uint32_t alignment, enum pipe_format forma
size += slice->size0 * depth * layers_in_level;
#if 0
- debug_printf("%s: %ux%ux%u@%u:\t%2u: stride=%4u, size=%6u,%7u, aligned_height=%3u, blocks=%u\n",
+ debug_printf("%s: %ux%ux%u@%u:\t%2u: stride=%4u, size=%6u,%7u, aligned_height=%3u, blocks=%u, offset=0x%x\n",
util_format_name(prsc->format),
width, height, depth, rsc->cpp,
level, slice->pitch * rsc->cpp,
- slice->size0, size, aligned_height, blocks);
+ slice->size0, size, aligned_height, blocks,
+ slice->offset);
#endif
depth = u_minify(depth, 1);