summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-03-13 01:36:57 -0400
committerIlia Mirkin <[email protected]>2015-03-13 16:05:16 -0400
commit620e29b74821fd75b24495ab2bfddea53fc75350 (patch)
tree65677bbc1ff28438148447327ff8c8ddd5f9f1b7 /src/gallium/drivers/freedreno
parent89b26d5a360ebde11a69f2cdefa66e4d6a2a13fd (diff)
freedreno: fix slice pitch calculations
For example if width were 65, the first slice would get 96 while the second would get 32. However the hardware appears to expect the second pitch to be 64, based on halving the 96 (and aligning up to 32). This fixes texelFetch piglit tests on a3xx below a certain size. Going higher they break again, but most likely due to unrelated reasons. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.4 10.5" <[email protected]> Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index c7b4e579992..69e54526848 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -213,7 +213,7 @@ setup_slices(struct fd_resource *rsc, uint32_t alignment)
for (level = 0; level <= prsc->last_level; level++) {
struct fd_resource_slice *slice = fd_resource_slice(rsc, level);
- slice->pitch = align(width, 32);
+ slice->pitch = width = align(width, 32);
slice->offset = size;
/* 1d array, 2d array, 3d textures (but not cube!) must all have the
* same layer size for each miplevel on a3xx. These are also the