Minor SkSL cleanup
- Fix a tiny documentation bug in the README: layout(key) needs to be on an 'in' variable (not just a 'uniform'). - Remove an unused list of key variables from GrSkSLFP. Guessing that this was planned to be used, but the key calculation requires a running offset through all input variables, so doesn't refer to this. Bug: skia:9451 Change-Id: I0f32a742c14c0ba70a2c3373b92438093cd62216 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243423 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
a577525214
commit
801dd1bb0d
@ -37,9 +37,6 @@ GrSkSLFPFactory::GrSkSLFPFactory(const char* name, const GrShaderCaps* shaderCap
|
||||
if (var.fModifiers.fFlags & SkSL::Modifiers::kIn_Flag) {
|
||||
fInputVars.push_back(&var);
|
||||
}
|
||||
if (var.fModifiers.fLayout.fKey) {
|
||||
fKeyVars.push_back(&var);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -176,8 +176,6 @@ public:
|
||||
|
||||
std::vector<const SkSL::Variable*> fInputVars;
|
||||
|
||||
std::vector<const SkSL::Variable*> fKeyVars;
|
||||
|
||||
std::unordered_map<SkSL::String, std::unique_ptr<const SkSL::Program>> fSpecializations;
|
||||
|
||||
friend class GrSkSLFP;
|
||||
|
@ -141,7 +141,7 @@ Within an '.fp' fragment processor file:
|
||||
'layout(when=foo) uniform int x;' means that this uniform will only be
|
||||
emitted when the 'foo' expression is true.
|
||||
* 'in' variables support an additional 'key' layout key.
|
||||
'layout(key) uniform int x;' means that this uniform should be included in
|
||||
'layout(key) in uniform int x;' means that this uniform should be included in
|
||||
the program's key. Matrix variables additionally support 'key=identity',
|
||||
which causes the key to consider only whether or not the matrix is an
|
||||
identity matrix.
|
||||
|
Loading…
Reference in New Issue
Block a user