• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (c) 2020 The Khronos Group Inc.
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
15declare interface SpirvTools {
16  as(input: string, env: number, options: number): Uint8Array;
17  dis(input: Uint8Array, env: number, options: number): string;
18
19  SPV_ENV_UNIVERSAL_1_0: number;
20  SPV_ENV_VULKAN_1_0: number;
21  SPV_ENV_UNIVERSAL_1_1: number;
22  SPV_ENV_OPENCL_2_1: number;
23  SPV_ENV_OPENCL_2_2: number;
24  SPV_ENV_OPENGL_4_0: number;
25  SPV_ENV_OPENGL_4_1: number;
26  SPV_ENV_OPENGL_4_2: number;
27  SPV_ENV_OPENGL_4_3: number;
28  SPV_ENV_OPENGL_4_5: number;
29  SPV_ENV_UNIVERSAL_1_2: number;
30  SPV_ENV_OPENCL_1_2: number;
31  SPV_ENV_OPENCL_EMBEDDED_1_2: number;
32  SPV_ENV_OPENCL_2_0: number;
33  SPV_ENV_OPENCL_EMBEDDED_2_0: number;
34  SPV_ENV_OPENCL_EMBEDDED_2_1: number;
35  SPV_ENV_OPENCL_EMBEDDED_2_2: number;
36  SPV_ENV_UNIVERSAL_1_3: number;
37  SPV_ENV_VULKAN_1_1: number;
38  SPV_ENV_WEBGPU_0: number;
39  SPV_ENV_UNIVERSAL_1_4: number;
40  SPV_ENV_VULKAN_1_1_SPIRV_1_4: number;
41  SPV_ENV_UNIVERSAL_1_5: number;
42  SPV_ENV_VULKAN_1_2: number;
43  SPV_ENV_UNIVERSAL_1_6: number;
44
45  SPV_TEXT_TO_BINARY_OPTION_NONE: number;
46  SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS: number;
47
48  SPV_BINARY_TO_TEXT_OPTION_NONE: number;
49  SPV_BINARY_TO_TEXT_OPTION_PRINT: number;
50  SPV_BINARY_TO_TEXT_OPTION_COLOR: number;
51  SPV_BINARY_TO_TEXT_OPTION_INDENT: number;
52  SPV_BINARY_TO_TEXT_OPTION_SHOW_BYTE_OFFSET: number;
53  SPV_BINARY_TO_TEXT_OPTION_NO_HEADER: number;
54  SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES: number;
55}
56
57export default function (): Promise<SpirvTools>;
58