intel / gmmlib

Other
158 stars 87 forks source link

GmmGen9Texture overlapping MSAA.NumSamples comparisons #78

Closed edwarddavidbaker closed 3 years ago

edwarddavidbaker commented 3 years ago

Hi, When building 20.4.1 for Chrome OS the following warning is observed.

Source/GmmLib/Texture/GmmGen9Texture.cpp:588: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.

edwarddavidbaker commented 3 years ago

Fixed in https://github.com/intel/gmmlib/commit/f1fa9eac06b92805f2f5670a9b2fbb923a557db6 .