winsys/amdgpu: addrlib - port fix error for workaround for 1D tiling
authorSonny Jiang <sonny.jiang@amd.com>
Thu, 12 Nov 2015 17:08:31 +0000 (12:08 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 7 Dec 2015 20:58:42 +0000 (21:58 +0100)
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/winsys/amdgpu/drm/addrlib/r800/egbaddrlib.cpp

index b1e008b83928fb701124f6fd9379b40fdce9de16..110e3d007b8187f5e4f90bffd25a2bf200ad4d55 100644 (file)
@@ -672,7 +672,7 @@ BOOL_32 EgBasedAddrLib::ComputeSurfaceAlignmentsMicroTiled(
     if (flags.czDispCompatible)
     {
         *pBaseAlign  = PowTwoAlign(*pBaseAlign, 4096);                         //Base address MOD 4096 = 0
-        *pPitchAlign = PowTwoAlign(*pPitchAlign, 512 >> (BITS_TO_BYTES(bpp))); //(8 lines * pitch * bytes per pixel) MOD 4096 = 0
+        *pPitchAlign = PowTwoAlign(*pPitchAlign, 512 / (BITS_TO_BYTES(bpp))); //(8 lines * pitch * bytes per pixel) MOD 4096 = 0
     }
     // end Carrizo workaround for 1D tilling