23 result += separator() +
"vulkan";
26 result += separator() +
"metal";
29 result += separator() +
"webgpu";
32 result += separator() +
"direct3d";
35 result += separator() +
"rgba8";
38 result += separator() +
"rgba32f";
41 result += separator() +
"r32f";
71 result += separator() +
"origin_upper_left";
74 result += separator() +
"blend_support_all_equations";
77 result += separator() +
"push_constant";
80 result += separator() +
"color";
139 context.fErrors->error(
pos,
"only one backend qualifier can be used");
144 if (
SkPopCount(pixelFormatFlags.value()) > 1) {
145 context.fErrors->error(
pos,
"only one pixel format qualifier can be used");
151 context.fErrors->error(
pos,
"'binding' modifier cannot coexist with 'texture'/'sampler'");
156 permittedLayoutFlags &= ~LayoutFlag::kTexture;
157 permittedLayoutFlags &= ~LayoutFlag::kSampler;
161 permittedLayoutFlags &= ~LayoutFlag::kPushConstant;
165 permittedLayoutFlags &= ~LayoutFlag::kSet;
168 for (
const auto& lf : kLayoutFlags) {
169 if (layoutFlags & lf.flag) {
170 if (!(permittedLayoutFlags & lf.flag)) {
171 context.fErrors->error(
pos,
"layout qualifier '" + std::string(lf.name) +
172 "' is not permitted here");
175 layoutFlags &= ~lf.flag;
183 return fFlags == other.fFlags &&
190 fSet == other.fSet &&
static int SkPopCount(uint32_t n)
FlutterSemanticsFlag flag
std::string void void auto Separator()
@ kBlendSupportAllEquations
SkEnumBitMask< SkSL::LayoutFlag > LayoutFlags
DEF_SWITCHES_START aot vmservice shared library name
static SkString to_string(int n)
std::string description() const
std::string paddedDescription() const
bool checkPermittedLayout(const Context &context, Position pos, LayoutFlags permittedLayoutFlags) const
int fInputAttachmentIndex
bool operator==(const Layout &other) const