~mmach/netext73/spirv-tools

« back to all changes in this revision

Viewing changes to source/val/instruction.h

  • Committer: mmach
  • Date: 2020-02-12 10:21:08 UTC
  • Revision ID: netbit73@gmail.com-20200212102108-cpy1rbztamlizq2a
2020.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <utility>
22
22
#include <vector>
23
23
 
 
24
#include "source/ext_inst.h"
24
25
#include "source/table.h"
25
26
#include "spirv-tools/libspirv.h"
26
27
 
85
86
    return inst_.ext_inst_type;
86
87
  }
87
88
 
 
89
  bool IsNonSemantic() const {
 
90
    return opcode() == SpvOp::SpvOpExtInst &&
 
91
           spvExtInstIsNonSemantic(inst_.ext_inst_type);
 
92
  }
 
93
 
 
94
  /// True if this is an OpExtInst for debug info extension.
 
95
  bool IsDebugInfo() const {
 
96
    return opcode() == SpvOp::SpvOpExtInst &&
 
97
           spvExtInstIsDebugInfo(inst_.ext_inst_type);
 
98
  }
 
99
 
88
100
  // Casts the words belonging to the operand under |index| to |T| and returns.
89
101
  template <typename T>
90
102
  T GetOperandAs(size_t index) const {