aboutsummaryrefslogtreecommitdiff
path: root/source/fuzz/transformation_toggle_access_chain_instruction.cpp
diff options
context:
space:
mode:
authorJames Farrell <jamesfarrell@google.com>2023-01-19 20:23:21 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-01-19 20:23:38 +0000
commit12f5c853ee9e06ba6565006d8d36ee261a140d91 (patch)
treec8ac54510931ab3549d323a0056bed2dd7d8237f /source/fuzz/transformation_toggle_access_chain_instruction.cpp
parentd75f78543eeb24bd8441f2f07f34d273613c64fa (diff)
downloadspirv-tools-ndk-r26-release.tar.gz
Revert submission 2388945-update-shaderc Reason for revert: Breaks NDK build on darwin. Reverted changes: /q/submissionid:2388945-update-shaderc Change-Id: I6c9b1918c98bcc3a68bbfabd40d4310e26337c24
Diffstat (limited to 'source/fuzz/transformation_toggle_access_chain_instruction.cpp')
-rw-r--r--source/fuzz/transformation_toggle_access_chain_instruction.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/source/fuzz/transformation_toggle_access_chain_instruction.cpp b/source/fuzz/transformation_toggle_access_chain_instruction.cpp
index ae6ab9ad..34523fe8 100644
--- a/source/fuzz/transformation_toggle_access_chain_instruction.cpp
+++ b/source/fuzz/transformation_toggle_access_chain_instruction.cpp
@@ -39,15 +39,14 @@ bool TransformationToggleAccessChainInstruction::IsApplicable(
return false;
}
- spv::Op opcode = static_cast<spv::Op>(
+ SpvOp opcode = static_cast<SpvOp>(
message_.instruction_descriptor().target_instruction_opcode());
assert(instruction->opcode() == opcode &&
"The located instruction must have the same opcode as in the "
"descriptor.");
- if (opcode == spv::Op::OpAccessChain ||
- opcode == spv::Op::OpInBoundsAccessChain) {
+ if (opcode == SpvOpAccessChain || opcode == SpvOpInBoundsAccessChain) {
return true;
}
@@ -58,15 +57,15 @@ void TransformationToggleAccessChainInstruction::Apply(
opt::IRContext* ir_context, TransformationContext* /*unused*/) const {
auto instruction =
FindInstruction(message_.instruction_descriptor(), ir_context);
- spv::Op opcode = instruction->opcode();
+ SpvOp opcode = instruction->opcode();
- if (opcode == spv::Op::OpAccessChain) {
- instruction->SetOpcode(spv::Op::OpInBoundsAccessChain);
+ if (opcode == SpvOpAccessChain) {
+ instruction->SetOpcode(SpvOpInBoundsAccessChain);
} else {
- assert(opcode == spv::Op::OpInBoundsAccessChain &&
+ assert(opcode == SpvOpInBoundsAccessChain &&
"The located instruction must be an OpInBoundsAccessChain "
"instruction.");
- instruction->SetOpcode(spv::Op::OpAccessChain);
+ instruction->SetOpcode(SpvOpAccessChain);
}
}