simplify a confusing expression in SkSLSPIRVCodeGenerator
Bug: skia:
Change-Id: I3ce0c174677cf93903a5fb33287dfe1df3445837
Reviewed-on: https://skia-review.googlesource.com/18141
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Bruce Dawson <brucedawson@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.cpp b/src/sksl/SkSLSPIRVCodeGenerator.cpp
index 00ab25c..9cc25b9 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.cpp
+++ b/src/sksl/SkSLSPIRVCodeGenerator.cpp
@@ -2566,8 +2566,8 @@
}
SpvId SPIRVCodeGenerator::writeInterfaceBlock(const InterfaceBlock& intf) {
- MemoryLayout layout = intf.fVariable.fModifiers.fLayout.fPushConstant |
- (0 != (intf.fVariable.fModifiers.fFlags & Modifiers::kBuffer_Flag)) ?
+ bool isBuffer = (0 != (intf.fVariable.fModifiers.fFlags & Modifiers::kBuffer_Flag));
+ MemoryLayout layout = (intf.fVariable.fModifiers.fLayout.fPushConstant || isBuffer) ?
MemoryLayout(MemoryLayout::k430_Standard) :
fDefaultLayout;
SpvId result = this->nextId();