Remove unused GrVkFormatColorTypePairIsValid

Change-Id: Id3d6ab46af71b2966cb55b65138f2d5e9129ca4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282848
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This commit is contained in:
Brian Salomon 2020-04-10 11:13:29 -04:00 committed by Skia Commit-Bot
parent 6341d92280
commit a774193f70
2 changed files with 0 additions and 43 deletions

View File

@ -12,42 +12,6 @@
#include "src/gpu/vk/GrVkGpu.h"
#include "src/sksl/SkSLCompiler.h"
#ifdef SK_DEBUG
bool GrVkFormatColorTypePairIsValid(VkFormat format, GrColorType colorType) {
switch (format) {
case VK_FORMAT_R8G8B8A8_UNORM: return GrColorType::kRGBA_8888 == colorType ||
GrColorType::kRGB_888x == colorType;
case VK_FORMAT_B8G8R8A8_UNORM: return GrColorType::kBGRA_8888 == colorType;
case VK_FORMAT_R8G8B8A8_SRGB: return GrColorType::kRGBA_8888_SRGB == colorType;
case VK_FORMAT_R8G8B8_UNORM: return GrColorType::kRGB_888x == colorType;
case VK_FORMAT_R8G8_UNORM: return GrColorType::kRG_88 == colorType;
case VK_FORMAT_A2B10G10R10_UNORM_PACK32: return GrColorType::kRGBA_1010102 == colorType;
case VK_FORMAT_R5G6B5_UNORM_PACK16: return GrColorType::kBGR_565 == colorType;
// R4G4B4A4 is not required to be supported so we actually
// store RGBA_4444 data as B4G4R4A4.
case VK_FORMAT_B4G4R4A4_UNORM_PACK16: return GrColorType::kABGR_4444 == colorType;
case VK_FORMAT_R4G4B4A4_UNORM_PACK16: return GrColorType::kABGR_4444 == colorType;
case VK_FORMAT_R8_UNORM: return GrColorType::kAlpha_8 == colorType ||
GrColorType::kGray_8 == colorType;
case VK_FORMAT_R16G16B16A16_SFLOAT: return GrColorType::kRGBA_F16 == colorType ||
GrColorType::kRGBA_F16_Clamped == colorType;
case VK_FORMAT_R16_SFLOAT: return GrColorType::kAlpha_F16 == colorType;
case VK_FORMAT_R16_UNORM: return GrColorType::kAlpha_16 == colorType;
case VK_FORMAT_R16G16_UNORM: return GrColorType::kRG_1616 == colorType;
case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM: return GrColorType::kRGB_888x == colorType;
case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: return GrColorType::kRGB_888x == colorType;
case VK_FORMAT_R16G16B16A16_UNORM: return GrColorType::kRGBA_16161616 == colorType;
case VK_FORMAT_R16G16_SFLOAT: return GrColorType::kRG_F16 == colorType;
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: return GrColorType::kRGB_888x == colorType;
case VK_FORMAT_BC1_RGB_UNORM_BLOCK: return GrColorType::kRGB_888x == colorType;
case VK_FORMAT_BC1_RGBA_UNORM_BLOCK: return GrColorType::kRGBA_8888 == colorType;
default: return false;
}
SkUNREACHABLE;
}
#endif
bool GrVkFormatIsSupported(VkFormat format) {
switch (format) {
case VK_FORMAT_R8G8B8A8_UNORM:

View File

@ -78,13 +78,6 @@ static constexpr uint32_t GrVkFormatChannels(VkFormat vkFormat) {
bool GrVkFormatNeedsYcbcrSampler(VkFormat format);
#ifdef SK_DEBUG
/**
* Returns true if the passed in VkFormat and GrColorType are compatible with each other.
*/
bool GrVkFormatColorTypePairIsValid(VkFormat, GrColorType);
#endif
bool GrSampleCountToVkSampleCount(uint32_t samples, VkSampleCountFlagBits* vkSamples);
bool GrCompileVkShaderModule(GrVkGpu* gpu,