[Mesa-dev] [PATCH 005/140] amdgpu/addrlib: Make comments shorter

Marek Olšák maraeo at gmail.com
Mon Mar 20 22:42:15 UTC 2017


From: Xavi Zhang <xavi.zhang at amd.com>

Signed-off-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
 src/amd/addrlib/addrinterface.h | 76 ++++++++++++++++-------------------------
 1 file changed, 29 insertions(+), 47 deletions(-)

diff --git a/src/amd/addrlib/addrinterface.h b/src/amd/addrlib/addrinterface.h
index 98cd405..d9a2b82 100644
--- a/src/amd/addrlib/addrinterface.h
+++ b/src/amd/addrlib/addrinterface.h
@@ -104,28 +104,20 @@ typedef VOID*   ADDR_CLIENT_HANDLE;
 *     AddrCombineBankPipeSwizzle()
 *     AddrComputeSliceSwizzle()
 *     AddrConvertTileInfoToHW()
 *     AddrConvertTileIndex()
 *     AddrConvertTileIndex1()
 *     AddrGetTileIndex()
 *     AddrComputeBaseSwizzle()
 *     AddrUseTileIndex()
 *     AddrUseCombinedSwizzle()
 *
-* /////////////////////////////////////////////////////////////////////////////////////////////////
-* //                                    Dump functions
-* /////////////////////////////////////////////////////////////////////////////////////////////////
-*     AddrDumpSurfaceInfo()
-*     AddrDumpFmaskInfo()
-*     AddrDumpCmaskInfo()
-*     AddrDumpHtileInfo()
-*
 **/
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 //                                      Callback functions
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 /**
 ***************************************************************************************************
 * @brief Alloc system memory flags.
 * @note These flags are reserved for future use and if flags are added will minimize the impact
@@ -423,48 +415,47 @@ typedef struct _ADDR_QBSTEREOINFO
 *   ADDR_SURFACE_FLAGS
 *
 *   @brief
 *       Surface flags
 ***************************************************************************************************
 */
 typedef union _ADDR_SURFACE_FLAGS
 {
     struct
     {
-        UINT_32 color         : 1; ///< Flag indicates this is a color buffer
-        UINT_32 depth         : 1; ///< Flag indicates this is a depth/stencil buffer
-        UINT_32 stencil       : 1; ///< Flag indicates this is a stencil buffer
-        UINT_32 texture       : 1; ///< Flag indicates this is a texture
-        UINT_32 cube          : 1; ///< Flag indicates this is a cubemap
-
-        UINT_32 volume        : 1; ///< Flag indicates this is a volume texture
-        UINT_32 fmask         : 1; ///< Flag indicates this is an fmask
-        UINT_32 cubeAsArray   : 1; ///< Flag indicates if treat cubemap as arrays
-        UINT_32 compressZ     : 1; ///< Flag indicates z buffer is compressed
-        UINT_32 overlay       : 1; ///< Flag indicates this is an overlay surface
-        UINT_32 noStencil     : 1; ///< Flag indicates this depth has no separate stencil
-        UINT_32 display       : 1; ///< Flag indicates this should match display controller req.
-        UINT_32 opt4Space     : 1; ///< Flag indicates this surface should be optimized for space
-                                   ///  i.e. save some memory but may lose performance
-        UINT_32 prt           : 1; ///< Flag for partially resident texture
-        UINT_32 qbStereo      : 1; ///< Quad buffer stereo surface
-        UINT_32 pow2Pad       : 1; ///< SI: Pad to pow2, must set for mipmap (include level0)
-        UINT_32 interleaved   : 1; ///< Special flag for interleaved YUV surface padding
-        UINT_32 degrade4Space : 1; ///< Degrade base level's tile mode to save memory
-        UINT_32 tcCompatible  : 1; ///< Flag indicates surface needs to be shader readable
-        UINT_32 dispTileType  : 1; ///< NI: force display Tiling for 128 bit shared resoruce
-        UINT_32 dccCompatible : 1; ///< VI: whether to support dcc fast clear
-        UINT_32 czDispCompatible: 1; ///< SI+: CZ family (Carrizo) has a HW bug needs special alignment.
-                                     ///<      This flag indicates we need to follow the alignment with
-                                     ///<      CZ families or other ASICs under PX configuration + CZ.
-        UINT_32 nonSplit      : 1; ///< CI: depth texture should not be split
-        UINT_32 reserved      : 9; ///< Reserved bits
+        UINT_32 color           : 1; ///< Flag indicates this is a color buffer
+        UINT_32 depth           : 1; ///< Flag indicates this is a depth/stencil buffer
+        UINT_32 stencil         : 1; ///< Flag indicates this is a stencil buffer
+        UINT_32 texture         : 1; ///< Flag indicates this is a texture
+        UINT_32 cube            : 1; ///< Flag indicates this is a cubemap
+        UINT_32 volume          : 1; ///< Flag indicates this is a volume texture
+        UINT_32 fmask           : 1; ///< Flag indicates this is an fmask
+        UINT_32 cubeAsArray     : 1; ///< Flag indicates if treat cubemap as arrays
+        UINT_32 compressZ       : 1; ///< Flag indicates z buffer is compressed
+        UINT_32 overlay         : 1; ///< Flag indicates this is an overlay surface
+        UINT_32 noStencil       : 1; ///< Flag indicates this depth has no separate stencil
+        UINT_32 display         : 1; ///< Flag indicates this should match display controller req.
+        UINT_32 opt4Space       : 1; ///< Flag indicates this surface should be optimized for space
+                                     ///  i.e. save some memory but may lose performance
+        UINT_32 prt             : 1; ///< Flag for partially resident texture
+        UINT_32 qbStereo        : 1; ///< Quad buffer stereo surface
+        UINT_32 pow2Pad         : 1; ///< SI: Pad to pow2, must set for mipmap (include level0)
+        UINT_32 interleaved     : 1; ///< Special flag for interleaved YUV surface padding
+        UINT_32 degrade4Space   : 1; ///< Degrade base level's tile mode to save memory
+        UINT_32 tcCompatible    : 1; ///< Flag indicates surface needs to be shader readable
+        UINT_32 dispTileType    : 1; ///< NI: force display Tiling for 128 bit shared resoruce
+        UINT_32 dccCompatible   : 1; ///< VI: whether to support dcc fast clear
+        UINT_32 czDispCompatible: 1; ///< SI+: CZ family has a HW bug needs special alignment.
+                                     ///  This flag indicates we need to follow the alignment with
+                                     ///  CZ families or other ASICs under PX configuration + CZ.
+        UINT_32 nonSplit        : 1; ///< CI: depth texture should not be split
+        UINT_32 reserved        : 9; ///< Reserved bits
     };
 
     UINT_32 value;
 } ADDR_SURFACE_FLAGS;
 
 /**
 ***************************************************************************************************
 *   ADDR_COMPUTE_SURFACE_INFO_INPUT
 *
 *   @brief
@@ -475,32 +466,23 @@ typedef struct _ADDR_COMPUTE_SURFACE_INFO_INPUT
 {
     UINT_32             size;               ///< Size of this structure in bytes
 
     AddrTileMode        tileMode;           ///< Tile mode
     AddrFormat          format;             ///< If format is set to valid one, bpp/width/height
                                             ///  might be overwritten
     UINT_32             bpp;                ///< Bits per pixel
     UINT_32             numSamples;         ///< Number of samples
     UINT_32             width;              ///< Width, in pixels
     UINT_32             height;             ///< Height, in pixels
-    UINT_32             numSlices;          ///< Number surface slice/depth,
-                                            ///  Note:
-                                            ///  For cubemap, driver clients usually set numSlices
-                                            ///  to 1 in per-face calc.
-                                            ///  For 7xx and above, we need pad faces as slices.
-                                            ///  In this case, clients should set numSlices to 6 and
-                                            ///  this is also can be turned off by createFlags when
-                                            ///  calling AddrCreate
+    UINT_32             numSlices;          ///< Number of surface slices or depth
     UINT_32             slice;              ///< Slice index
-    UINT_32             mipLevel;           ///< Current mipmap level.
-                                            ///  Padding/tiling have different rules for level0 and
-                                            ///  sublevels
+    UINT_32             mipLevel;           ///< Current mipmap level
     ADDR_SURFACE_FLAGS  flags;              ///< Surface type flags
     UINT_32             numFrags;           ///< Number of fragments, leave it zero or the same as
                                             ///  number of samples for normal AA; Set it to the
                                             ///  number of fragments for EQAA
     /// r800 and later HWL parameters
     // Needed by 2D tiling, for linear and 1D tiling, just keep them 0's
     ADDR_TILEINFO*      pTileInfo;          ///< 2D tile parameters. Set to 0 to default/calculate
     AddrTileType        tileType;           ///< Micro tiling type, not needed when tileIndex != -1
     INT_32              tileIndex;          ///< Tile index, MUST be -1 if you don't want to use it
                                             ///  while the global useTileIndex is set to 1
-- 
2.7.4



More information about the mesa-dev mailing list