29#ifdef SK_BUILD_FOR_ANDROID
30#include <sys/system_properties.h>
37 VkPhysicalDevice physDev,
38 uint32_t physicalDeviceVersion,
43 this->init(contextOptions, vkInterface, physDev, physicalDeviceVersion, features,
extensions,
51 VkPhysicalDevice physDev,
52 uint32_t physicalDeviceVersion,
57 VULKAN_CALL(vkInterface, GetPhysicalDeviceProperties(physDev, &physDevProperties));
59#if defined(GRAPHITE_TEST_UTILS)
60 this->setDeviceName(physDevProperties.
deviceName);
66 fShouldAlwaysUseDedicatedImageMemory =
true;
70 fPhysicalDeviceMemoryProperties2.
pNext =
nullptr;
72 GetPhysicalDeviceMemoryProperties2(physDev, &fPhysicalDeviceMemoryProperties2));
90 VULKAN_CALL(vkInterface, GetPhysicalDeviceMemoryProperties(physDev, &deviceMemoryProperties));
91 fSupportsMemorylessAttachments =
false;
101 fSupportsMemorylessAttachments =
true;
105#ifdef SK_BUILD_FOR_UNIX
106 if (kNvidia_VkVendor == physDevProperties.
vendorID) {
108 fShouldAlwaysUseDedicatedImageMemory =
true;
112 if (physDevProperties.
vendorID == kNvidia_VkVendor ||
113 physDevProperties.
vendorID == kAMD_VkVendor) {
116 fGpuOnlyBuffersMorePerformant =
true;
123 fShouldPersistentlyMapCpuToGpuBuffers =
false;
127 this->applyDriverCorrectnessWorkarounds(physDevProperties);
130 if (physDevProperties.
vendorID == kAMD_VkVendor) {
132 fMaxVertexAttributes = 32;
138#ifdef SK_BUILD_FOR_ANDROID
148 skgpu::GetExtensionFeatureStruct<VkPhysicalDeviceSamplerYcbcrConversionFeatures>(
151 if (ycbcrFeatures && ycbcrFeatures->samplerYcbcrConversion) {
152 fSupportsYcbcrConversion =
true;
157 fSupportsDeviceFaultInfo =
true;
160 fShaderCaps->fFloatBufferArrayName =
"fsGradientBuffer";
164 this->initFormatTable(vkInterface, physDev, physDevProperties);
165 this->initDepthStencilFormatTable(vkInterface, physDev, physDevProperties);
173 int androidAPIVersion = 0;
174#if defined(SK_BUILD_FOR_ANDROID)
175 char androidAPIVersionStr[PROP_VALUE_MAX];
176 int strLength = __system_property_get(
"ro.build.version.sdk", androidAPIVersionStr);
179 androidAPIVersion = (strLength == 0) ? 0 : atoi(androidAPIVersionStr);
183 if (kARM_VkVendor == properties.
vendorID && androidAPIVersion <= 28) {
184 fShouldAlwaysUseDedicatedImageMemory =
true;
228 const FormatInfo& formatInfo = this->getFormatInfo(
format);
229 static constexpr int defaultSampleCount = 1;
238 info.fSampleCount = defaultSampleCount;
239 info.fMipmapped = mipmapped;
248 info.fImageUsageFlags =
info.fImageUsageFlags |
261 if (!textureInfo.getVulkanTextureInfo(&
info)) {
265 info.fSampleCount = 1;
266 info.fMipmapped = mipmapped;
278 switch (compression) {
295 const FormatInfo& formatInfo = this->getFormatInfo(
format);
296 static constexpr int defaultSampleCount = 1;
303 info.fSampleCount = defaultSampleCount;
304 info.fMipmapped = mipmapped;
323 const VkFormat singleSpecFormat = singleSampledInfo.vulkanTextureSpec().fFormat;
324 const FormatInfo& formatInfo = this->getFormatInfo(singleSpecFormat);
335 info.fFormat = singleSpecFormat;
356 uint32_t sampleCount,
359 const DepthStencilFormatInfo& formatInfo = this->getDepthStencilFormatInfo(
format);
361 !formatInfo.isDepthStencilSupported(formatInfo.fFormatProperties.optimalTilingFeatures) ||
362 !formatInfo.fSupportedSampleCounts.isSampleCountSupported(sampleCount)) {
367 info.fSampleCount = sampleCount;
382 const FormatInfo& formatInfo = this->getFormatInfo(
format);
389 info.fSampleCount = 1;
409 VkPhysicalDevice physDev,
412 "Size of VkFormats array must match static value in header");
421 info.init(interface, physDev, properties,
format);
423 info.fColorTypeInfoCount = 2;
424 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
429 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
430 ctInfo.fColorType = ct;
431 ctInfo.fTransferColorType = ct;
437 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
438 ctInfo.fColorType = ct;
439 ctInfo.fTransferColorType = ct;
450 info.init(interface, physDev, properties,
format);
452 info.fColorTypeInfoCount = 3;
453 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
458 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
459 ctInfo.fColorType = ct;
460 ctInfo.fTransferColorType = ct;
466 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
467 ctInfo.fColorType = ct;
468 ctInfo.fTransferColorType = ct;
476 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
477 ctInfo.fColorType = ct;
478 ctInfo.fTransferColorType = ct;
489 info.init(interface, physDev, properties,
format);
491 info.fColorTypeInfoCount = 1;
492 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
497 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
498 ctInfo.fColorType = ct;
499 ctInfo.fTransferColorType = ct;
508 info.init(interface, physDev, properties,
format);
510 info.fColorTypeInfoCount = 1;
511 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
516 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
517 ctInfo.fColorType = ct;
518 ctInfo.fTransferColorType = ct;
527 info.init(interface, physDev, properties,
format);
529 info.fColorTypeInfoCount = 2;
530 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
535 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
536 ctInfo.fColorType = ct;
537 ctInfo.fTransferColorType = ct;
546 info.init(interface, physDev, properties,
format);
548 info.fColorTypeInfoCount = 1;
549 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
554 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
555 ctInfo.fColorType = ct;
556 ctInfo.fTransferColorType = ct;
567 info.init(interface, physDev, properties,
format);
569 info.fColorTypeInfoCount = 1;
570 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
575 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
576 ctInfo.fColorType = ct;
590 info.init(interface, physDev, properties,
format);
592 info.fColorTypeInfoCount = 1;
593 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
598 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
599 ctInfo.fColorType = ct;
600 ctInfo.fTransferColorType = ct;
609 info.init(interface, physDev, properties,
format);
611 info.fColorTypeInfoCount = 1;
612 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
617 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
618 ctInfo.fColorType = ct;
619 ctInfo.fTransferColorType = ct;
628 info.init(interface, physDev, properties,
format);
630 info.fColorTypeInfoCount = 1;
631 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
636 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
637 ctInfo.fColorType = ct;
638 ctInfo.fTransferColorType = ct;
647 info.init(interface, physDev, properties,
format);
649 info.fColorTypeInfoCount = 1;
650 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
655 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
656 ctInfo.fColorType = ct;
657 ctInfo.fTransferColorType = ct;
669 info.init(interface, physDev, properties,
format);
671 info.fColorTypeInfoCount = 1;
672 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
677 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
678 ctInfo.fColorType = ct;
679 ctInfo.fTransferColorType = ct;
688 info.init(interface, physDev, properties,
format);
690 info.fColorTypeInfoCount = 1;
691 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
696 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
697 ctInfo.fColorType = ct;
698 ctInfo.fTransferColorType = ct;
707 info.init(interface, physDev, properties,
format);
709 info.fColorTypeInfoCount = 1;
710 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
715 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
716 ctInfo.fColorType = ct;
717 ctInfo.fTransferColorType = ct;
728 info.init(interface, physDev, properties,
format);
730 info.fColorTypeInfoCount = 1;
731 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
736 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
737 ctInfo.fColorType = ct;
738 ctInfo.fTransferColorType = ct;
747 info.init(interface, physDev, properties,
format);
749 info.fColorTypeInfoCount = 1;
750 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
755 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
756 ctInfo.fColorType = ct;
757 ctInfo.fTransferColorType = ct;
766 info.init(interface, physDev, properties,
format);
768 info.fColorTypeInfoCount = 1;
769 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
774 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
775 ctInfo.fColorType = ct;
776 ctInfo.fTransferColorType = ct;
785 if (fSupportsYcbcrConversion) {
786 info.init(interface, physDev, properties,
format);
789 info.fColorTypeInfoCount = 1;
790 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
795 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
796 ctInfo.fColorType = ct;
797 ctInfo.fTransferColorType = ct;
807 if (fSupportsYcbcrConversion) {
808 info.init(interface, physDev, properties,
format);
811 info.fColorTypeInfoCount = 1;
812 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
817 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
818 ctInfo.fColorType = ct;
819 ctInfo.fTransferColorType = ct;
829 info.init(interface, physDev, properties,
format);
831 info.fColorTypeInfoCount = 1;
832 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
837 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
838 ctInfo.fColorType = ct;
839 ctInfo.fTransferColorType = ct;
849 info.init(interface, physDev, properties,
format);
851 info.fColorTypeInfoCount = 1;
852 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
857 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
858 ctInfo.fColorType = ct;
859 ctInfo.fTransferColorType = ct;
869 info.init(interface, physDev, properties,
format);
871 info.fColorTypeInfoCount = 1;
872 info.fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info.fColorTypeInfoCount);
877 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
878 ctInfo.fColorType = ct;
879 ctInfo.fTransferColorType = ct;
921 VkPhysicalDevice physDev,
924 "Size of DepthStencilVkFormats array must match static value in header");
935 auto&
info = this->getDepthStencilFormatInfo(
format);
936 info.init(interface, physDev, properties,
format);
937 if (
info.fFormatProperties.optimalTilingFeatures &
939 set_ds_flags_to_format(fDepthStencilFlagsToFormatTable[stencilFlags.value()],
format);
948 kQualcomm_VkVendor == properties.
vendorID;
949 if (!disableD16InProtected) {
951 auto&
info = this->getDepthStencilFormatInfo(
format);
952 info.init(interface, physDev, properties,
format);
953 if (
info.fFormatProperties.optimalTilingFeatures &
955 set_ds_flags_to_format(fDepthStencilFlagsToFormatTable[depthFlags.value()],
format);
962 auto&
info = this->getDepthStencilFormatInfo(
format);
963 info.init(interface, physDev, properties,
format);
964 if (
info.fFormatProperties.optimalTilingFeatures &
966 set_ds_flags_to_format(fDepthStencilFlagsToFormatTable[depthFlags.value()],
format);
972 auto&
info = this->getDepthStencilFormatInfo(
format);
973 info.init(interface, physDev, properties,
format);
974 if (
info.fFormatProperties.optimalTilingFeatures &
976 set_ds_flags_to_format(fDepthStencilFlagsToFormatTable[stencilFlags.value()],
format);
977 set_ds_flags_to_format(fDepthStencilFlagsToFormatTable[depthFlags.value()],
format);
978 set_ds_flags_to_format(fDepthStencilFlagsToFormatTable[dsFlags.value()],
format);
984 auto&
info = this->getDepthStencilFormatInfo(
format);
985 info.init(interface, physDev, properties,
format);
986 if (
info.fFormatProperties.optimalTilingFeatures &
988 set_ds_flags_to_format(fDepthStencilFlagsToFormatTable[stencilFlags.value()],
format);
989 set_ds_flags_to_format(fDepthStencilFlagsToFormatTable[depthFlags.value()],
format);
990 set_ds_flags_to_format(fDepthStencilFlagsToFormatTable[dsFlags.value()],
format);
996 VkPhysicalDevice physDev,
1008 GetPhysicalDeviceImageFormatProperties(physDev,
1016 SKGPU_LOG_W(
"Vulkan call GetPhysicalDeviceImageFormatProperties failed: %d",
result);
1022 fSampleCounts.push_back(1);
1024 if (kImagination_VkVendor == physProps.
vendorID) {
1028 if (kIntel_VkVendor == physProps.
vendorID) {
1033 fSampleCounts.push_back(2);
1036 fSampleCounts.push_back(4);
1039 fSampleCounts.push_back(8);
1042 fSampleCounts.push_back(16);
1048bool VulkanCaps::SupportedSampleCounts::isSampleCountSupported(
int requestedCount)
const {
1049 requestedCount =
std::max(1, requestedCount);
1050 for (
int i = 0;
i < fSampleCounts.size();
i++) {
1051 if (fSampleCounts[
i] == requestedCount) {
1053 }
else if (requestedCount < fSampleCounts[
i]) {
1085 VkPhysicalDevice physDev,
1089 VULKAN_CALL(interface, GetPhysicalDeviceFormatProperties(physDev,
format, &fFormatProperties));
1091 if (is_renderable(fFormatProperties.optimalTilingFeatures)) {
1098 this->fSupportedSampleCounts.initSampleCounts(interface, physDev, properties,
format,
1103bool VulkanCaps::FormatInfo::isTexturable(
VkImageTiling imageTiling)
const {
1104 switch (imageTiling) {
1106 return is_texturable(fFormatProperties.optimalTilingFeatures);
1108 return is_texturable(fFormatProperties.linearTilingFeatures);
1115bool VulkanCaps::FormatInfo::isRenderable(
VkImageTiling imageTiling,
1116 uint32_t sampleCount)
const {
1117 if (!fSupportedSampleCounts.isSampleCountSupported(sampleCount)) {
1120 switch (imageTiling) {
1122 return is_renderable(fFormatProperties.optimalTilingFeatures);
1124 return is_renderable(fFormatProperties.linearTilingFeatures);
1131bool VulkanCaps::FormatInfo::isStorage(
VkImageTiling imageTiling)
const {
1132 switch (imageTiling) {
1134 return is_storage(fFormatProperties.optimalTilingFeatures);
1136 return is_storage(fFormatProperties.linearTilingFeatures);
1143bool VulkanCaps::FormatInfo::isTransferSrc(
VkImageTiling imageTiling)
const {
1144 switch (imageTiling) {
1146 return is_transfer_src(fFormatProperties.optimalTilingFeatures);
1148 return is_transfer_src(fFormatProperties.linearTilingFeatures);
1155bool VulkanCaps::FormatInfo::isTransferDst(
VkImageTiling imageTiling)
const {
1156 switch (imageTiling) {
1158 return is_transfer_dst(fFormatProperties.optimalTilingFeatures);
1160 return is_transfer_dst(fFormatProperties.linearTilingFeatures);
1169 for (
auto it = formats.begin(); it != formats.end(); ++it) {
1170 const auto&
info = this->getFormatInfo(*it);
1171 for (
int i = 0;
i <
info.fColorTypeInfoCount; ++
i) {
1173 fColorTypeToFormatTable[idx] = *it;
1182 return fColorTypeToFormatTable[idx];
1185VulkanCaps::FormatInfo& VulkanCaps::getFormatInfo(
VkFormat format) {
1187 "Size of VkFormats array must match static value in header");
1190 return fFormatTable[
i];
1193 static FormatInfo kInvalidFormat;
1194 return kInvalidFormat;
1197const VulkanCaps::FormatInfo& VulkanCaps::getFormatInfo(
VkFormat format)
const {
1199 return nonConstThis->getFormatInfo(
format);
1203 VkPhysicalDevice physDev,
1207 VULKAN_CALL(interface, GetPhysicalDeviceFormatProperties(physDev,
format, &fFormatProperties));
1209 if (this->isDepthStencilSupported(fFormatProperties.optimalTilingFeatures)) {
1211 fSupportedSampleCounts.initSampleCounts(interface, physDev, properties,
format, usageFlags);
1221 return fDepthStencilFlagsToFormatTable[
flags.value()];
1224VulkanCaps::DepthStencilFormatInfo& VulkanCaps::getDepthStencilFormatInfo(
VkFormat format) {
1226 "Size of VkFormats array must match static value in header");
1229 return fDepthStencilFormatTable[
i];
1232 static DepthStencilFormatInfo kInvalidFormat;
1233 return kInvalidFormat;
1236const VulkanCaps::DepthStencilFormatInfo& VulkanCaps::getDepthStencilFormatInfo(
VkFormat format)
1239 return nonConstThis->getDepthStencilFormatInfo(
format);
1242const Caps::ColorTypeInfo* VulkanCaps::getColorTypeInfo(
SkColorType ct,
1243 const TextureInfo& textureInfo)
const {
1244 VkFormat vkFormat = textureInfo.vulkanTextureSpec().fFormat;
1249 return textureInfo.vulkanTextureSpec().fYcbcrConversionInfo.isValid()
1250 ? &fExternalFormatColorTypeInfo
1254 const FormatInfo&
info = this->getFormatInfo(vkFormat);
1255 for (
int i = 0;
i <
info.fColorTypeInfoCount; ++
i) {
1256 const ColorTypeInfo& ctInfo =
info.fColorTypeInfos[
i];
1257 if (ctInfo.fColorType == ct) {
1265bool VulkanCaps::onIsTexturable(
const TextureInfo& texInfo)
const {
1266 VulkanTextureInfo vkInfo;
1267 if (!texInfo.getVulkanTextureInfo(&vkInfo)) {
1278 const FormatInfo&
info = this->getFormatInfo(vkInfo.fFormat);
1279 return info.isTexturable(vkInfo.fImageTiling);
1284 if (!texInfo.getVulkanTextureInfo(&vkInfo)) {
1288 const FormatInfo&
info = this->getFormatInfo(vkInfo.
fFormat);
1294 if (!texInfo.getVulkanTextureInfo(&vkInfo)) {
1298 const FormatInfo&
info = this->getFormatInfo(vkInfo.
fFormat);
1303 const FormatInfo&
info = this->getFormatInfo(vkInfo.
fFormat);
1308 const FormatInfo&
info = this->getFormatInfo(vkInfo.
fFormat);
1312bool VulkanCaps::supportsWritePixels(
const TextureInfo& texInfo)
const {
1314 if (!texInfo.getVulkanTextureInfo(&vkInfo)) {
1334bool VulkanCaps::supportsReadPixels(
const TextureInfo& texInfo)
const {
1339 VulkanTextureInfo vkInfo;
1340 if (!texInfo.getVulkanTextureInfo(&vkInfo)) {
1353 if (vkInfo.fSampleCount > 1) {
1364std::pair<
SkColorType,
bool > VulkanCaps::supportedWritePixelsColorType(
1366 const TextureInfo& dstTextureInfo,
1368 VulkanTextureInfo vkInfo;
1369 if (!dstTextureInfo.getVulkanTextureInfo(&vkInfo)) {
1379 const FormatInfo&
info = this->getFormatInfo(vkInfo.fFormat);
1380 for (
int i = 0;
i <
info.fColorTypeInfoCount; ++
i) {
1381 const auto& ctInfo =
info.fColorTypeInfos[
i];
1382 if (ctInfo.fColorType == dstColorType) {
1390std::pair<
SkColorType,
bool > VulkanCaps::supportedReadPixelsColorType(
1392 const TextureInfo& srcTextureInfo,
1394 VulkanTextureInfo vkInfo;
1395 if (!srcTextureInfo.getVulkanTextureInfo(&vkInfo)) {
1411 const FormatInfo&
info = this->getFormatInfo(vkInfo.fFormat);
1412 for (
int i = 0;
i <
info.fColorTypeInfoCount; ++
i) {
1413 const auto& ctInfo =
info.fColorTypeInfos[
i];
1414 if (ctInfo.fColorType == srcColorType) {
1432 static constexpr int kUint32sNeededForPipelineInfo = 3;
1437 kUint32sNeededForPipelineInfo + rpMetaData.fUint32DataCnt,
1438 "GraphicsPipeline");
1465 for (
size_t i = 0;
i < samplerData.
size();
i++) {
1497 SkASSERT(
static_cast<uint32_t
>(isMipped) < (1u << 1));
1498 SkASSERT(
static_cast<uint32_t
>(isProtected) < (1u << 1));
1505 static constexpr int kNum32DataCntNoYcbcr = 2 + 1 + 2;
1506 int num32DataCnt = kNum32DataCntNoYcbcr;
1522 if (useExternalFormat) {
1534 (
static_cast<uint32_t
>(isMipped) << 3 ) |
1535 (
static_cast<uint32_t
>(isProtected) << 4 ) |
1538 (
static_cast<uint32_t
>(vkSpec.
fAspectMask) << 7 ) |
1546 proxy->
textureInfo().vulkanTextureSpec().fYcbcrConversionInfo;
1548 if (ycbcrConversionInfo.
isValid()) {
1554 : ycbcrConversionInfo.
fFormat;
1557 return immutableSamplerInfo;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define SKGPU_LOG_W(fmt,...)
@ kR16G16B16A16_unorm_SkColorType
pixel with a little endian uint16_t for red, green, blue
@ kARGB_4444_SkColorType
pixel with 4 bits for alpha, red, green, blue; in 16-bit word
@ kR8G8_unorm_SkColorType
pixel with a uint8_t for red and green
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
@ kA16_unorm_SkColorType
pixel with a little endian uint16_t for alpha
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
@ kSRGBA_8888_SkColorType
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
@ kRGB_888x_SkColorType
pixel with 8 bits each for red, green, blue; in 32-bit word
@ kBGRA_1010102_SkColorType
10 bits for blue, green, red; 2 bits for alpha; in 32-bit word
@ kA16_float_SkColorType
pixel with a half float for alpha
@ kRGBA_1010102_SkColorType
10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
@ kR16G16_unorm_SkColorType
pixel with a little endian uint16_t for red and green
@ kUnknown_SkColorType
uninitialized
@ kR16G16_float_SkColorType
pixel with a half float for red and green
static constexpr int kSkColorTypeCnt
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
static constexpr bool SkToBool(const T &x)
#define VULKAN_CALL(IFACE, X)
#define VULKAN_CALL_RESULT_NOCHECK(IFACE, RESULT, X)
constexpr size_t size() const
constexpr uint16_t asKey() const
static constexpr Swizzle BGRA()
static constexpr Swizzle RGB1()
static Domain GenerateDomain()
size_t fRequiredStorageBufferAlignment
bool fSupportsAHardwareBufferImages
size_t fRequiredUniformBufferAlignment
bool isTexturable(const TextureInfo &) const
bool protectedSupport() const
std::unique_ptr< SkSL::ShaderCaps > fShaderCaps
static uint32_t SamplesToKey(uint32_t numSamples)
void finishInitialization(const ContextOptions &)
size_t fRequiredTransferBufferAlignment
ResourceBindingRequirements fResourceBindingReqs
UniquePaintParamsID paintParamsID() const
uint32_t renderStepID() const
static ResourceType GenerateResourceType()
uint32_t numSamples() const
Protected isProtected() const
const TextureInfo & textureInfo() const
TextureInfo getDefaultDepthStencilTextureInfo(SkEnumBitMask< DepthStencilFlags >, uint32_t sampleCount, Protected) const override
ImmutableSamplerInfo getImmutableSamplerInfo(const TextureProxy *proxy) const override
void buildKeyForTexture(SkISize dimensions, const TextureInfo &, ResourceType, Shareable, GraphiteResourceKey *) const override
TextureInfo getTextureInfoForSampledCopy(const TextureInfo &textureInfo, Mipmapped mipmapped) const override
UniqueKey makeGraphicsPipelineKey(const GraphicsPipelineDesc &, const RenderPassDesc &) const override
GraphiteResourceKey makeSamplerKey(const SamplerDesc &) const override
bool isStorage(const TextureInfo &) const override
bool isRenderable(const TextureInfo &) const override
TextureInfo getDefaultSampledTextureInfo(SkColorType, Mipmapped mipmapped, Protected, Renderable) const override
bool isTransferSrc(const VulkanTextureInfo &) const
bool isTransferDst(const VulkanTextureInfo &) const
TextureInfo getDefaultCompressedTextureInfo(SkTextureCompressionType, Mipmapped mipmapped, Protected) const override
TextureInfo getDefaultMSAATextureInfo(const TextureInfo &singleSampledInfo, Discardable discardable) const override
uint32_t channelMask(const TextureInfo &) const override
TextureInfo getDefaultStorageTextureInfo(SkColorType) const override
VulkanCaps(const ContextOptions &, const skgpu::VulkanInterface *, VkPhysicalDevice, uint32_t physicalDeviceVersion, const VkPhysicalDeviceFeatures2 *, const skgpu::VulkanExtensions *, Protected)
static void AddRenderPassInfoToKey(VulkanRenderPassMetaData &rpMetaData, ResourceKey::Builder &builder, int &builderIdx, bool compatibleOnly)
FlutterSemanticsFlag flags
uint32_t uint32_t * format
static float max(float r, float g, float b)
static float min(float r, float g, float b)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
int numInt32sNeeded(const VulkanYcbcrConversionInfo &conversionInfo)
uint32_t nonFormatInfoAsUInt32(const VulkanYcbcrConversionInfo &conversionInfo)
static constexpr VkFormat kDepthStencilVkFormats[]
static constexpr VkFormat kVkFormats[]
static const skgpu::UniqueKey::Domain kGraphicsPipelineDomain
static constexpr uint32_t VkFormatChannels(VkFormat vkFormat)
static constexpr bool VkFormatNeedsYcbcrSampler(VkFormat format)
static constexpr bool VkFormatIsCompressed(VkFormat vkFormat)
static void usage(char *argv0)
constexpr int32_t width() const
constexpr int32_t height() const
VkMemoryPropertyFlags propertyFlags
uint32_t maxUniformBufferRange
VkDeviceSize minStorageBufferOffsetAlignment
VkDeviceSize minUniformBufferOffsetAlignment
uint32_t maxImageDimension2D
uint32_t maxVertexInputAttributes
VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES]
char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]
VkPhysicalDeviceLimits limits
bool fDisableDriverCorrectnessWorkarounds
uint32_t fNonFormatYcbcrConversionInfo
Layout fUniformBufferLayout
bool fDistinctIndexRanges
Layout fStorageBufferLayout
bool fSeparateTextureAndSamplerBinding
SkSpan< const uint32_t > asSpan() const
VkImageUsageFlags fImageUsageFlags
VkImageTiling fImageTiling
VkSharingMode fSharingMode
VkImageCreateFlags fFlags
VkImageAspectFlags fAspectMask
VkImageUsageFlags fImageUsageFlags
VkImageTiling fImageTiling
VulkanYcbcrConversionInfo fYcbcrConversionInfo
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME
VkFlags VkMemoryPropertyFlags
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_STORAGE_IMAGE_BIT
@ VK_FORMAT_FEATURE_TRANSFER_DST_BIT
@ VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
@ VK_FORMAT_FEATURE_TRANSFER_SRC_BIT
@ VK_SHARING_MODE_EXCLUSIVE
@ VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
@ VK_MEMORY_PROPERTY_PROTECTED_BIT
VkFlags VkImageUsageFlags
@ VK_IMAGE_CREATE_PROTECTED_BIT
@ VK_IMAGE_TILING_OPTIMAL
@ VK_IMAGE_ASPECT_COLOR_BIT
@ VK_IMAGE_USAGE_TRANSFER_DST_BIT
@ VK_IMAGE_USAGE_SAMPLED_BIT
@ VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
@ VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
@ VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
@ VK_IMAGE_USAGE_TRANSFER_SRC_BIT
@ VK_IMAGE_USAGE_STORAGE_BIT
@ VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
VkFlags VkFormatFeatureFlags
#define VK_EXT_DEVICE_FAULT_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_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_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_D32_SFLOAT_S8_UINT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2