32 SKGPU_LOG_E(
"Tried to create VkImage with empty dimensions.");
37 SKGPU_LOG_E(
"Tried to create VkImage with too large a size.");
42 SKGPU_LOG_E(
"Tried to create %s VkImage in %s Context.",
57 SKGPU_LOG_E(
"Failed creating VkImage because we could not covert the number of samples: "
58 "%u to a VkSampleCountFlagBits.",
info.numSamples());
69 uint32_t numMipLevels = 1;
108 bool useLazyAllocation =
117 forceDedicatedMemory,
125 if (useLazyAllocation &&
127 SKGPU_LOG_E(
"Failed allocate lazy vulkan memory when requested");
167 std::move(ycbcrConversion)));
185 std::move(ycbcrConversion)));
210 uint32_t newQueueFamilyIndex)
const {
219 this->
textureInfo().getVulkanTextureInfo(&textureInfo);
229 SkDebugf(
"Lazy Image. This: %p, image: %d, size: %d\n",
this, fImage,
size);
270 if (newLayout ==
currentLayout && currentQueueIndex == newQueueFamilyIndex &&
281 uint32_t numMipLevels = 1;
296 { aspectFlags, 0, numMipLevels, 0, 1 }
300 &imageMemoryBarrier);
315 :
Texture(sharedContext, dimensions,
info,
std::move(mutableState), ownership, budgeted)
317 , fMemoryAlloc(alloc)
318 , fYcbcrConversion(
std::move(ycbcrConversion)) {}
320void VulkanTexture::freeGpuData() {
401 for (
int i = 0;
i < fImageViews.size(); ++
i) {
403 return fImageViews[
i].get();
409 this->
textureInfo().getVulkanTextureInfo(&vkTexInfo);
420 return fImageViews.push_back(std::move(imageView)).get();
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define SKGPU_LOG_E(fmt,...)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static constexpr bool SkToBool(const T &x)
#define VULKAN_CALL(IFACE, X)
#define VULKAN_CALL_RESULT(SHARED_CONTEXT, RESULT, X)
static int ComputeLevelCount(int baseWidth, int baseHeight)
bool protectedSupport() const
int maxTextureSize() const
skgpu::Budgeted budgeted() const
const SharedContext * sharedContext() const
Ownership ownership() const
Mipmapped mipmapped() const
Mipmapped mipmapped() const
SkISize dimensions() const
MutableTextureState * mutableState() const
const TextureInfo & textureInfo() const
bool shouldAlwaysUseDedicatedImageMemory() const
void addImageMemoryBarrier(const Resource *, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, bool byRegion, VkImageMemoryBarrier *barrier)
static std::unique_ptr< const VulkanImageView > Make(const VulkanSharedContext *sharedContext, VkImage image, VkFormat format, Usage usage, uint32_t miplevels, sk_sp< VulkanYcbcrConversion >)
void updateImageLayout(VkImageLayout)
uint32_t currentQueueFamilyIndex() const
void setImageLayoutAndQueueIndex(VulkanCommandBuffer *, VkImageLayout newLayout, VkAccessFlags dstAccessMask, VkPipelineStageFlags dstStageMask, bool byRegion, uint32_t newQueueFamilyIndex) const
static VkAccessFlags LayoutToSrcAccessMask(const VkImageLayout layout)
static bool MakeVkImage(const VulkanSharedContext *, SkISize dimensions, const TextureInfo &, CreatedImageInfo *outInfo)
static VkPipelineStageFlags LayoutToPipelineSrcStageFlags(const VkImageLayout layout)
static sk_sp< Texture > Make(const VulkanSharedContext *, SkISize dimensions, const TextureInfo &, skgpu::Budgeted, sk_sp< VulkanYcbcrConversion >)
VkImageLayout currentLayout() const
const VulkanImageView * getImageView(VulkanImageView::Usage) const
static sk_sp< Texture > MakeWrapped(const VulkanSharedContext *, SkISize dimensions, const TextureInfo &, sk_sp< MutableTextureState >, VkImage, const VulkanAlloc &, sk_sp< VulkanYcbcrConversion >)
FlutterSemanticsFlag flags
uint32_t uint32_t * format
sk_sp< const SkImage > image
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
void SetVkImageLayout(MutableTextureState *state, VkImageLayout layout)
SK_API uint32_t GetVkQueueFamilyIndex(const MutableTextureState &state)
SK_API MutableTextureState MakeVulkan(VkImageLayout layout, uint32_t queueFamilyIndex)
void SetVkQueueFamilyIndex(MutableTextureState *state, uint32_t queueFamilyIndex)
SK_API VkImageLayout GetVkImageLayout(const MutableTextureState &state)
void FreeImageMemory(VulkanMemoryAllocator *, const VulkanAlloc &alloc)
bool AllocImageMemory(VulkanMemoryAllocator *, VkImage image, skgpu::Protected isProtected, bool forceDedicatedMemory, bool useLazyAllocation, const std::function< CheckResult > &, VulkanAlloc *alloc)
VkImageAspectFlags vk_format_to_aspect_flags(VkFormat format)
static constexpr bool SampleCountToVkSampleCount(uint32_t samples, VkSampleCountFlagBits *vkSamples)
static void usage(char *argv0)
constexpr int32_t width() const
constexpr int32_t height() const
VkAccessFlags srcAccessMask
VkSharingMode fSharingMode
VkImageUsageFlags fImageUsageFlags
VkImageTiling fImageTiling
sk_sp< MutableTextureState > fMutableState
VkFlags VkPipelineStageFlags
@ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
@ VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
@ VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL
@ VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
@ VK_IMAGE_LAYOUT_PREINITIALIZED
@ VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
@ VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
@ VK_IMAGE_LAYOUT_UNDEFINED
@ VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
@ VK_IMAGE_LAYOUT_GENERAL
@ VK_SHARING_MODE_CONCURRENT
@ VK_SHARING_MODE_EXCLUSIVE
VkFlags VkImageAspectFlags
@ VK_IMAGE_CREATE_PROTECTED_BIT
@ VK_IMAGE_ASPECT_COLOR_BIT
@ VK_IMAGE_ASPECT_STENCIL_BIT
@ VK_IMAGE_ASPECT_DEPTH_BIT
@ VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
#define VK_QUEUE_FAMILY_FOREIGN_EXT
VkFlags VkImageCreateFlags
@ VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
@ VK_ACCESS_TRANSFER_WRITE_BIT
@ VK_ACCESS_HOST_WRITE_BIT
@ VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT
#define VK_QUEUE_FAMILY_EXTERNAL
@ VK_FORMAT_D24_UNORM_S8_UINT
@ VK_FORMAT_D32_SFLOAT_S8_UINT
@ VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT
@ VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT
@ VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT
@ VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT
@ VK_PIPELINE_STAGE_ALL_COMMANDS_BIT
@ VK_PIPELINE_STAGE_HOST_BIT
@ VK_PIPELINE_STAGE_TRANSFER_BIT
#define VK_QUEUE_FAMILY_IGNORED
@ VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
@ VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER