38#ifdef SK_BUILD_FOR_ANDROID
39#include <sys/system_properties.h>
44 VkPhysicalDevice physDev,
46 uint32_t instanceVersion,
47 uint32_t physicalDeviceVersion,
85 this->init(contextOptions, vkInterface, physDev, features, physicalDeviceVersion, extensions,
94enum class FormatCompatibilityClass {
116 return FormatCompatibilityClass::k32_4_1;
119 return FormatCompatibilityClass::k8_1_1;
128 return FormatCompatibilityClass::k16_2_1;
132 return FormatCompatibilityClass::k64_8_1;
135 return FormatCompatibilityClass::k24_3_1;
138 return FormatCompatibilityClass::k10x6_64_6_1;
141 return FormatCompatibilityClass::kETC2_RGB_8_16;
144 return FormatCompatibilityClass::kBC1_RGB_8_16_1;
147 return FormatCompatibilityClass::kBC1_RGBA_8_16;
155 VkFormat srcFormat,
int srcSampleCnt,
bool srcHasYcbcr)
const {
156 if ((dstSampleCnt > 1 || srcSampleCnt > 1) && dstSampleCnt != srcSampleCnt) {
160 if (dstHasYcbcr || srcHasYcbcr) {
170 bool dstHasYcbcr,
VkFormat srcFormat,
int srcSampleCnt,
171 bool srcIsLinear,
bool srcHasYcbcr)
const {
181 if (dstSampleCnt > 1 || srcSampleCnt > 1) {
185 if (dstHasYcbcr || srcHasYcbcr) {
193 VkFormat srcFormat,
int srcSampleCnt,
bool srcHasYcbcr)
const {
195 if (srcSampleCnt <= 1) {
200 if (dstSampleCnt > 1) {
205 if (srcFormat != dstFormat) {
209 if (dstHasYcbcr || srcHasYcbcr) {
218 if (src->isProtected() == GrProtected::kYes && dst->isProtected() != GrProtected::kYes) {
226 bool srcIsLinear =
false;
227 bool dstIsLinear =
false;
229 int dstSampleCnt = 0;
230 int srcSampleCnt = 0;
235 if (rtProxy->wrapsVkSecondaryCB()) {
239 rtProxy->supportsVkInputAttachment()) {
242 dstSampleCnt = rtProxy->numSamples();
249 if (rtProxy->wrapsVkSecondaryCB()) {
253 rtProxy->supportsVkInputAttachment()) {
256 srcSampleCnt = rtProxy->numSamples();
262 bool dstHasYcbcr =
false;
264 if (ycbcr->isValid()) {
269 bool srcHasYcbcr =
false;
271 if (ycbcr->isValid()) {
282 const bool copyScales = srcRect.
size() != dstRect.
size();
283 if (!copyScales && (this->
canCopyImage(dstFormat, dstSampleCnt, dstHasYcbcr,
284 srcFormat, srcSampleCnt, srcHasYcbcr) ||
286 srcFormat, srcSampleCnt, srcHasYcbcr))) {
289 return this->
canCopyAsBlit(dstFormat, dstSampleCnt, dstIsLinear, dstHasYcbcr,
290 srcFormat, srcSampleCnt, srcIsLinear, srcHasYcbcr);
296 VkPhysicalDevice physDev,
298 uint32_t physicalDeviceVersion,
302 GR_VK_CALL(vkInterface, GetPhysicalDeviceProperties(physDev, &properties));
304#if defined(GR_TEST_UTILS)
309 GR_VK_CALL(vkInterface, GetPhysicalDeviceMemoryProperties(physDev, &memoryProperties));
314 fSupportsSwapchain =
true;
319 fSupportsPhysicalDeviceProperties2 =
true;
324 fSupportsMemoryRequirements2 =
true;
329 fSupportsBindMemory2 =
true;
334 fSupportsMaintenance1 =
true;
339 fSupportsMaintenance2 =
true;
344 fSupportsMaintenance3 =
true;
349 this->supportsMemoryRequirements2())) {
350 fSupportsDedicatedAllocation =
true;
355 this->supportsPhysicalDeviceProperties2() &&
357 this->supportsDedicatedAllocation())) {
358 fSupportsExternalMemory =
true;
361#ifdef SK_BUILD_FOR_ANDROID
367 this->supportsExternalMemory() &&
368 this->supportsBindMemory2()) {
369 fSupportsAndroidHWBExternalMemory =
true;
378 if (ycbcrFeatures && ycbcrFeatures->samplerYcbcrConversion &&
381 this->supportsMaintenance1() && this->supportsBindMemory2() &&
382 this->supportsMemoryRequirements2() && this->supportsPhysicalDeviceProperties2()))) {
383 fSupportsYcbcrConversion =
true;
390 if ((isProtected == GrProtected::kYes) &&
393 fAvoidUpdateBuffers =
true;
394 fShouldAlwaysUseDedicatedImageMemory =
true;
398 fSupportsDRMFormatModifiers =
true;
402 fSupportsDeviceFaultInfo =
true;
418 if (kARM_VkVendor == properties.
vendorID) {
428 this->initGrCaps(vkInterface, physDev, properties, memoryProperties, features, extensions);
429 this->initShaderCaps(properties, features);
431 if (kQualcomm_VkVendor == properties.
vendorID) {
439 if (properties.
vendorID == kNvidia_VkVendor || properties.
vendorID == kAMD_VkVendor) {
442 fGpuOnlyBuffersMorePerformant =
true;
449 fShouldPersistentlyMapCpuToGpuBuffers =
false;
452 if (kQualcomm_VkVendor == properties.
vendorID) {
455 fAvoidUpdateBuffers =
true;
459 if (properties.
vendorID == kQualcomm_VkVendor) {
466 SkASSERT(fMaxDrawIndirectDrawCount == 1 || features.features.multiDrawIndirect);
469#ifdef SK_BUILD_FOR_UNIX
470 if (kNvidia_VkVendor == properties.
vendorID) {
472 fShouldAlwaysUseDedicatedImageMemory =
true;
476 this->initFormatTable(contextOptions, vkInterface, physDev, properties, features, extensions);
477 this->initStencilFormat(vkInterface, physDev);
480 fMaxPerPoolCachedSecondaryCommandBuffers =
485 this->applyDriverCorrectnessWorkarounds(properties);
492#if defined(SK_BUILD_FOR_WIN)
493 if (kNvidia_VkVendor == properties.
vendorID || kIntel_VkVendor == properties.
vendorID) {
494 fMustSyncCommandBuffersWithQueue =
true;
496#elif defined(SK_BUILD_FOR_ANDROID)
497 if (kImagination_VkVendor == properties.
vendorID) {
498 fMustSyncCommandBuffersWithQueue =
true;
505 int androidAPIVersion = 0;
506#if defined(SK_BUILD_FOR_ANDROID)
507 char androidAPIVersionStr[PROP_VALUE_MAX];
508 int strLength = __system_property_get(
"ro.build.version.sdk", androidAPIVersionStr);
511 androidAPIVersion = (strLength == 0) ? 0 : atoi(androidAPIVersionStr);
516 if (androidAPIVersion <= 28) {
522 if (kARM_VkVendor == properties.
vendorID && androidAPIVersion <= 28) {
523 fShouldAlwaysUseDedicatedImageMemory =
true;
528 if (kARM_VkVendor == properties.
vendorID && androidAPIVersion <= 28) {
529 fPreferPrimaryOverSecondaryCommandBuffers =
false;
539 if (properties.
vendorID == kQualcomm_VkVendor && androidAPIVersion <= 28) {
541 fSupportsDiscardableMSAAForDMSAA =
false;
546 if (kARM_VkVendor == properties.
vendorID) {
553 if (kQualcomm_VkVendor == properties.
vendorID || kAMD_VkVendor == properties.
vendorID) {
554 fMustInvalidatePrimaryCmdBufferStateAfterClearAttachments =
true;
561 if (properties.
vendorID == kQualcomm_VkVendor ||
562 properties.
vendorID == kARM_VkVendor ||
563 (properties.
vendorID == kGoogle_VkVendor &&
564 properties.
deviceID == kSwiftshader_DeviceID)) {
565 fMustLoadFullImageWithDiscardableMSAA =
true;
573 if (properties.
vendorID == kGoogle_VkVendor && properties.
deviceID == kSwiftshader_DeviceID) {
581 if (kARM_VkVendor == properties.
vendorID) {
586 if (kAMD_VkVendor == properties.
vendorID) {
592 if (kQualcomm_VkVendor == properties.
vendorID) {
596#ifdef SK_BUILD_FOR_WIN
607 if (kIntel_VkVendor == properties.
vendorID &&
608 GetIntelGen(GetIntelGPUType(properties.
deviceID)) >= 9) {
615 if (properties.
vendorID == kARM_VkVendor && androidAPIVersion <= 28) {
623 if (kImagination_VkVendor == properties.
vendorID) {
629 if (kARM_VkVendor == properties.
vendorID) {
635 VkPhysicalDevice physDev,
644 static const uint32_t kMaxVertexAttributes = 64;
646 kMaxVertexAttributes);
680 this->supportsPhysicalDeviceProperties2()) {
685 blendProps.
pNext =
nullptr;
689 props.
pNext = &blendProps;
691 GR_VK_CALL(vkInterface, GetPhysicalDeviceProperties2(physDev, &props));
701 if (blendFeatures && blendFeatures->advancedBlendCoherentOperations ==
VK_TRUE) {
709 if (kARM_VkVendor == properties.
vendorID) {
755 VkPhysicalDevice physDev,
759 GR_VK_CALL(interface, GetPhysicalDeviceFormatProperties(physDev,
format, &props));
764 VkPhysicalDevice physDev) {
818 for (
size_t i = 0; i < kNumVkFormats; ++i) {
819 const auto& formatInfo = fFormatTable[i];
820 for (
int j = 0; j < formatInfo.fColorTypeInfoCount; ++j) {
821 const auto& ctInfo = formatInfo.fColorTypeInfos[j];
823 !
SkToBool(ctInfo.fFlags & ColorTypeInfo::kWrappedOnly_Flag)) {
825 for (
auto it = formats.begin(); it != formats.end(); ++it) {
836 for (
auto it = formats.begin(); it != formats.end(); ++it) {
837 const auto&
info = this->getFormatInfo(*it);
838 for (
int i = 0; i <
info.fColorTypeInfoCount; ++i) {
840 fColorTypeToFormatTable[idx] = *it;
847const GrVkCaps::FormatInfo& GrVkCaps::getFormatInfo(
VkFormat format)
const {
849 return nonConstThis->getFormatInfo(
format);
853 static_assert(std::size(
kVkFormats) == GrVkCaps::kNumVkFormats,
854 "Size of VkFormats array must match static value in header");
855 for (
size_t i = 0; i < std::size(
kVkFormats); ++i) {
857 return fFormatTable[i];
860 static FormatInfo kInvalidFormat;
861 return kInvalidFormat;
866 VkPhysicalDevice physDev,
870 static_assert(std::size(
kVkFormats) == GrVkCaps::kNumVkFormats,
871 "Size of VkFormats array must match static value in header");
880 info.init(contextOptions, interface, physDev, properties,
format);
881 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
882 info.fColorTypeInfoCount = 2;
883 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
888 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
889 ctInfo.fColorType = ct;
890 ctInfo.fTransferColorType = ct;
891 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
896 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
897 ctInfo.fColorType = ct;
898 ctInfo.fTransferColorType = ct;
899 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag;
909 info.init(contextOptions, interface, physDev, properties,
format);
910 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
911 info.fColorTypeInfoCount = 3;
912 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
917 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
918 ctInfo.fColorType = ct;
919 ctInfo.fTransferColorType = ct;
920 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
925 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
926 ctInfo.fColorType = ct;
927 ctInfo.fTransferColorType = ct;
928 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
935 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
936 ctInfo.fColorType = ct;
937 ctInfo.fTransferColorType = ct;
938 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag;
947 info.init(contextOptions, interface, physDev, properties,
format);
948 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
949 info.fColorTypeInfoCount = 2;
950 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
955 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
956 ctInfo.fColorType = ct;
957 ctInfo.fTransferColorType = ct;
958 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
964 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
965 ctInfo.fColorType = ct;
967 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag;
976 info.init(contextOptions, interface, physDev, properties,
format);
977 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
978 info.fColorTypeInfoCount = 1;
979 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
984 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
985 ctInfo.fColorType = ct;
986 ctInfo.fTransferColorType = ct;
987 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
995 info.init(contextOptions, interface, physDev, properties,
format);
996 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
997 info.fColorTypeInfoCount = 2;
998 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1003 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1004 ctInfo.fColorType = ct;
1005 ctInfo.fTransferColorType = ct;
1006 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1012 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1013 ctInfo.fColorType = ct;
1015 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag;
1023 info.init(contextOptions, interface, physDev, properties,
format);
1024 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1025 info.fColorTypeInfoCount = 2;
1026 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1031 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1032 ctInfo.fColorType = ct;
1033 ctInfo.fTransferColorType = ct;
1034 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1039 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1040 ctInfo.fColorType = ct;
1041 ctInfo.fTransferColorType = ct;
1042 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1050 info.init(contextOptions, interface, physDev, properties,
format);
1051 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1052 info.fColorTypeInfoCount = 1;
1053 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1058 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1059 ctInfo.fColorType = ct;
1060 ctInfo.fTransferColorType = ct;
1061 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1071 info.init(contextOptions, interface, physDev, properties,
format);
1072 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1073 info.fColorTypeInfoCount = 1;
1074 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1079 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1080 ctInfo.fColorType = ct;
1083 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1091 info.init(contextOptions, interface, physDev, properties,
format);
1092 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1093 info.fColorTypeInfoCount = 1;
1094 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1099 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1100 ctInfo.fColorType = ct;
1101 ctInfo.fTransferColorType = ct;
1102 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1110 info.init(contextOptions, interface, physDev, properties,
format);
1111 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1112 info.fColorTypeInfoCount = 1;
1113 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1118 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1119 ctInfo.fColorType = ct;
1120 ctInfo.fTransferColorType = ct;
1121 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1129 info.init(contextOptions, interface, physDev, properties,
format);
1130 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1131 info.fColorTypeInfoCount = 1;
1132 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1137 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1138 ctInfo.fColorType = ct;
1139 ctInfo.fTransferColorType = ct;
1140 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1145 bool supportsRGBA10x6 =
false;
1147 auto rgba10x6Feature =
1148 skgpu::GetExtensionFeatureStruct<VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT>(
1153 supportsRGBA10x6 = rgba10x6Feature && rgba10x6Feature->formatRgba10x6WithoutYCbCrSampler;
1157 if (supportsRGBA10x6) {
1160 info.init(contextOptions, interface, physDev, properties,
format);
1161 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1162 info.fColorTypeInfoCount = 1;
1163 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1168 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1169 ctInfo.fColorType = ct;
1170 ctInfo.fTransferColorType = ct;
1171 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1180 info.init(contextOptions, interface, physDev, properties,
format);
1181 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1182 info.fColorTypeInfoCount = 1;
1183 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1188 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1189 ctInfo.fColorType = ct;
1190 ctInfo.fTransferColorType = ct;
1191 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1202 info.init(contextOptions, interface, physDev, properties,
format);
1203 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1204 info.fColorTypeInfoCount = 1;
1205 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1210 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1211 ctInfo.fColorType = ct;
1212 ctInfo.fTransferColorType = ct;
1213 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1221 info.init(contextOptions, interface, physDev, properties,
format);
1222 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1223 info.fColorTypeInfoCount = 1;
1224 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1229 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1230 ctInfo.fColorType = ct;
1231 ctInfo.fTransferColorType = ct;
1232 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1240 info.init(contextOptions, interface, physDev, properties,
format);
1241 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1242 info.fColorTypeInfoCount = 1;
1243 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1248 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1249 ctInfo.fColorType = ct;
1250 ctInfo.fTransferColorType = ct;
1251 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1261 info.init(contextOptions, interface, physDev, properties,
format);
1262 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1263 info.fColorTypeInfoCount = 1;
1264 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1269 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1270 ctInfo.fColorType = ct;
1271 ctInfo.fTransferColorType = ct;
1272 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1280 info.init(contextOptions, interface, physDev, properties,
format);
1281 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1282 info.fColorTypeInfoCount = 1;
1283 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1288 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1289 ctInfo.fColorType = ct;
1290 ctInfo.fTransferColorType = ct;
1291 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1299 info.init(contextOptions, interface, physDev, properties,
format);
1300 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1301 info.fColorTypeInfoCount = 1;
1302 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1307 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1308 ctInfo.fColorType = ct;
1309 ctInfo.fTransferColorType = ct;
1310 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
1318 if (fSupportsYcbcrConversion) {
1319 info.init(contextOptions, interface, physDev, properties,
format);
1321 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1322 info.fColorTypeInfoCount = 1;
1323 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1328 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1329 ctInfo.fColorType = ct;
1330 ctInfo.fTransferColorType = ct;
1331 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kWrappedOnly_Flag;
1339 if (fSupportsYcbcrConversion) {
1340 info.init(contextOptions, interface, physDev, properties,
format);
1342 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1343 info.fColorTypeInfoCount = 1;
1344 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1349 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1350 ctInfo.fColorType = ct;
1351 ctInfo.fTransferColorType = ct;
1352 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kWrappedOnly_Flag;
1360 if (fSupportsYcbcrConversion) {
1361 info.init(contextOptions, interface, physDev, properties,
format);
1363 if (
SkToBool(
info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
1364 info.fColorTypeInfoCount = 1;
1365 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
1370 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
1371 ctInfo.fColorType = ct;
1372 ctInfo.fTransferColorType = ct;
1373 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kWrappedOnly_Flag;
1381 info.init(contextOptions, interface, physDev, properties,
format);
1390 info.init(contextOptions, interface, physDev, properties,
format);
1399 info.init(contextOptions, interface, physDev, properties,
format);
1457void GrVkCaps::FormatInfo::initSampleCounts(
const GrContextOptions& contextOptions,
1459 VkPhysicalDevice physDev,
1467 GR_VK_CALL(interface, GetPhysicalDeviceImageFormatProperties(physDev,
1476 fColorSampleCounts.push_back(1);
1478 if (kImagination_VkVendor == physProps.
vendorID) {
1482 if (kIntel_VkVendor == physProps.
vendorID) {
1483 if (GetIntelGen(GetIntelGPUType(physProps.
deviceID)) < 12 ||
1490 fColorSampleCounts.push_back(2);
1493 fColorSampleCounts.push_back(4);
1496 fColorSampleCounts.push_back(8);
1499 fColorSampleCounts.push_back(16);
1507 VkPhysicalDevice physDev,
1512 GR_VK_CALL(interface, GetPhysicalDeviceFormatProperties(physDev,
format, &props));
1515 if (fOptimalFlags & kRenderable_Flag) {
1516 this->initSampleCounts(contextOptions, interface, physDev, properties,
format);
1565 const FormatInfo&
info = this->getFormatInfo(
format);
1566 return SkToBool(FormatInfo::kTexturable_Flag &
info.fOptimalFlags);
1570 int sampleCount)
const {
1578 const auto&
info = this->getFormatInfo(vkFormat);
1579 if (!
SkToBool(
info.colorTypeFlags(ct) & ColorTypeInfo::kRenderable_Flag)) {
1608 requestedCount = std::max(1, requestedCount);
1610 const FormatInfo&
info = this->getFormatInfo(
format);
1612 int count =
info.fColorSampleCounts.size();
1618 if (1 == requestedCount) {
1619 SkASSERT(!
info.fColorSampleCounts.empty() &&
info.fColorSampleCounts[0] == 1);
1623 for (
int i = 0; i <
count; ++i) {
1624 if (
info.fColorSampleCounts[i] >= requestedCount) {
1625 return info.fColorSampleCounts[i];
1640 const FormatInfo&
info = this->getFormatInfo(
format);
1642 const auto&
table =
info.fColorSampleCounts;
1643 if (
table.empty()) {
1654 case 2:
return 2 * v;
1656 default:
return 4 * v;
1677 const auto&
info = this->getFormatInfo(vkFormat);
1678 for (
int i = 0; i <
info.fColorTypeInfoCount; ++i) {
1679 const auto& ctInfo =
info.fColorTypeInfos[i];
1680 if (ctInfo.fColorType == surfaceColorType) {
1681 return {ctInfo.fTransferColorType, offsetAlignment};
1693 auto texImage = tex->textureImage();
1698 if (texImage->ycbcrConversionInfo().isValid()) {
1706 }
else if (
auto rt =
surface->asRenderTarget()) {
1707 if (rt->numSamples() > 1) {
1716 const auto&
info = this->getFormatInfo(vkFormat);
1717 for (
int i = 0; i <
info.fColorTypeInfoCount; ++i) {
1718 if (
info.fColorTypeInfos[i].fColorType == surfaceColorType) {
1719 return info.fColorTypeInfos[i].fTransferColorType;
1726 if (
auto rt =
surface->asRenderTarget()) {
1731 auto texImage = tex->textureImage();
1736 if (texImage->ycbcrConversionInfo().isValid()) {
1760 const auto&
info = this->getFormatInfo(vkFormat);
1761 for (
int i = 0; i <
info.fColorTypeInfoCount; ++i) {
1762 if (
info.fColorTypeInfos[i].fColorType == ct) {
1802 switch (compressionType) {
1837 const auto&
info = this->getFormatInfo(vkFormat);
1838 for (
int i = 0; i <
info.fColorTypeInfoCount; ++i) {
1839 const auto& ctInfo =
info.fColorTypeInfos[i];
1841 return ctInfo.fReadSwizzle;
1844 SkDEBUGFAILF(
"Illegal color type (%d) and format (%d) combination.",
1853 const auto&
info = this->getFormatInfo(vkFormat);
1854 for (
int i = 0; i <
info.fColorTypeInfoCount; ++i) {
1855 const auto& ctInfo =
info.fColorTypeInfos[i];
1857 return ctInfo.fWriteSwizzle;
1860 SkDEBUGFAILF(
"Illegal color type (%d) and format (%d) combination.",
1888 return (uint64_t)vkFormat;
1912 const auto&
info = this->getFormatInfo(vkFormat);
1913 for (
int i = 0; i <
info.fColorTypeInfoCount; ++i) {
1914 const auto& ctInfo =
info.fColorTypeInfos[i];
1915 if (ctInfo.fColorType == srcColorType) {
1916 return {ctInfo.fTransferColorType, offsetAlignment};
1940 constexpr size_t numInts = (
sizeof(
key) + 3) / 4;
1941 uint32_t tmp[numInts];
1942 memcpy(tmp, &
key,
sizeof(
key));
1944 for (
size_t i = 0; i < numInts; ++i) {
1987 bool forceLoadFromResolve =
1989 SkASSERT(!forceLoadFromResolve || needsResolve);
2010 if (!rp->isExternal()) {
2016 &attachmentsDescriptor,
2018 SkASSERT(rp->isCompatible(attachmentsDescriptor, attachmentFlags, selfDepFlags,
2026 &attachmentsDescriptor,
2033 loadFromResolve, 0);
2061 return std::find(array.begin(), array.end(), deviceID) != array.end();
2065GrVkCaps::IntelGPUType GrVkCaps::GetIntelGPUType(uint32_t deviceID) {
2070 static constexpr std::array<uint32_t, 25> kSkyLakeIDs = {
2071 {0x1902, 0x1906, 0x190A, 0x190B, 0x190E, 0x1912, 0x1913,
2072 0x1915, 0x1916, 0x1917, 0x191A, 0x191B, 0x191D, 0x191E,
2073 0x1921, 0x1923, 0x1926, 0x1927, 0x192A, 0x192B, 0x192D,
2074 0x1932, 0x193A, 0x193B, 0x193D}};
2075 static constexpr std::array<uint32_t, 14> kIceLakeIDs = {
2076 {0x8A50, 0x8A51, 0x8A52, 0x8A53, 0x8A54, 0x8A56, 0x8A57,
2077 0x8A58, 0x8A59, 0x8A5A, 0x8A5B, 0x8A5C, 0x8A5D, 0x8A71}};
2078 static constexpr std::array<uint32_t, 5> kRocketLakeIDs = {
2079 {0x4c8a, 0x4c8b, 0x4c8c, 0x4c90, 0x4c9a}};
2080 static constexpr std::array<uint32_t, 11> kTigerLakeIDs = {
2081 {0x9A40, 0x9A49, 0x9A59, 0x9A60, 0x9A68, 0x9A70,
2082 0x9A78, 0x9AC0, 0x9AC9, 0x9AD9, 0x9AF8}};
2083 static constexpr std::array<uint32_t, 10> kAlderLakeIDs = {
2084 {0x4680, 0x4681, 0x4682, 0x4683, 0x4690,
2085 0x4691, 0x4692, 0x4693, 0x4698, 0x4699}};
2088 return IntelGPUType::kSkyLake;
2091 return IntelGPUType::kIceLake;
2094 return IntelGPUType::kRocketLake;
2097 return IntelGPUType::kTigerLake;
2100 return IntelGPUType::kAlderLake;
2102 return IntelGPUType::kOther;
2105#if defined(GR_TEST_UTILS)
2106std::vector<GrTest::TestFormatColorTypeCombination> GrVkCaps::getTestingCombinations()
const {
2107 std::vector<GrTest::TestFormatColorTypeCombination> combos = {
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
SkTextureCompressionType GrBackendFormatToCompressionType(const GrBackendFormat &format)
bool stencil_format_supported(ID3D12Device *device, DXGI_FORMAT format)
static bool format_is_srgb(MTLPixelFormat format)
@ kRequiresTextureBarrier
static const int kGrColorTypeCnt
@ kVkRTSupportsInputAttachment
static bool format_is_srgb(VkFormat format)
static size_t align_to_4(size_t v)
bool stencil_format_supported(const skgpu::VulkanInterface *interface, VkPhysicalDevice physDev, VkFormat format)
static bool backend_format_is_external(const GrBackendFormat &format)
static FormatCompatibilityClass format_compatibility_class(VkFormat format)
static bool intel_deviceID_present(const std::array< uint32_t, N > &array, uint32_t deviceID)
static constexpr VkFormat kVkFormats[]
skgpu::VulkanYcbcrConversionInfo GrVkYcbcrConversionInfo
bool GrVkFormatIsSupported(VkFormat format)
#define GR_VK_CALL(IFACE, X)
#define SkAssertResult(cond)
#define SK_ABORT(message,...)
#define SkDEBUGFAILF(fmt,...)
static constexpr bool SkTextureCompressionTypeIsOpaque(SkTextureCompressionType compression)
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
static constexpr bool SkToBool(const T &x)
bool fSupportsProtectedContent
bool fDynamicStateArrayGeometryProcessorTextureSupport
int fMaxPreferredRenderTargetSize
bool fFinishedProcAsyncCallbackSupport
bool fReadPixelsRowBytesSupport
const GrShaderCaps * shaderCaps() const
std::unique_ptr< GrShaderCaps > fShaderCaps
bool fReuseScratchTextures
bool fNativeDrawIndirectSupport
uint32_t fMaxPushConstantsSize
bool fTransferFromBufferToBufferSupport
bool fTransferFromBufferToTextureSupport
bool fTextureBarrierSupport
bool preferDiscardableMSAAAttachment() const
bool fBackendSemaphoreSupport
@ kAdvancedCoherent_BlendEquationSupport
@ kAdvanced_BlendEquationSupport
@ kBasic_BlendEquationSupport
bool fHalfFloatVertexAttributeSupport
bool fSampleLocationsSupport
bool fOversizedStencilSupport
@ kVulkanHasResolveLoadSubpass
bool fReuseScratchBuffers
bool fWritePixelsRowBytesSupport
bool fShouldCollapseSrcOverToSrcWhenAble
bool fNPOTTextureTileSupport
bool fSupportsAHardwareBufferImages
bool fTransferFromSurfaceToBufferSupport
void finishInitialization(const GrContextOptions &options)
bool fAvoidWritePixelsFastPath
BlendEquationSupport fBlendEquationSupport
bool fPreferDiscardableMSAAAttachment
bool fConservativeRasterSupport
bool fDrawInstancedSupport
bool fCrossContextTextureSupport
bool fPreferFullscreenClears
void genKey(skgpu::KeyBuilder *, const GrCaps &) const
static void Build(GrProgramDesc *, const GrProgramInfo &, const GrCaps &)
uint16_t primitiveTypeKey() const
int targetsNumSamples() const
const GrPipeline & pipeline() const
bool targetHasVkResolveAttachmentWithInput() const
bool isStencilEnabled() const
GrLoadOp colorLoadOp() const
GrStencilSettings nonGLStencilSettings() const
GrXferBarrierFlags renderPassBarriers() const
bool supportsVkInputAttachment() const
void genKey(skgpu::KeyBuilder *b, bool includeRefsAndMasks) const
virtual GrTextureProxy * asTextureProxy()
bool canCopyAsResolve(VkFormat dstConfig, int dstSampleCnt, bool dstHasYcbcr, VkFormat srcConfig, int srcSamplecnt, bool srcHasYcbcr) const
bool isVkFormatTexturable(VkFormat) const
bool programInfoWillUseDiscardableMSAA(const GrProgramInfo &) const
bool canCopyAsBlit(VkFormat dstConfig, int dstSampleCnt, bool dstIsLinear, bool dstHasYcbcr, VkFormat srcConfig, int srcSampleCnt, bool srcIsLinear, bool srcHasYcbcr) const
bool onCanCopySurface(const GrSurfaceProxy *dst, const SkIRect &dstRect, const GrSurfaceProxy *src, const SkIRect &srcRect) const override
bool formatCanBeDstofBlit(VkFormat format, bool linearTiled) const
uint64_t computeFormatKey(const GrBackendFormat &) const override
bool isFormatRenderable(const GrBackendFormat &format, int sampleCount) const override
SurfaceReadPixelsSupport surfaceSupportsReadPixels(const GrSurface *) const override
bool onAreColorTypeAndFormatCompatible(GrColorType, const GrBackendFormat &) const override
skgpu::Swizzle onGetReadSwizzle(const GrBackendFormat &, GrColorType) const override
int maxRenderTargetSampleCount(const GrBackendFormat &) const override
VkShaderStageFlags getPushConstantStageFlags() const
bool renderTargetSupportsDiscardableMSAA(const GrVkRenderTarget *) const
bool isFormatTexturable(const GrBackendFormat &, GrTextureType) const override
bool onSurfaceSupportsWritePixels(const GrSurface *) const override
GrProgramDesc makeDesc(GrRenderTarget *, const GrProgramInfo &, ProgramDescOverrideFlags) const override
bool onSupportsDynamicMSAA(const GrRenderTargetProxy *) const override
GrDstSampleFlags onGetDstSampleFlagsForProxy(const GrRenderTargetProxy *) const override
void addExtraSamplerKey(skgpu::KeyBuilder *, GrSamplerState, const GrBackendFormat &) const override
int getFragmentUniformSet() const
bool isFormatSRGB(const GrBackendFormat &) const override
VkFormat getFormatFromColorType(GrColorType colorType) const
GrColorType transferColorType(VkFormat, GrColorType surfaceColorType) const
bool isFormatAsColorTypeRenderable(GrColorType ct, const GrBackendFormat &format, int sampleCount=1) const override
bool supportsDiscardableMSAAForDMSAA() const
GrBackendFormat getBackendFormatFromCompressionType(SkTextureCompressionType) const override
int getRenderTargetSampleCount(int requestedCount, const GrBackendFormat &) const override
GrInternalSurfaceFlags getExtraSurfaceFlagsForDeferredRT() const override
SupportedRead onSupportedReadPixelsColorType(GrColorType, const GrBackendFormat &, GrColorType) const override
bool formatCanBeSrcofBlit(VkFormat format, bool linearTiled) const
SupportedWrite supportedWritePixelsColorType(GrColorType surfaceColorType, const GrBackendFormat &surfaceFormat, GrColorType srcColorType) const override
bool canCopyImage(VkFormat dstFormat, int dstSampleCnt, bool dstHasYcbcr, VkFormat srcFormat, int srcSamplecnt, bool srcHasYcbcr) const
skgpu::Swizzle getWriteSwizzle(const GrBackendFormat &, GrColorType) const override
int getFragmentUniformBinding() const
GrVkCaps(const GrContextOptions &, const skgpu::VulkanInterface *, VkPhysicalDevice, const VkPhysicalDeviceFeatures2 &, uint32_t instanceVersion, uint32_t physicalDeviceVersion, const skgpu::VulkanExtensions &, skgpu::Protected)
GrBackendFormat onGetDefaultBackendFormat(GrColorType) const override
@ kShader_PersistentCacheKeyType
bool supportsInputAttachmentUsage() const
static void GenKey(skgpu::KeyBuilder *, AttachmentFlags, const AttachmentsDescriptor &, SelfDependencyFlags selfDepFlags, LoadFromResolve, uint64_t externalRenderPass)
@ kForNonCoherentAdvBlend
static void ReconstructAttachmentsDescriptor(const GrVkCaps &vkCaps, const GrProgramInfo &programInfo, GrVkRenderPass::AttachmentsDescriptor *desc, GrVkRenderPass::AttachmentFlags *flags)
GrVkImage * resolveAttachment() const
const GrVkRenderPass * getSimpleRenderPass(bool withResolve, bool withStencil, SelfDependencyFlags selfDepFlags, LoadFromResolve)
static SK_END_REQUIRE_DENSE Key GenerateKey(GrSamplerState, const GrVkYcbcrConversionInfo &)
static constexpr Swizzle BGRA()
static constexpr Swizzle RGB1()
FlutterSemanticsFlag flags
uint32_t uint32_t * format
static constexpr size_t VkFormatBytesPerBlock(VkFormat vkFormat)
static constexpr bool VkFormatNeedsYcbcrSampler(VkFormat format)
static constexpr bool VkFormatIsCompressed(VkFormat vkFormat)
T * GetExtensionFeatureStruct(const VkPhysicalDeviceFeatures2 &features, VkStructureType type)
static void usage(char *argv0)
bool fAllowMSAAOnNewIntel
bool fDisableDriverCorrectnessWorkarounds
int fMaxCachedVulkanSecondaryCommandBuffers
bool fBitManipulationSupport
bool fPreferFlatInterpolation
bool fNonconstantArrayIndexSupport
constexpr SkISize size() const
bool fExplicitTextureLodSupport
bool fDualSourceBlendingSupport
bool fMustDeclareFragmentFrontFacing
@ kAutomatic_AdvBlendEqInteraction
bool fShaderDerivativeSupport
bool fFlatInterpolationSupport
bool fInverseHyperbolicSupport
const char * fVersionDeclString
bool fNonsquareMatrixSupport
bool fUsesPrecisionModifiers
VkBool32 advancedBlendAllOperations
VkPhysicalDeviceFeatures features
uint32_t maxPushConstantsSize
uint32_t maxImageDimension2D
VkBool32 standardSampleLocations
uint32_t maxDescriptorSetInputAttachments
float maxSamplerAnisotropy
uint32_t maxPerStageDescriptorSamplers
uint32_t maxDrawIndirectCount
uint32_t maxPerStageDescriptorSampledImages
uint32_t maxVertexInputAttributes
char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]
VkPhysicalDeviceLimits limits
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME
#define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME
VkFlags VkSampleCountFlags
@ VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
@ VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT
@ VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
@ VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
@ VK_FORMAT_FEATURE_BLIT_SRC_BIT
@ VK_FORMAT_FEATURE_BLIT_DST_BIT
#define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME
#define VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME
@ VK_SHADER_STAGE_VERTEX_BIT
@ VK_SHADER_STAGE_FRAGMENT_BIT
VkFlags VkImageUsageFlags
#define VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME
@ VK_IMAGE_TILING_OPTIMAL
#define VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME
@ VK_IMAGE_USAGE_TRANSFER_DST_BIT
@ VK_IMAGE_USAGE_SAMPLED_BIT
@ VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
@ VK_IMAGE_USAGE_TRANSFER_SRC_BIT
#define VK_EXT_RGBA10X6_FORMATS_EXTENSION_NAME
#define VK_KHR_MAINTENANCE3_EXTENSION_NAME
VkFlags VkFormatFeatureFlags
VkFlags VkShaderStageFlags
#define VK_MAKE_VERSION(major, minor, patch)
#define VK_KHR_MAINTENANCE1_EXTENSION_NAME
#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME
#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME
#define VK_EXT_DEVICE_FAULT_EXTENSION_NAME
#define VK_KHR_BIND_MEMORY_2_EXTENSION_NAME
#define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME
@ VK_FORMAT_R16G16B16A16_UNORM
@ VK_FORMAT_R8G8B8A8_SRGB
@ VK_FORMAT_D24_UNORM_S8_UINT
@ VK_FORMAT_B8G8R8A8_UNORM
@ VK_FORMAT_R16G16_SFLOAT
@ VK_FORMAT_B4G4R4A4_UNORM_PACK16
@ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16
@ VK_FORMAT_R5G6B5_UNORM_PACK16
@ VK_FORMAT_R4G4B4A4_UNORM_PACK16
@ VK_FORMAT_A2B10G10R10_UNORM_PACK32
@ VK_FORMAT_R8G8B8A8_UNORM
@ VK_FORMAT_BC1_RGB_UNORM_BLOCK
@ VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16
@ VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM
@ VK_FORMAT_R16G16B16A16_SFLOAT
@ VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK
@ VK_FORMAT_A2R10G10B10_UNORM_PACK32
@ VK_FORMAT_BC1_RGBA_UNORM_BLOCK
@ VK_FORMAT_G8_B8R8_2PLANE_420_UNORM
@ VK_FORMAT_B5G6R5_UNORM_PACK16
@ VK_FORMAT_D32_SFLOAT_S8_UINT
#define VK_KHR_SWAPCHAIN_EXTENSION_NAME
#define VK_KHR_MAINTENANCE2_EXTENSION_NAME
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT
#define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME