Quick fix for warning in vktSampleVerifier.cpp
authorCollin Baker <collinbaker@google.com>
Tue, 9 Aug 2016 19:42:15 +0000 (12:42 -0700)
committerCollin Baker <collinbaker@google.com>
Tue, 9 Aug 2016 19:46:04 +0000 (19:46 +0000)
Change-Id: I5deb847a65c95939492af54b2ceb9b1e29929f95

external/vulkancts/modules/vulkan/texture_filtering/vktSampleVerifier.cpp

index 15ab678..dd01b1a 100644 (file)
@@ -676,8 +676,8 @@ bool SampleVerifier::verifySampleFiltered (const Vec4&                      result,
        deInt32                 lodStepsMin;
        deInt32                 lodStepsMax;
 
-       deUint8                 levels;
-       deUint8                 levelLo;
+       int                             levels;
+       int                             levelLo;
 
        if (levelHi == m_imParams.levels - 1 || mipmapFilter == VK_SAMPLER_MIPMAP_MODE_NEAREST)
        {
@@ -688,7 +688,7 @@ bool SampleVerifier::verifySampleFiltered (const Vec4&                      result,
        else
        {
                levels = 2;
-               levelLo = (deUint8) 1 + levelHi;
+               levelLo = 1 + levelHi;
        }
 
        getWeightStepBounds(unnormalizedCoordHi, weightStepsMin[0], weightStepsMax[0], texelBase[0]);
@@ -732,7 +732,7 @@ bool SampleVerifier::verifySampleFiltered (const Vec4&                      result,
 
                        if (mipmapFilter == VK_SAMPLER_MIPMAP_MODE_LINEAR)
                        {
-                               idealSampleLo = getFilteredSample(texelBase[1], roundedWeightsLo, layer, levelLo);
+                               idealSampleLo = getFilteredSample(texelBase[1], roundedWeightsLo, layer, (deUint8)levelLo);
 
                                report << "Ideal lo sample: " << idealSampleLo << "\n";
                        }
@@ -746,7 +746,7 @@ bool SampleVerifier::verifySampleFiltered (const Vec4&                      result,
 
                        if (mipmapFilter == VK_SAMPLER_MIPMAP_MODE_LINEAR)
                        {
-                               idealSampleLo = fetchTexel(floor(unnormalizedCoordLo).cast<deInt32>(), layer, levelLo, VK_FILTER_NEAREST);
+                               idealSampleLo = fetchTexel(floor(unnormalizedCoordLo).cast<deInt32>(), layer, (deUint8)levelLo, VK_FILTER_NEAREST);
 
                                report << "Ideal lo sample: " << idealSampleLo << "\n";
                        }