diff options
author | James Farrell <jamesfarrell@google.com> | 2023-01-19 20:23:21 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-01-19 20:23:38 +0000 |
commit | 12f5c853ee9e06ba6565006d8d36ee261a140d91 (patch) | |
tree | c8ac54510931ab3549d323a0056bed2dd7d8237f /source/fuzz/transformation_toggle_access_chain_instruction.cpp | |
parent | d75f78543eeb24bd8441f2f07f34d273613c64fa (diff) | |
download | spirv-tools-ndk-r26-release.tar.gz |
Revert "Merge commit '0e6fbba7762c0' into update-shaderc"ndk-r27-rc1ndk-r26dndk-r26cndk-r26bndk-r26-rc1ndk-r26-beta1ndk-r26ndk-r27-releasendk-r26-releasemaster-ndk
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.cpp | 15 |
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); } } |