2016-07-01 15:22:01 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2016 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
2016-11-28 16:23:23 +00:00
|
|
|
|
2016-07-01 15:22:01 +00:00
|
|
|
#ifndef SKSL_LAYOUT
|
|
|
|
#define SKSL_LAYOUT
|
|
|
|
|
2019-04-23 17:05:21 +00:00
|
|
|
#include "src/sksl/SkSLString.h"
|
|
|
|
#include "src/sksl/SkSLUtil.h"
|
2016-11-28 16:23:23 +00:00
|
|
|
|
2016-07-01 15:22:01 +00:00
|
|
|
namespace SkSL {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents a layout block appearing before a variable declaration, as in:
|
|
|
|
*
|
|
|
|
* layout (location = 0) int x;
|
|
|
|
*/
|
|
|
|
struct Layout {
|
2017-11-27 18:12:30 +00:00
|
|
|
enum Flag {
|
|
|
|
kOriginUpperLeft_Flag = 1 << 0,
|
|
|
|
kOverrideCoverage_Flag = 1 << 1,
|
|
|
|
kPushConstant_Flag = 1 << 2,
|
|
|
|
kBlendSupportAllEquations_Flag = 1 << 3,
|
|
|
|
kBlendSupportMultiply_Flag = 1 << 4,
|
|
|
|
kBlendSupportScreen_Flag = 1 << 5,
|
|
|
|
kBlendSupportOverlay_Flag = 1 << 6,
|
|
|
|
kBlendSupportDarken_Flag = 1 << 7,
|
|
|
|
kBlendSupportLighten_Flag = 1 << 8,
|
|
|
|
kBlendSupportColorDodge_Flag = 1 << 9,
|
|
|
|
kBlendSupportColorBurn_Flag = 1 << 10,
|
|
|
|
kBlendSupportHardLight_Flag = 1 << 11,
|
|
|
|
kBlendSupportSoftLight_Flag = 1 << 12,
|
|
|
|
kBlendSupportDifference_Flag = 1 << 13,
|
|
|
|
kBlendSupportExclusion_Flag = 1 << 14,
|
|
|
|
kBlendSupportHSLHue_Flag = 1 << 15,
|
|
|
|
kBlendSupportHSLSaturation_Flag = 1 << 16,
|
|
|
|
kBlendSupportHSLColor_Flag = 1 << 17,
|
2018-08-31 14:52:47 +00:00
|
|
|
kBlendSupportHSLLuminosity_Flag = 1 << 18,
|
|
|
|
kTracked_Flag = 1 << 19
|
2017-11-27 18:12:30 +00:00
|
|
|
};
|
|
|
|
|
2017-02-16 21:37:32 +00:00
|
|
|
enum Primitive {
|
|
|
|
kUnspecified_Primitive = -1,
|
|
|
|
kPoints_Primitive,
|
|
|
|
kLines_Primitive,
|
|
|
|
kLineStrip_Primitive,
|
|
|
|
kLinesAdjacency_Primitive,
|
|
|
|
kTriangles_Primitive,
|
|
|
|
kTriangleStrip_Primitive,
|
|
|
|
kTrianglesAdjacency_Primitive
|
|
|
|
};
|
|
|
|
|
2016-11-28 16:23:23 +00:00
|
|
|
// These are used by images in GLSL. We only support a subset of what GL supports.
|
|
|
|
enum class Format {
|
|
|
|
kUnspecified = -1,
|
|
|
|
kRGBA32F,
|
|
|
|
kR32F,
|
|
|
|
kRGBA16F,
|
|
|
|
kR16F,
|
2019-07-22 12:48:18 +00:00
|
|
|
kLUMINANCE16F,
|
2016-11-28 16:23:23 +00:00
|
|
|
kRGBA8,
|
|
|
|
kR8,
|
|
|
|
kRGBA8I,
|
|
|
|
kR8I,
|
2019-01-11 15:31:48 +00:00
|
|
|
kRG16F,
|
2016-11-28 16:23:23 +00:00
|
|
|
};
|
|
|
|
|
2017-06-29 14:03:38 +00:00
|
|
|
// used by SkSL processors
|
|
|
|
enum Key {
|
|
|
|
// field is not a key
|
|
|
|
kNo_Key,
|
|
|
|
// field is a key
|
|
|
|
kKey_Key,
|
|
|
|
// key is 0 or 1 depending on whether the matrix is an identity matrix
|
|
|
|
kIdentity_Key,
|
|
|
|
};
|
|
|
|
|
2018-08-31 20:13:58 +00:00
|
|
|
enum class CType {
|
|
|
|
kDefault,
|
2019-04-02 21:30:23 +00:00
|
|
|
kBool,
|
2018-08-31 20:13:58 +00:00
|
|
|
kFloat,
|
2019-11-21 16:14:11 +00:00
|
|
|
kFloat2,
|
|
|
|
kFloat3,
|
|
|
|
kFloat4,
|
2018-08-31 20:13:58 +00:00
|
|
|
kInt32,
|
|
|
|
kSkRect,
|
|
|
|
kSkIRect,
|
2018-10-03 20:35:54 +00:00
|
|
|
kSkPMColor4f,
|
2018-08-31 20:13:58 +00:00
|
|
|
kSkPMColor,
|
2020-01-22 19:31:21 +00:00
|
|
|
kSkV4,
|
2018-08-31 20:13:58 +00:00
|
|
|
kSkPoint,
|
|
|
|
kSkIPoint,
|
|
|
|
kSkMatrix,
|
2020-01-22 19:31:21 +00:00
|
|
|
kSkM44,
|
2020-02-11 20:49:27 +00:00
|
|
|
kGrSurfaceProxyView,
|
2018-08-31 20:13:58 +00:00
|
|
|
kGrFragmentProcessor,
|
|
|
|
};
|
|
|
|
|
2016-11-28 16:23:23 +00:00
|
|
|
static const char* FormatToStr(Format format) {
|
|
|
|
switch (format) {
|
|
|
|
case Format::kUnspecified: return "";
|
|
|
|
case Format::kRGBA32F: return "rgba32f";
|
|
|
|
case Format::kR32F: return "r32f";
|
|
|
|
case Format::kRGBA16F: return "rgba16f";
|
|
|
|
case Format::kR16F: return "r16f";
|
2019-07-22 12:48:18 +00:00
|
|
|
case Format::kLUMINANCE16F: return "lum16f";
|
2016-11-28 16:23:23 +00:00
|
|
|
case Format::kRGBA8: return "rgba8";
|
|
|
|
case Format::kR8: return "r8";
|
|
|
|
case Format::kRGBA8I: return "rgba8i";
|
|
|
|
case Format::kR8I: return "r8i";
|
2019-01-11 15:31:48 +00:00
|
|
|
case Format::kRG16F: return "rg16f";
|
2016-11-28 16:23:23 +00:00
|
|
|
}
|
2017-03-31 17:56:23 +00:00
|
|
|
ABORT("Unexpected format");
|
2016-11-28 16:23:23 +00:00
|
|
|
}
|
|
|
|
|
2017-03-31 17:56:23 +00:00
|
|
|
static bool ReadFormat(String str, Format* format) {
|
2016-11-28 16:23:23 +00:00
|
|
|
if (str == "rgba32f") {
|
|
|
|
*format = Format::kRGBA32F;
|
|
|
|
return true;
|
|
|
|
} else if (str == "r32f") {
|
|
|
|
*format = Format::kR32F;
|
|
|
|
return true;
|
|
|
|
} else if (str == "rgba16f") {
|
|
|
|
*format = Format::kRGBA16F;
|
|
|
|
return true;
|
|
|
|
} else if (str == "r16f") {
|
|
|
|
*format = Format::kR16F;
|
|
|
|
return true;
|
2019-07-22 12:48:18 +00:00
|
|
|
} else if (str == "lum16f") {
|
|
|
|
*format = Format::kLUMINANCE16F;
|
|
|
|
return true;
|
2016-11-28 16:23:23 +00:00
|
|
|
} else if (str == "rgba8") {
|
|
|
|
*format = Format::kRGBA8;
|
|
|
|
return true;
|
|
|
|
} else if (str == "r8") {
|
|
|
|
*format = Format::kR8;
|
|
|
|
return true;
|
|
|
|
} else if (str == "rgba8i") {
|
|
|
|
*format = Format::kRGBA8I;
|
|
|
|
return true;
|
|
|
|
} else if (str == "r8i") {
|
|
|
|
*format = Format::kR8I;
|
|
|
|
return true;
|
2019-01-11 15:31:48 +00:00
|
|
|
} else if (str == "rg16f") {
|
|
|
|
*format = Format::kRG16F;
|
|
|
|
return true;
|
2016-11-28 16:23:23 +00:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
2016-07-01 15:22:01 +00:00
|
|
|
|
2018-08-31 20:13:58 +00:00
|
|
|
static const char* CTypeToStr(CType ctype) {
|
|
|
|
switch (ctype) {
|
|
|
|
case CType::kDefault:
|
|
|
|
return nullptr;
|
|
|
|
case CType::kFloat:
|
|
|
|
return "float";
|
|
|
|
case CType::kInt32:
|
|
|
|
return "int32_t";
|
|
|
|
case CType::kSkRect:
|
|
|
|
return "SkRect";
|
|
|
|
case CType::kSkIRect:
|
|
|
|
return "SkIRect";
|
2018-10-03 20:35:54 +00:00
|
|
|
case CType::kSkPMColor4f:
|
|
|
|
return "SkPMColor4f";
|
2018-08-31 20:13:58 +00:00
|
|
|
case CType::kSkPMColor:
|
|
|
|
return "SkPMColor";
|
2020-01-22 19:31:21 +00:00
|
|
|
case CType::kSkV4:
|
|
|
|
return "SkV4";
|
2018-08-31 20:13:58 +00:00
|
|
|
case CType::kSkPoint:
|
|
|
|
return "SkPoint";
|
|
|
|
case CType::kSkIPoint:
|
|
|
|
return "SkIPoint";
|
|
|
|
case CType::kSkMatrix:
|
|
|
|
return "SkMatrix";
|
2020-01-22 19:31:21 +00:00
|
|
|
case CType::kSkM44:
|
|
|
|
return "SkM44";
|
2020-02-11 20:49:27 +00:00
|
|
|
case CType::kGrSurfaceProxyView:
|
|
|
|
return "GrSurfaceProxyView";
|
2018-08-31 20:13:58 +00:00
|
|
|
case CType::kGrFragmentProcessor:
|
|
|
|
return "std::unique_ptr<GrFragmentProcessor>";
|
|
|
|
default:
|
|
|
|
SkASSERT(false);
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-27 18:12:30 +00:00
|
|
|
Layout(int flags, int location, int offset, int binding, int index, int set, int builtin,
|
|
|
|
int inputAttachmentIndex, Format format, Primitive primitive, int maxVertices,
|
2020-04-15 18:18:13 +00:00
|
|
|
int invocations, StringFragment marker, StringFragment when, Key key, CType ctype)
|
2017-11-27 18:12:30 +00:00
|
|
|
: fFlags(flags)
|
|
|
|
, fLocation(location)
|
2016-11-28 21:30:17 +00:00
|
|
|
, fOffset(offset)
|
2016-07-01 15:22:01 +00:00
|
|
|
, fBinding(binding)
|
|
|
|
, fIndex(index)
|
|
|
|
, fSet(set)
|
2016-08-03 19:43:36 +00:00
|
|
|
, fBuiltin(builtin)
|
2016-11-22 14:44:03 +00:00
|
|
|
, fInputAttachmentIndex(inputAttachmentIndex)
|
2016-11-22 16:39:36 +00:00
|
|
|
, fFormat(format)
|
2017-02-16 21:37:32 +00:00
|
|
|
, fPrimitive(primitive)
|
|
|
|
, fMaxVertices(maxVertices)
|
2017-06-29 14:03:38 +00:00
|
|
|
, fInvocations(invocations)
|
2020-04-15 18:18:13 +00:00
|
|
|
, fMarker(marker)
|
2017-06-29 14:03:38 +00:00
|
|
|
, fWhen(when)
|
2017-10-26 13:30:08 +00:00
|
|
|
, fKey(key)
|
|
|
|
, fCType(ctype) {}
|
2016-11-16 17:06:01 +00:00
|
|
|
|
2016-11-22 14:44:03 +00:00
|
|
|
Layout()
|
2017-11-27 18:12:30 +00:00
|
|
|
: fFlags(0)
|
|
|
|
, fLocation(-1)
|
2016-11-28 21:30:17 +00:00
|
|
|
, fOffset(-1)
|
2016-11-16 17:06:01 +00:00
|
|
|
, fBinding(-1)
|
|
|
|
, fIndex(-1)
|
|
|
|
, fSet(-1)
|
|
|
|
, fBuiltin(-1)
|
2016-11-22 14:44:03 +00:00
|
|
|
, fInputAttachmentIndex(-1)
|
2016-11-28 16:23:23 +00:00
|
|
|
, fFormat(Format::kUnspecified)
|
2017-02-16 21:37:32 +00:00
|
|
|
, fPrimitive(kUnspecified_Primitive)
|
|
|
|
, fMaxVertices(-1)
|
2017-06-29 14:03:38 +00:00
|
|
|
, fInvocations(-1)
|
2018-08-31 20:13:58 +00:00
|
|
|
, fKey(kNo_Key)
|
|
|
|
, fCType(CType::kDefault) {}
|
2016-07-01 15:22:01 +00:00
|
|
|
|
2017-03-31 17:56:23 +00:00
|
|
|
String description() const {
|
|
|
|
String result;
|
|
|
|
String separator;
|
2016-07-01 15:22:01 +00:00
|
|
|
if (fLocation >= 0) {
|
|
|
|
result += separator + "location = " + to_string(fLocation);
|
|
|
|
separator = ", ";
|
|
|
|
}
|
2016-11-28 21:30:17 +00:00
|
|
|
if (fOffset >= 0) {
|
|
|
|
result += separator + "offset = " + to_string(fOffset);
|
|
|
|
separator = ", ";
|
|
|
|
}
|
2016-07-01 15:22:01 +00:00
|
|
|
if (fBinding >= 0) {
|
|
|
|
result += separator + "binding = " + to_string(fBinding);
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fIndex >= 0) {
|
|
|
|
result += separator + "index = " + to_string(fIndex);
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fSet >= 0) {
|
|
|
|
result += separator + "set = " + to_string(fSet);
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fBuiltin >= 0) {
|
|
|
|
result += separator + "builtin = " + to_string(fBuiltin);
|
|
|
|
separator = ", ";
|
|
|
|
}
|
2016-11-22 14:44:03 +00:00
|
|
|
if (fInputAttachmentIndex >= 0) {
|
2018-08-17 03:15:27 +00:00
|
|
|
result += separator + "input_attachment_index = " + to_string(fInputAttachmentIndex);
|
2016-11-22 14:44:03 +00:00
|
|
|
separator = ", ";
|
|
|
|
}
|
2017-11-27 18:12:30 +00:00
|
|
|
if (Format::kUnspecified != fFormat) {
|
|
|
|
result += separator + FormatToStr(fFormat);
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kOriginUpperLeft_Flag) {
|
2016-08-03 19:43:36 +00:00
|
|
|
result += separator + "origin_upper_left";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
2017-11-27 18:12:30 +00:00
|
|
|
if (fFlags & kOverrideCoverage_Flag) {
|
2016-10-12 13:39:56 +00:00
|
|
|
result += separator + "override_coverage";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
2017-11-27 18:12:30 +00:00
|
|
|
if (fFlags & kBlendSupportAllEquations_Flag) {
|
2016-10-12 13:39:56 +00:00
|
|
|
result += separator + "blend_support_all_equations";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
2017-11-27 18:12:30 +00:00
|
|
|
if (fFlags & kBlendSupportMultiply_Flag) {
|
|
|
|
result += separator + "blend_support_multiply";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportScreen_Flag) {
|
|
|
|
result += separator + "blend_support_screen";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportOverlay_Flag) {
|
|
|
|
result += separator + "blend_support_overlay";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportDarken_Flag) {
|
|
|
|
result += separator + "blend_support_darken";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportLighten_Flag) {
|
|
|
|
result += separator + "blend_support_lighten";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportColorDodge_Flag) {
|
|
|
|
result += separator + "blend_support_colordodge";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportColorBurn_Flag) {
|
|
|
|
result += separator + "blend_support_colorburn";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportHardLight_Flag) {
|
|
|
|
result += separator + "blend_support_hardlight";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportSoftLight_Flag) {
|
|
|
|
result += separator + "blend_support_softlight";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportDifference_Flag) {
|
|
|
|
result += separator + "blend_support_difference";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportExclusion_Flag) {
|
|
|
|
result += separator + "blend_support_exclusion";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportHSLHue_Flag) {
|
|
|
|
result += separator + "blend_support_hsl_hue";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportHSLSaturation_Flag) {
|
|
|
|
result += separator + "blend_support_hsl_saturation";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportHSLColor_Flag) {
|
|
|
|
result += separator + "blend_support_hsl_color";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fFlags & kBlendSupportHSLLuminosity_Flag) {
|
|
|
|
result += separator + "blend_support_hsl_luminosity";
|
2016-11-16 17:06:01 +00:00
|
|
|
separator = ", ";
|
|
|
|
}
|
2017-11-27 18:12:30 +00:00
|
|
|
if (fFlags & kPushConstant_Flag) {
|
2016-11-22 16:39:36 +00:00
|
|
|
result += separator + "push_constant";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
2018-08-31 14:52:47 +00:00
|
|
|
if (fFlags & kTracked_Flag) {
|
|
|
|
result += separator + "tracked";
|
|
|
|
separator = ", ";
|
|
|
|
}
|
2017-02-16 21:37:32 +00:00
|
|
|
switch (fPrimitive) {
|
|
|
|
case kPoints_Primitive:
|
|
|
|
result += separator + "points";
|
|
|
|
separator = ", ";
|
|
|
|
break;
|
|
|
|
case kLines_Primitive:
|
|
|
|
result += separator + "lines";
|
|
|
|
separator = ", ";
|
|
|
|
break;
|
|
|
|
case kLineStrip_Primitive:
|
|
|
|
result += separator + "line_strip";
|
|
|
|
separator = ", ";
|
|
|
|
break;
|
|
|
|
case kLinesAdjacency_Primitive:
|
|
|
|
result += separator + "lines_adjacency";
|
|
|
|
separator = ", ";
|
|
|
|
break;
|
|
|
|
case kTriangles_Primitive:
|
|
|
|
result += separator + "triangles";
|
|
|
|
separator = ", ";
|
|
|
|
break;
|
|
|
|
case kTriangleStrip_Primitive:
|
|
|
|
result += separator + "triangle_strip";
|
|
|
|
separator = ", ";
|
|
|
|
break;
|
|
|
|
case kTrianglesAdjacency_Primitive:
|
|
|
|
result += separator + "triangles_adjacency";
|
|
|
|
separator = ", ";
|
|
|
|
break;
|
|
|
|
case kUnspecified_Primitive:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (fMaxVertices >= 0) {
|
|
|
|
result += separator + "max_vertices = " + to_string(fMaxVertices);
|
|
|
|
separator = ", ";
|
|
|
|
}
|
|
|
|
if (fInvocations >= 0) {
|
|
|
|
result += separator + "invocations = " + to_string(fInvocations);
|
|
|
|
separator = ", ";
|
|
|
|
}
|
2020-04-15 18:18:13 +00:00
|
|
|
if (fMarker.fLength) {
|
|
|
|
result += separator + "marker = " + fMarker;
|
|
|
|
separator = ", ";
|
|
|
|
}
|
2019-06-06 14:04:27 +00:00
|
|
|
if (fWhen.fLength) {
|
2017-06-29 14:03:38 +00:00
|
|
|
result += separator + "when = " + fWhen;
|
|
|
|
separator = ", ";
|
|
|
|
}
|
2016-11-21 15:39:35 +00:00
|
|
|
if (result.size() > 0) {
|
2016-07-01 15:22:01 +00:00
|
|
|
result = "layout (" + result + ")";
|
|
|
|
}
|
2018-07-31 13:44:36 +00:00
|
|
|
if (fKey) {
|
|
|
|
result += "/* key */";
|
|
|
|
}
|
2016-07-01 15:22:01 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator==(const Layout& other) const {
|
2017-11-27 18:12:30 +00:00
|
|
|
return fFlags == other.fFlags &&
|
|
|
|
fLocation == other.fLocation &&
|
|
|
|
fOffset == other.fOffset &&
|
|
|
|
fBinding == other.fBinding &&
|
|
|
|
fIndex == other.fIndex &&
|
|
|
|
fSet == other.fSet &&
|
|
|
|
fBuiltin == other.fBuiltin &&
|
|
|
|
fInputAttachmentIndex == other.fInputAttachmentIndex &&
|
|
|
|
fFormat == other.fFormat &&
|
|
|
|
fPrimitive == other.fPrimitive &&
|
|
|
|
fMaxVertices == other.fMaxVertices &&
|
2020-04-28 14:55:34 +00:00
|
|
|
fInvocations == other.fInvocations &&
|
2020-04-15 18:18:13 +00:00
|
|
|
fMarker == other.fMarker &&
|
2020-04-28 14:55:34 +00:00
|
|
|
fWhen == other.fWhen &&
|
|
|
|
fKey == other.fKey &&
|
|
|
|
fCType == other.fCType;
|
2016-07-01 15:22:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool operator!=(const Layout& other) const {
|
|
|
|
return !(*this == other);
|
|
|
|
}
|
|
|
|
|
2017-11-27 18:12:30 +00:00
|
|
|
int fFlags;
|
2016-08-03 19:43:36 +00:00
|
|
|
int fLocation;
|
2016-11-28 21:30:17 +00:00
|
|
|
int fOffset;
|
2016-08-03 19:43:36 +00:00
|
|
|
int fBinding;
|
|
|
|
int fIndex;
|
|
|
|
int fSet;
|
2016-11-22 14:44:03 +00:00
|
|
|
// builtin comes from SPIR-V and identifies which particular builtin value this object
|
|
|
|
// represents.
|
2016-08-03 19:43:36 +00:00
|
|
|
int fBuiltin;
|
2016-11-22 14:44:03 +00:00
|
|
|
// input_attachment_index comes from Vulkan/SPIR-V to connect a shader variable to the a
|
|
|
|
// corresponding attachment on the subpass in which the shader is being used.
|
|
|
|
int fInputAttachmentIndex;
|
2016-11-28 16:23:23 +00:00
|
|
|
Format fFormat;
|
2017-02-16 21:37:32 +00:00
|
|
|
Primitive fPrimitive;
|
|
|
|
int fMaxVertices;
|
|
|
|
int fInvocations;
|
2020-04-15 18:18:13 +00:00
|
|
|
// marker refers to matrices tagged on the SkCanvas with markCTM
|
|
|
|
StringFragment fMarker;
|
2019-06-06 14:04:27 +00:00
|
|
|
StringFragment fWhen;
|
2017-06-29 14:03:38 +00:00
|
|
|
Key fKey;
|
2018-08-31 20:13:58 +00:00
|
|
|
CType fCType;
|
2016-07-01 15:22:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|