Flutter Engine
The Flutter Engine
Namespaces | Macros | Functions | Variables
VulkanGraphiteUtilsPriv.h File Reference
#include "include/core/SkSpan.h"
#include "include/gpu/vk/VulkanTypes.h"
#include "src/gpu/graphite/DescriptorData.h"
#include "src/gpu/graphite/Log.h"
#include "src/gpu/vk/VulkanInterface.h"
#include <string>

Go to the source code of this file.

Namespaces

namespace  skgpu
 
namespace  skgpu::graphite
 
namespace  skgpu::graphite::ycbcrPackaging
 

Macros

#define VULKAN_CALL(IFACE, X)   (IFACE)->fFunctions.f##X
 
#define VULKAN_LOG_IF_NOT_SUCCESS(SHARED_CONTEXT, RESULT, X, ...)
 
#define VULKAN_CALL_RESULT(SHARED_CONTEXT, RESULT, X)
 
#define VULKAN_CALL_ERRCHECK(SHARED_CONTEXT, X)
 
#define VULKAN_CALL_RESULT_NOCHECK(IFACE, RESULT, X)
 

Functions

VkShaderModule skgpu::graphite::createVulkanShaderModule (const VulkanSharedContext *context, const std::string &spirv, VkShaderStageFlagBits stage)
 
VkDescriptorType skgpu::graphite::DsTypeEnumToVkDs (DescriptorType type)
 
void skgpu::graphite::DescriptorDataToVkDescSetLayout (const VulkanSharedContext *ctxt, const SkSpan< DescriptorData > &requestedDescriptors, VkDescriptorSetLayout *outLayout)
 
int skgpu::graphite::ycbcrPackaging::numInt32sNeeded (const VulkanYcbcrConversionInfo &conversionInfo)
 
uint32_t skgpu::graphite::ycbcrPackaging::nonFormatInfoAsUInt32 (const VulkanYcbcrConversionInfo &conversionInfo)
 
bool skgpu::graphite::vkFormatIsSupported (VkFormat format)
 
VkShaderStageFlags skgpu::graphite::PipelineStageFlagsToVkShaderStageFlags (SkEnumBitMask< PipelineStageFlags > stageFlags)
 

Variables

static constexpr int skgpu::graphite::ycbcrPackaging::kInt32sNeededKnownFormat = 2
 
static constexpr int skgpu::graphite::ycbcrPackaging::kInt32sNeededExternalFormat = 3
 
static constexpr int skgpu::graphite::ycbcrPackaging::kUsesExternalFormatBits = 1
 
static constexpr int skgpu::graphite::ycbcrPackaging::kYcbcrModelBits = 3
 
static constexpr int skgpu::graphite::ycbcrPackaging::kYcbcrRangeBits = 1
 
static constexpr int skgpu::graphite::ycbcrPackaging::kXChromaOffsetBits = 1
 
static constexpr int skgpu::graphite::ycbcrPackaging::kYChromaOffsetBits = 1
 
static constexpr int skgpu::graphite::ycbcrPackaging::kChromaFilterBits = 1
 
static constexpr int skgpu::graphite::ycbcrPackaging::kForceExplicitReconBits = 1
 
static constexpr int skgpu::graphite::ycbcrPackaging::kComponentBits = 3
 
static constexpr int skgpu::graphite::ycbcrPackaging::kUsesExternalFormatShift = 0
 
static constexpr int skgpu::graphite::ycbcrPackaging::kYcbcrModelShift
 
static constexpr int skgpu::graphite::ycbcrPackaging::kYcbcrRangeShift = kYcbcrModelShift + kYcbcrModelBits
 
static constexpr int skgpu::graphite::ycbcrPackaging::kXChromaOffsetShift = kYcbcrRangeShift + kYcbcrRangeBits
 
static constexpr int skgpu::graphite::ycbcrPackaging::kYChromaOffsetShift = kXChromaOffsetShift + kXChromaOffsetBits
 
static constexpr int skgpu::graphite::ycbcrPackaging::kChromaFilterShift = kYChromaOffsetShift + kYChromaOffsetBits
 
static constexpr int skgpu::graphite::ycbcrPackaging::kForceExplicitReconShift = kChromaFilterShift + kChromaFilterBits
 
static constexpr int skgpu::graphite::ycbcrPackaging::kComponentRShift = kForceExplicitReconShift + kComponentBits
 
static constexpr int skgpu::graphite::ycbcrPackaging::kComponentGShift = kComponentRShift + kComponentBits
 
static constexpr int skgpu::graphite::ycbcrPackaging::kComponentBShift = kComponentGShift + kComponentBits
 
static constexpr int skgpu::graphite::ycbcrPackaging::kComponentAShift = kComponentBShift + kComponentBits
 
static constexpr uint32_t skgpu::graphite::ycbcrPackaging::kUseExternalFormatMask
 
static constexpr uint32_t skgpu::graphite::ycbcrPackaging::kYcbcrModelMask
 
static constexpr uint32_t skgpu::graphite::ycbcrPackaging::kYcbcrRangeMask
 
static constexpr uint32_t skgpu::graphite::ycbcrPackaging::kXChromaOffsetMask
 
static constexpr uint32_t skgpu::graphite::ycbcrPackaging::kYChromaOffsetMask
 
static constexpr uint32_t skgpu::graphite::ycbcrPackaging::kChromaFilterMask
 
static constexpr uint32_t skgpu::graphite::ycbcrPackaging::kForceExplicitReconMask
 
static constexpr uint32_t skgpu::graphite::ycbcrPackaging::kComponentRMask = ((1 << kComponentBits) - 1) << kComponentRShift
 
static constexpr uint32_t skgpu::graphite::ycbcrPackaging::kComponentBMask = ((1 << kComponentBits) - 1) << kComponentGShift
 
static constexpr uint32_t skgpu::graphite::ycbcrPackaging::kComponentGMask = ((1 << kComponentBits) - 1) << kComponentBShift
 
static constexpr uint32_t skgpu::graphite::ycbcrPackaging::kComponentAMask = ((1 << kComponentBits) - 1) << kComponentAShift
 

Macro Definition Documentation

◆ VULKAN_CALL

#define VULKAN_CALL (   IFACE,
  X 
)    (IFACE)->fFunctions.f##X

Definition at line 22 of file VulkanGraphiteUtilsPriv.h.

◆ VULKAN_CALL_ERRCHECK

#define VULKAN_CALL_ERRCHECK (   SHARED_CONTEXT,
  X 
)
Value:
VULKAN_CALL_RESULT(SHARED_CONTEXT, SK_MACRO_APPEND_LINE(ret), X)
#define SK_MACRO_APPEND_LINE(name)
Definition: SkMacros.h:25
static const SkScalar X
Definition: StrokeBench.cpp:54
VkResult
Definition: vulkan_core.h:140

Definition at line 42 of file VulkanGraphiteUtilsPriv.h.

◆ VULKAN_CALL_RESULT

#define VULKAN_CALL_RESULT (   SHARED_CONTEXT,
  RESULT,
  X 
)
Value:
do { \
(RESULT) = VULKAN_CALL((SHARED_CONTEXT)->interface(), X); \
VULKAN_LOG_IF_NOT_SUCCESS(SHARED_CONTEXT, RESULT, #X); \
(SHARED_CONTEXT)->checkVkResult(RESULT); \
} while (false)
#define RESULT(Op)
#define VULKAN_CALL(IFACE, X)
@ VK_ERROR_DEVICE_LOST
Definition: vulkan_core.h:150
@ VK_SUCCESS
Definition: vulkan_core.h:141

Definition at line 33 of file VulkanGraphiteUtilsPriv.h.

◆ VULKAN_CALL_RESULT_NOCHECK

#define VULKAN_CALL_RESULT_NOCHECK (   IFACE,
  RESULT,
  X 
)
Value:
do { \
(RESULT) = VULKAN_CALL(IFACE, X); \
} while (false)

Definition at line 46 of file VulkanGraphiteUtilsPriv.h.

◆ VULKAN_LOG_IF_NOT_SUCCESS

#define VULKAN_LOG_IF_NOT_SUCCESS (   SHARED_CONTEXT,
  RESULT,
  X,
  ... 
)
Value:
do { \
if (RESULT != VK_SUCCESS && !(SHARED_CONTEXT)->isDeviceLost()) { \
SkDebugf("Failed vulkan call. Error: %d, " X "\n", RESULT, ##__VA_ARGS__); \
} \
} while (false)

Definition at line 26 of file VulkanGraphiteUtilsPriv.h.