30 sharedContext.
get()));
36 std::move(queueManager),
45 const std::string& spirv,
51 moduleCreateInfo.
pNext =
nullptr;
52 moduleCreateInfo.
flags = 0;
53 moduleCreateInfo.
codeSize = spirv.size();
54 moduleCreateInfo.
pCode = (
const uint32_t*)spirv.c_str();
56 VkShaderModule shaderModule;
60 CreateShaderModule(context->
device(),
73 VkDescriptorSetLayout* outLayout) {
75 for (
size_t i = 0;
i < requestedDescriptors.
size();
i++) {
76 if (requestedDescriptors[
i].
fCount != 0) {
94 layoutCreateInfo.
pNext =
nullptr;
95 layoutCreateInfo.
flags = 0;
103 CreateDescriptorSetLayout(ctxt->
device(), &layoutCreateInfo,
nullptr, outLayout));
105 SkDebugf(
"Failed to create VkDescriptorSetLayout\n");
178namespace ycbcrPackaging {
209 if (!conversionInfo.
isValid()) {
#define SKGPU_LOG_E(fmt,...)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
#define VULKAN_CALL_RESULT(SHARED_CONTEXT, RESULT, X)
constexpr size_t size() const
static std::unique_ptr< Context > MakeContext(sk_sp< SharedContext >, std::unique_ptr< QueueManager >, const ContextOptions &)
static sk_sp< SharedContext > Make(const VulkanBackendContext &, const ContextOptions &)
uint32_t uint32_t * format
SK_API std::unique_ptr< Context > MakeVulkan(const VulkanBackendContext &, const ContextOptions &)
static constexpr int kInt32sNeededKnownFormat
static constexpr int kInt32sNeededExternalFormat
static constexpr int kComponentBits
static constexpr int kYcbcrRangeBits
static constexpr int kComponentBShift
static constexpr int kChromaFilterShift
static constexpr int kYChromaOffsetShift
static constexpr int kYChromaOffsetBits
int numInt32sNeeded(const VulkanYcbcrConversionInfo &conversionInfo)
static constexpr int kComponentAShift
static constexpr int kYcbcrRangeShift
static constexpr int kUsesExternalFormatShift
static constexpr int kComponentRShift
static constexpr int kComponentGShift
static constexpr int kForceExplicitReconShift
static constexpr int kForceExplicitReconBits
static constexpr int kXChromaOffsetBits
static constexpr int kXChromaOffsetShift
uint32_t nonFormatInfoAsUInt32(const VulkanYcbcrConversionInfo &conversionInfo)
static constexpr int kYcbcrModelBits
static constexpr int kChromaFilterBits
static constexpr int kYcbcrModelShift
VkShaderModule createVulkanShaderModule(const VulkanSharedContext *context, const std::string &spirv, VkShaderStageFlagBits stage)
@ kCombinedTextureSampler
VkDescriptorType DsTypeEnumToVkDs(DescriptorType type)
bool vkFormatIsSupported(VkFormat format)
void DescriptorDataToVkDescSetLayout(const VulkanSharedContext *ctxt, const SkSpan< DescriptorData > &requestedDescriptors, VkDescriptorSetLayout *outLayout)
VkShaderStageFlags PipelineStageFlagsToVkShaderStageFlags(SkEnumBitMask< PipelineStageFlags > stageFlags)
VkDescriptorType descriptorType
const VkSampler * pImmutableSamplers
VkShaderStageFlags stageFlags
const VkDescriptorSetLayoutBinding * pBindings
VkDescriptorSetLayoutCreateFlags flags
VkShaderModuleCreateFlags flags
VkSamplerYcbcrRange fYcbcrRange
VkSamplerYcbcrModelConversion fYcbcrModel
VkComponentMapping fComponents
VkBool32 fForceExplicitReconstruction
VkChromaLocation fYChromaOffset
VkChromaLocation fXChromaOffset
SkEnumBitMask< PipelineStageFlags > fPipelineStageFlags
#define TRACE_EVENT0(category_group, name)
@ VK_SHADER_STAGE_VERTEX_BIT
@ VK_SHADER_STAGE_COMPUTE_BIT
@ VK_SHADER_STAGE_FRAGMENT_BIT
VkFlags VkShaderStageFlags
@ VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
@ VK_DESCRIPTOR_TYPE_SAMPLER
@ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
@ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
@ VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
@ VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
@ 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_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
@ VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO