[Mesa-dev] [PATCH 27/34] i965: Make CCS stride match kernel's expectations

Ben Widawsky ben at bwidawsk.net
Tue Jan 24 06:21:50 UTC 2017


v2: Put the commit message as a comment (Topi)

Cc: Topi Pohjolainen <topi.pohjolainen at gmail.com>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Cc: Jason Ekstrand <jason at jlekstrand.net>
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
Acked-by: Daniel Stone <daniels at collabora.com>
---
 src/mesa/drivers/dri/i965/intel_screen.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 85070bb54d..12b3b071e4 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -1023,7 +1023,10 @@ intel_from_planar(__DRIimage *parent, int plane, void *loaderPrivate)
     if (parent == NULL || parent->planar_format == NULL) {
        if (is_aux) {
           offset = parent->aux_offset;
-          stride = ALIGN(parent->pitch / 32, 128);
+          /* Make CCS stride match kernel's expectations. Mesa's internals
+           * expect: stride = ALIGN(parent->pitch / 32, 128)
+           */
+          stride = ALIGN(parent->pitch / 64, 128);
           height = ALIGN(DIV_ROUND_UP(parent->height, 16), 32);
           dri_format = parent->dri_format;
           goto done;
-- 
2.11.0



More information about the mesa-dev mailing list