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
This commit is contained in:
egdaniel 2016-08-17 06:26:16 -07:00 committed by Commit bot
parent 8ccc075a90
commit bf63e616a6
2 changed files with 11 additions and 7 deletions

View File

@ -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;

View File

@ -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