#include <GrVkSamplerYcbcrConversion.h>
◆ Create()
Definition at line 14 of file GrVkSamplerYcbcrConversion.cpp.
15 {
17 return nullptr;
18 }
19
22
23#ifdef SK_BUILD_FOR_ANDROID
25 if (
info.fExternalFormat) {
26
29 externalFormat.
pNext =
nullptr;
32 ycbcrCreateInfo.
pNext = &externalFormat;
33 }
34#else
35
37#endif
38
39 if (!
info.fExternalFormat) {
41 }
42
43 VkSamplerYcbcrConversion conversion;
46 nullptr, &conversion));
48 return nullptr;
49 }
50
52}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define GR_VK_CALL_RESULT(GPU, RESULT, X)
bool supportsYcbcrConversion() const
const GrVkCaps & vkCaps() const
static SK_END_REQUIRE_DENSE Key GenerateKey(const skgpu::VulkanYcbcrConversionInfo &ycbcrInfo)
void SetupSamplerYcbcrConversionInfo(VkSamplerYcbcrConversionCreateInfo *outInfo, const VulkanYcbcrConversionInfo &conversionInfo)
@ VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID
◆ GenerateKey()
Definition at line 60 of file GrVkSamplerYcbcrConversion.cpp.
61 {
63 static const int kRangeShift = 3;
73 static const int kCompRShift = kReconShift + 1;
74 static const int kCompGShift = kCompRShift + 3;
75 static const int kCompBShift = kCompGShift + 3;
76 static const int kCompAShift = kCompBShift + 3;
81 static_assert(kCompAShift <= 17);
82
83 uint32_t ycbcrKey =
static_cast<uint32_t
>(ycbcrInfo.
fYcbcrModel);
84 ycbcrKey |= (
static_cast<uint32_t
>(ycbcrInfo.
fYcbcrRange) << kRangeShift);
89 ycbcrKey |= (
static_cast<uint32_t
>(ycbcrInfo.
fComponents.
r) << kCompRShift);
90 ycbcrKey |= (
static_cast<uint32_t
>(ycbcrInfo.
fComponents.
g) << kCompGShift);
91 ycbcrKey |= (
static_cast<uint32_t
>(ycbcrInfo.
fComponents.
b) << kCompBShift);
92 ycbcrKey |= (
static_cast<uint32_t
>(ycbcrInfo.
fComponents.
a) << kCompAShift);
93
95}
static constexpr int kChromaFilterShift
static constexpr int kYChromaOffsetShift
static constexpr int kXChromaOffsetShift
VkSamplerYcbcrRange fYcbcrRange
VkSamplerYcbcrModelConversion fYcbcrModel
VkComponentMapping fComponents
VkBool32 fForceExplicitReconstruction
VkChromaLocation fYChromaOffset
VkChromaLocation fXChromaOffset
◆ GetKey()
◆ Hash()
static uint32_t GrVkSamplerYcbcrConversion::Hash |
( |
const Key & |
key | ) |
|
|
inlinestatic |
◆ ycbcrConversion()
VkSamplerYcbcrConversion GrVkSamplerYcbcrConversion::ycbcrConversion |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: