aboutsummaryrefslogtreecommitdiff
path: root/source/opt/interp_fixup_pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/opt/interp_fixup_pass.cpp')
-rw-r--r--source/opt/interp_fixup_pass.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/opt/interp_fixup_pass.cpp b/source/opt/interp_fixup_pass.cpp
index bb6f6108..e8cdd99f 100644
--- a/source/opt/interp_fixup_pass.cpp
+++ b/source/opt/interp_fixup_pass.cpp
@@ -25,10 +25,11 @@
namespace spvtools {
namespace opt {
+
namespace {
// Input Operand Indices
-constexpr int kSpvVariableStorageClassInIdx = 0;
+static const int kSpvVariableStorageClassInIdx = 0;
// Folding rule function which attempts to replace |op(OpLoad(a),...)|
// by |op(a,...)|, where |op| is one of the GLSLstd450 InterpolateAt*
@@ -44,12 +45,12 @@ bool ReplaceInternalInterpolate(IRContext* ctx, Instruction* inst,
uint32_t op1_id = inst->GetSingleWordInOperand(2);
Instruction* load_inst = ctx->get_def_use_mgr()->GetDef(op1_id);
- if (load_inst->opcode() != spv::Op::OpLoad) return false;
+ if (load_inst->opcode() != SpvOpLoad) return false;
Instruction* base_inst = load_inst->GetBaseAddress();
- USE_ASSERT(base_inst->opcode() == spv::Op::OpVariable &&
- spv::StorageClass(base_inst->GetSingleWordInOperand(
- kSpvVariableStorageClassInIdx)) == spv::StorageClass::Input &&
+ USE_ASSERT(base_inst->opcode() == SpvOpVariable &&
+ base_inst->GetSingleWordInOperand(kSpvVariableStorageClassInIdx) ==
+ SpvStorageClassInput &&
"unexpected interpolant in InterpolateAt*");
uint32_t ptr_id = load_inst->GetSingleWordInOperand(0);