blob: 7956995ec5cb5afe44dee9d2768d36c2116a9813 [file] [log] [blame]
Ben Claytond4e4c662019-02-26 11:54:34 +00001// 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 Claytond4e4c662019-02-26 11:54:34 +000017#include "SpirvShader.hpp"
18
Ben Claytonbdfcfe92020-02-24 14:54:25 +000019#include "spirv-tools/libspirv.h"
20#include "spirv/unified1/spirv.h"
Ben Claytonfb7ca1d2019-11-28 16:41:06 +000021
22namespace sw {
23
24std::string SpirvShader::OpcodeName(spv::Op op)
25{
26 return spvOpcodeString(static_cast<SpvOp>(op));
27}
Ben Claytond4e4c662019-02-26 11:54:34 +000028
Ben Claytonbc1c067be2019-12-17 20:37:37 +000029} // namespace sw