[Mesa-stable] [PATCH] freedreno/a3xx: use the same layer size for all slices
Ilia Mirkin
imirkin at alum.mit.edu
Thu Mar 12 21:56:58 PDT 2015
We only program in one layer size per texture, so that means that all
levels must share one size. This makes the piglit test
bin/texelFetch fs sampler2DArray
have the same breakage as its non-array version instead of being
completely off.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: "10.4 10.5" <mesa-stable at lists.freedesktop.org>
---
Need to put this through a piglit run, but seems fairly obvious given what
fd3_texture does. Also see results of the texelFetch piglit.
src/gallium/drivers/freedreno/freedreno_resource.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index c412407..afb396e 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -215,7 +215,10 @@ setup_slices(struct fd_resource *rsc, uint32_t alignment)
slice->pitch = align(width, 32);
slice->offset = size;
- slice->size0 = align(slice->pitch * height * rsc->cpp, alignment);
+ if (level == 0 || layers_in_level == 1)
+ slice->size0 = align(slice->pitch * height * rsc->cpp, alignment);
+ else
+ slice->size0 = rsc->slices[0].size0;
size += slice->size0 * depth * layers_in_level;
--
2.0.5
More information about the mesa-stable
mailing list