freedreno: Make the slice pitch be bytes, not pixels.
[mesa.git] / src / gallium / drivers / freedreno / a2xx / fd2_resource.c
index bccce004a713f422b2ca6336b54b025796e65b0b..1cd3e9da884965b96edb148bbd56cdca202af45f 100644 (file)
@@ -61,7 +61,7 @@ fd2_setup_slices(struct fd_resource *rsc)
                        height = util_next_power_of_two(height);
                }
 
-               slice->pitch = width;
+               slice->pitch = util_format_get_nblocksx(format, width) * rsc->layout.cpp;
                slice->offset = size;
 
                blocks = util_format_get_nblocks(format, width, height);