OSDN Git Service

amdgpu/addrlib: Add a new output flag to notify client that the returned tile index...
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 20 Jul 2016 08:34:41 +0000 (10:34 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 30 Mar 2017 12:44:33 +0000 (14:44 +0200)
If this flag is set for mip0, client should set prt flag for sub mips,
so that address lib can select the correct tile index for sub mips.

src/amd/addrlib/addrinterface.h
src/amd/addrlib/r800/siaddrlib.cpp

index 2a61b2b..8506a45 100644 (file)
@@ -619,7 +619,10 @@ typedef struct _ADDR_COMPUTE_SURFACE_INFO_OUTPUT
                                        ///< Only meaningful when create flag checkLast2DLevel is set
         UINT_32     tcCompatible : 1;  ///< If the surface can be shader compatible
         UINT_32     dccUnsupport : 1;  ///< If the surface can support DCC compressed rendering
-        UINT_32     reserved     :29;  ///< Reserved bits
+        UINT_32     prtTileIndex : 1;  ///< SI only, indicate the returned tile index is for PRT
+                                       ///< If address lib return true for mip 0, client should set prt flag
+                                       ///< for child mips in subsequent compute surface info calls
+        UINT_32     reserved     :28;  ///< Reserved bits
     };
 
     UINT_32         equationIndex;     ///< Equation index in the equation table;
index d3e9486..d358f0d 100644 (file)
@@ -2231,6 +2231,7 @@ VOID SiLib::HwlSetupTileInfo(
     }
 
     pOut->tileIndex = index;
+    pOut->prtTileIndex = flags.prt;
 }
 
 /**