Revert "Revert "moved SkSL FloatLiteral data into IRNode""
This reverts commit a0c82f08df58dcd0e1d143db9ccab38f8d823b95.
Change-Id: Ic2e93591c64992ec22e477bd0975d71954bef1c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321469
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.cpp b/src/sksl/SkSLSPIRVCodeGenerator.cpp
index 1cf94f4..81bcb1b 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.cpp
+++ b/src/sksl/SkSLSPIRVCodeGenerator.cpp
@@ -2555,8 +2555,8 @@
} else {
constantType = ConstantType::kFloat;
}
- float value = (float) f.fValue;
- std::pair<ConstantValue, ConstantType> key(f.fValue, constantType);
+ float value = (float) f.value();
+ std::pair<ConstantValue, ConstantType> key(f.value(), constantType);
auto entry = fNumberConstants.find(key);
if (entry == fNumberConstants.end()) {
SpvId result = this->nextId();