intel / gmmlib

Other
159 stars 87 forks source link

GmmGen9Texture overlapping MSAA.NumSamples comparisons #87

Closed edwarddavidbaker closed 3 years ago

edwarddavidbaker commented 3 years ago

Sorry about bringing this up again. This is a copy of issue https://github.com/intel/gmmlib/issues/78 . When building gmmlib in Chrome OS the following warning is present.

Source/GmmLib/Texture/GmmGen9Texture.cpp:595:46: warning: overlapping comparisons always evaluate to false [-Wtautological-overlap-compare]
           ((pTexInfo->MSAA.NumSamples == 8) && (pTexInfo->MSAA.NumSamples == 16)) &&
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MSAA.NumSamples can not be both 8 and 16 at the same time forcing the entire if() to always skip.

  1. From the file history https://github.com/intel/gmmlib/commits/master/Source/GmmLib/Texture/GmmGen9Texture.cpp
    1. Warning originally addressed with f1fa9ea Fix Comparision overlap.
    2. Prior fix overwritten with cac1a15 Xe_HP_SDV Unembargoed.
edwarddavidbaker commented 3 years ago

Thanks John! Fixed in https://github.com/intel/gmmlib/commit/d84606bd4bb603119c15e01e24af9920e27ef704 .