From: egdaniel Date: Wed, 17 Aug 2016 13:26:16 +0000 (-0700) Subject: Add mssa configs for vulkan, and simple bug fix X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~116^2~175 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf63e616a67e8992e150d982cfcd6403994f39ad;p=platform%2Fupstream%2FlibSkiaSharp.git Add mssa configs for vulkan, and simple bug fix BUG=skia:5127 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2251473002 Review-Url: https://codereview.chromium.org/2251473002 --- diff --git a/src/gpu/vk/GrVkUtil.cpp b/src/gpu/vk/GrVkUtil.cpp index ffbad25..e0d5daf 100644 --- a/src/gpu/vk/GrVkUtil.cpp +++ b/src/gpu/vk/GrVkUtil.cpp @@ -231,19 +231,19 @@ bool GrSampleCountToVkSampleCount(uint32_t samples, VkSampleCountFlagBits* vkSam *vkSamples = VK_SAMPLE_COUNT_2_BIT; return true; case 4: - *vkSamples = VK_SAMPLE_COUNT_2_BIT; + *vkSamples = VK_SAMPLE_COUNT_4_BIT; return true; case 8: - *vkSamples = VK_SAMPLE_COUNT_2_BIT; + *vkSamples = VK_SAMPLE_COUNT_8_BIT; return true; case 16: - *vkSamples = VK_SAMPLE_COUNT_2_BIT; + *vkSamples = VK_SAMPLE_COUNT_16_BIT; return true; case 32: - *vkSamples = VK_SAMPLE_COUNT_2_BIT; + *vkSamples = VK_SAMPLE_COUNT_32_BIT; return true; case 64: - *vkSamples = VK_SAMPLE_COUNT_2_BIT; + *vkSamples = VK_SAMPLE_COUNT_64_BIT; return true; default: return false; diff --git a/tools/flags/SkCommonFlagsConfig.cpp b/tools/flags/SkCommonFlagsConfig.cpp index 215fbdb..e25ccd3 100644 --- a/tools/flags/SkCommonFlagsConfig.cpp +++ b/tools/flags/SkCommonFlagsConfig.cpp @@ -127,6 +127,8 @@ static const char configExtendedHelp[] = #ifdef SK_VULKAN "\tvk \t= gpu(api=vulkan)\n" "\tvksrgb \t= gpu(api=vulkan,color=srgb)\n" + "\tvkmsaa4 \t= gpu(api=gl,samples=4)\n" + "\tvkmsaa16 \t= gpu(api=gl,samples=16)\n" #endif #endif ; @@ -179,8 +181,10 @@ static const struct { , { "mesa", "gpu", "api=mesa" } #endif #ifdef SK_VULKAN - , { "vk", "gpu", "api=vulkan" } - , { "vksrgb", "gpu", "api=vulkan,color=srgb" } + , { "vk", "gpu", "api=vulkan" } + , { "vksrgb", "gpu", "api=vulkan,color=srgb" } + , { "vkmsaa4", "gpu", "api=vulkan,samples=4" } + , { "vkmsaa16", "gpu", "api=vulkan,samples=16" } #endif #else