Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp')
-rw-r--r--source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp b/source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp
index d7bb3a82e..fbbeb3462 100644
--- a/source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp
+++ b/source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp
@@ -103,8 +103,8 @@ RemoveUnusedInstructionReductionOpportunityFinder::GetAvailableOpportunities(
continue;
}
if (spvOpcodeIsBlockTerminator(inst.opcode()) ||
- inst.opcode() == SpvOpSelectionMerge ||
- inst.opcode() == SpvOpLoopMerge) {
+ inst.opcode() == spv::Op::OpSelectionMerge ||
+ inst.opcode() == spv::Op::OpLoopMerge) {
// In this reduction pass we do not want to affect static
// control flow.
continue;
@@ -133,7 +133,7 @@ bool RemoveUnusedInstructionReductionOpportunityFinder::
&inst, [this](opt::Instruction* user, uint32_t use_index) -> bool {
return (user->IsDecoration() &&
!IsIndependentlyRemovableDecoration(*user)) ||
- (user->opcode() == SpvOpEntryPoint && use_index > 2);
+ (user->opcode() == spv::Op::OpEntryPoint && use_index > 2);
});
}
@@ -141,13 +141,13 @@ bool RemoveUnusedInstructionReductionOpportunityFinder::
IsIndependentlyRemovableDecoration(const opt::Instruction& inst) const {
uint32_t decoration;
switch (inst.opcode()) {
- case SpvOpDecorate:
- case SpvOpDecorateId:
- case SpvOpDecorateString:
+ case spv::Op::OpDecorate:
+ case spv::Op::OpDecorateId:
+ case spv::Op::OpDecorateString:
decoration = inst.GetSingleWordInOperand(1u);
break;
- case SpvOpMemberDecorate:
- case SpvOpMemberDecorateString:
+ case spv::Op::OpMemberDecorate:
+ case spv::Op::OpMemberDecorateString:
decoration = inst.GetSingleWordInOperand(2u);
break;
default:
@@ -160,12 +160,12 @@ bool RemoveUnusedInstructionReductionOpportunityFinder::
// not change the shader interface, will not make the shader invalid, will
// actually be found in practice, etc.
- switch (decoration) {
- case SpvDecorationRelaxedPrecision:
- case SpvDecorationNoSignedWrap:
- case SpvDecorationNoContraction:
- case SpvDecorationNoUnsignedWrap:
- case SpvDecorationUserSemantic:
+ switch (spv::Decoration(decoration)) {
+ case spv::Decoration::RelaxedPrecision:
+ case spv::Decoration::NoSignedWrap:
+ case spv::Decoration::NoContraction:
+ case spv::Decoration::NoUnsignedWrap:
+ case spv::Decoration::UserSemantic:
return true;
default:
return false;