amd/addrlib: silence warnings
authorMarek Olšák <marek.olsak@amd.com>
Tue, 14 Mar 2017 21:32:25 +0000 (22:32 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 30 Mar 2017 12:44:33 +0000 (14:44 +0200)
src/amd/addrlib/addrinterface.cpp
src/amd/addrlib/gfx9/gfx9addrlib.cpp
src/amd/addrlib/gfx9/rbmap.cpp
src/amd/addrlib/r800/egbaddrlib.cpp

index 12985fc37b655e1e25ba64ced5acefd41b5dfae5..6a0c330dcc5848ca9097ec164331134464569508 100644 (file)
@@ -832,7 +832,7 @@ BOOL_32 ADDR_API ElemGetExportNorm(
     Addr::Lib* pLib = Lib::GetLib(hLib);
     BOOL_32 enabled = FALSE;
 
-    ADDR_E_RETURNCODE returnCode = ADDR_OK;
+    //ADDR_E_RETURNCODE returnCode = ADDR_OK;
 
     if (pLib != NULL)
     {
@@ -840,7 +840,7 @@ BOOL_32 ADDR_API ElemGetExportNorm(
     }
     else
     {
-        returnCode = ADDR_ERROR;
+        //returnCode = ADDR_ERROR;
     }
 
     ADDR_ASSERT(returnCode == ADDR_OK);
index c6e2b9720e8f25c1361a716a0231eb950d7835ab..fce0c000be932eb4c6c5d836d3806ac5d219619c 100644 (file)
@@ -1467,7 +1467,7 @@ VOID Gfx9Lib::GetMetaEquation(
 {
     UINT_32 numPipeTotalLog2 = GetPipeLog2ForMetaAddressing(metaFlag.pipeAligned, swizzleMode);
     UINT_32 pipeInterleaveLog2 = m_pipeInterleaveLog2;
-    UINT_32 blockSizeLog2 = GetBlockSizeLog2(swizzleMode);
+    //UINT_32 blockSizeLog2 = GetBlockSizeLog2(swizzleMode);
 
     // Get the correct data address and rb equation
     CoordEq dataEq;
@@ -1921,8 +1921,8 @@ UINT_32 Gfx9Lib::HwlGetEquationIndex(
             pMipInfo->mipOffsetZPixel = 0;
             pMipInfo->postSwizzleOffset = 0;
 
-            static const UINT_32 Prt_Xor_Gap =
-                static_cast<UINT_32>(ADDR_SW_64KB_Z_T) - static_cast<UINT_32>(ADDR_SW_64KB_Z);
+            /*static const UINT_32 Prt_Xor_Gap =
+                static_cast<UINT_32>(ADDR_SW_64KB_Z_T) - static_cast<UINT_32>(ADDR_SW_64KB_Z);*/
 
             for (UINT_32 i = 1; i < numMipLevels; i++)
             {
@@ -2159,7 +2159,7 @@ ADDR_E_RETURNCODE Gfx9Lib::HwlComputeBlock256Equation(
     // Post validation
     if (ret == ADDR_OK)
     {
-        Dim2d microBlockDim = Block256b[elementBytesLog2];
+        //Dim2d microBlockDim = Block256b[elementBytesLog2];
         ADDR_ASSERT((2u << GetMaxValidChannelIndex(pEquation->addr, 8, 0)) ==
                     (microBlockDim.w * (1 << elementBytesLog2)));
         ADDR_ASSERT((2u << GetMaxValidChannelIndex(pEquation->addr, 8, 1)) == microBlockDim.h);
@@ -2605,7 +2605,7 @@ BOOL_32 Gfx9Lib::HwlIsValidDisplaySwizzleMode(const ADDR2_COMPUTE_SURFACE_INFO_I
 {
     BOOL_32 support = FALSE;
 
-    const AddrResourceType resourceType = pIn->resourceType;
+    //const AddrResourceType resourceType = pIn->resourceType;
     const AddrSwizzleMode swizzleMode = pIn->swizzleMode;
 
     if (m_settings.isDce12)
index 470b9f37d7e839a59848c7b77492409e7a3f188a..789140d7c0e17070b62af8fc4005b8ced3821afc 100644 (file)
@@ -47,7 +47,7 @@ VOID RB_MAP::Get_Comp_Block_Screen_Space( CoordEq& addr, int bytes_log2, int* w,
     if( h ) *h = 0;
     if( d ) *d = 0;
     for( n=0; n<bytes_log2; n++ ) { // go up to the bytes_log2 bit
-        for( i=0; i<addr[n].getsize(); i++ ) {
+        for( i=0; (unsigned)i<addr[n].getsize(); i++ ) {
             char dim = addr[n][i].getdim();
             int ord = addr[n][i].getord();
             if( w && dim == 'x' && ord >= *w ) *w = ord+1;
@@ -685,7 +685,7 @@ RB_MAP::get_meta_eq( CoordEq& metaaddr,
 
     bool data_linear = ( data_type == DATA_COLOR1D || data_type == DATA_COLOR2D_LINEAR );
     bool is_color = ( data_linear || data_type == DATA_COLOR2D || data_type == DATA_COLOR3D_S || data_type == DATA_COLOR3D_Z || data_type == DATA_COLOR3D_D_NOT_USED );
-    bool is3d = ( data_type == DATA_COLOR3D_S || data_type == DATA_COLOR3D_Z || data_type == DATA_COLOR3D_D_NOT_USED );
+    //bool is3d = ( data_type == DATA_COLOR3D_S || data_type == DATA_COLOR3D_Z || data_type == DATA_COLOR3D_D_NOT_USED );
     bool is_thick = ( data_type == DATA_COLOR3D_S || data_type == DATA_COLOR3D_Z );
 
     bool is_fmask = (data_type == DATA_FMASK);
@@ -933,7 +933,7 @@ RB_MAP::get_meta_eq( CoordEq& metaaddr,
             if( cur_rbeq[j].remove( co ) ) {
                 // if we actually removed something from this bit, then add the remaining
                 // channel bits, as these can be removed for this bit
-                for( k=0; k<pipe_equation[i].getsize(); k++ ) {
+                for( k=0; (unsigned)k<pipe_equation[i].getsize(); k++ ) {
                     if( pipe_equation[i][k] != co ) {
                         cur_rbeq[j].add( pipe_equation[i][k] );
                     }
@@ -962,7 +962,7 @@ RB_MAP::get_meta_eq( CoordEq& metaaddr,
                 if( cur_rbeq[j].remove( co ) ) {
                     // if we actually removed something from this bit, then add the remaining
                     // rb bits, as these can be removed for this bit
-                    for( k=0; k<cur_rbeq[i].getsize(); k++ ) {
+                    for( k=0; (unsigned)k<cur_rbeq[i].getsize(); k++ ) {
                         if( cur_rbeq[i][k] != co ) {
                             cur_rbeq[j].add( cur_rbeq[i][k] );
                         }
@@ -1072,7 +1072,7 @@ RB_MAP::get_meta_addr_calc( int x, int y, int z, int s,
 
     CoordEq metaaddr;
 
-    bool se_affinity_enable = false;
+    //bool se_affinity_enable = false;
     //int max_pipe_bytes = std::max(1<<num_pipes_log2 * 1<<pipe_interleave_log2, 1024 * 1<<log2_element_bytes);
     //int max_banks_samples = std::max(1<<num_banks_log2, 1<<num_samples_log2);
     //int block_size_log2 = max(4096, max_pipe_bytes * max_bank_samples * 1<<num_ses_log2);
index 0cd27ada070412cc463e94de0b9c3ab8c407b40f..03f3a3146e4645ce1d8b06956762ece279fa4add 100644 (file)
@@ -978,7 +978,7 @@ BOOL_32 EgBasedLib::SanityCheckMacroTiled(
     ) const
 {
     BOOL_32 valid       = TRUE;
-    UINT_32 numPipes    = HwlGetPipes(pTileInfo);
+    //UINT_32 numPipes    = HwlGetPipes(pTileInfo);
 
     switch (pTileInfo->banks)
     {
@@ -4748,7 +4748,7 @@ UINT_64 EgBasedLib::HwlGetSizeAdjustmentMicroTiled(
     ) const
 {
     UINT_64 logicalSliceSize;
-    UINT_64 physicalSliceSize;
+    //UINT_64 physicalSliceSize;
 
     UINT_32 pitch   = *pPitch;
     UINT_32 height  = *pHeight;
@@ -4757,7 +4757,7 @@ UINT_64 EgBasedLib::HwlGetSizeAdjustmentMicroTiled(
     logicalSliceSize = BITS_TO_BYTES(static_cast<UINT_64>(pitch) * height * bpp * numSamples);
 
     // Physical slice: multiplied by thickness
-    physicalSliceSize =  logicalSliceSize * thickness;
+    //physicalSliceSize =  logicalSliceSize * thickness;
 
     //
     // R800 will always pad physical slice size to baseAlign which is pipe_interleave_bytes