Go to the source code of this file.
◆ finalize_helper()
Definition at line 82 of file GrSPIRVVaryingHandler.cpp.
82 {
83 int locationIndex = 0;
86 location.
appendf(
"location = %d", locationIndex);
87 var.addLayoutQualifier(location.
c_str());
88
91 int numElements = var.isArray() ? var.getArrayCount() : 1;
93 locationIndex += elementSize * numElements;
94 }
95
96}
static int sksltype_to_location_size(SkSLType type)
const char * c_str() const
void void void appendf(const char format[],...) SK_PRINTF_LIKE(2
◆ sksltype_to_location_size()
Returns the number of locations take up by a given SkSLType. We assume that all scalar values are 32 bits.
Definition at line 12 of file GrSPIRVVaryingHandler.cpp.
12 {
13
15
18 return 0;
21 return 1;
24 return 1;
27 return 1;
30 return 1;
35 return 1;
40 return 1;
45 return 1;
48 return 2;
51 return 3;
54 return 4;
56 return 0;
58 return 0;
60 return 0;
65 return 1;
68 return 1;
71 return 1;
73 return 0;
75 return 0;
77 return 0;
78 }
80}
#define SK_ABORT(message,...)
static const int kSkSLTypeCount
@ kTextureExternalSampler