Ben Clayton | d4e4c66 | 2019-02-26 11:54:34 +0000 | [diff] [blame] | 1 | // Copyright 2019 The SwiftShader Authors. All Rights Reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | // This file contains code used to aid debugging. |
| 16 | |
Ben Clayton | d4e4c66 | 2019-02-26 11:54:34 +0000 | [diff] [blame] | 17 | #include "SpirvShader.hpp" |
| 18 | |
Ben Clayton | bdfcfe9 | 2020-02-24 14:54:25 +0000 | [diff] [blame] | 19 | #include "spirv-tools/libspirv.h" |
| 20 | #include "spirv/unified1/spirv.h" |
Ben Clayton | fb7ca1d | 2019-11-28 16:41:06 +0000 | [diff] [blame] | 21 | |
| 22 | namespace sw { |
| 23 | |
| 24 | std::string SpirvShader::OpcodeName(spv::Op op) |
| 25 | { |
| 26 | return spvOpcodeString(static_cast<SpvOp>(op)); |
| 27 | } |
Ben Clayton | d4e4c66 | 2019-02-26 11:54:34 +0000 | [diff] [blame] | 28 | |
Ben Clayton | bc1c067be | 2019-12-17 20:37:37 +0000 | [diff] [blame] | 29 | } // namespace sw |