moved SkSL IntLiteral data into IRNode
Change-Id: I3c6e968af6eba32eae1f1402f7603f27e949c638
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320067
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.cpp b/src/sksl/SkSLSPIRVCodeGenerator.cpp
index c7f86ba..fb2e044 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.cpp
+++ b/src/sksl/SkSLSPIRVCodeGenerator.cpp
@@ -2534,11 +2534,11 @@
} else {
SkASSERT(false);
}
- std::pair<ConstantValue, ConstantType> key(i.fValue, constantType);
+ std::pair<ConstantValue, ConstantType> key(i.value(), constantType);
auto entry = fNumberConstants.find(key);
if (entry == fNumberConstants.end()) {
SpvId result = this->nextId();
- this->writeInstruction(SpvOpConstant, this->getType(type), result, (SpvId) i.fValue,
+ this->writeInstruction(SpvOpConstant, this->getType(type), result, (SpvId) i.value(),
fConstantBuffer);
fNumberConstants[key] = result;
return result;
@@ -3064,7 +3064,7 @@
if (!s.fCases[i]->fValue) {
continue;
}
- this->writeWord(s.fCases[i]->fValue->as<IntLiteral>().fValue, out);
+ this->writeWord(s.fCases[i]->fValue->as<IntLiteral>().value(), out);
this->writeWord(labels[i], out);
}
for (size_t i = 0; i < s.fCases.size(); ++i) {