src/third_party/angle/src/libANGLE/renderer/vulkan/vk_utils.cpp
// Return the log of samples.  Assumes |sampleCount| is a power of 2.  The result can be used to
// index an array based on sample count.  See for example TextureVk::PerSampleCountArray.
Return the log of samples.  Assumes |sampleCount| is a power of 2.  The result can be used to
index an array based on sample count.
Return the log of samples . Assumes |sampleCount| is a power of 2 . The result can be used to index an array based on sample count .
size_t PackSampleCount(GLint sampleCount)
{
    if (sampleCount == 0)
    {
        sampleCount = 1;
    }
    ASSERT(sampleCount <= VK_SAMPLE_COUNT_16_BIT);
    ASSERT(gl::isPow2(sampleCount));
    return gl::ScanForward(static_cast<uint32_t>(sampleCount));
}
size_t PackSampleCount ( GLint sampleCount ) { if ( sampleCount == 0 ) { sampleCount = 1 ; } ASSERT ( sampleCount <= VK_SAMPLE_COUNT_16_BIT ) ; ASSERT ( gl :: isPow2 ( sampleCount ) ) ; return gl :: ScanForward ( static_cast < uint32_t > ( sampleCount ) ) ; }
Return the log of samples.
Return the log of samples .
// We currently only support up to 16xMSAA.