• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2024 Valve Corporation
3  *
4  * SPDX-License-Identifier: MIT
5  */
6 
7 #ifndef AC_SHADER_DEBUG_INFO_H
8 #define AC_SHADER_DEBUG_INFO_H
9 
10 #include "stdint.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 enum ac_shader_debug_info_type {
17    ac_shader_debug_info_src_loc,
18 };
19 
20 /*
21  * ac_shader_debug_info holds information about a sequence of hardware instructions starting
22  * at ac_shader_debug_info::offset and ending at the offset of the next ac_shader_debug_info.
23  */
24 struct ac_shader_debug_info {
25    enum ac_shader_debug_info_type type;
26 
27    union {
28       struct {
29          /* Line number and spirv offset this instruction sequence was generated from. */
30          char *file;
31          uint32_t line;
32          uint32_t column;
33          uint32_t spirv_offset;
34       } src_loc;
35    };
36 
37    /* Offset into the shader binary: */
38    uint32_t offset;
39 };
40 
41 #ifdef __cplusplus
42 }
43 #endif
44 
45 #endif
46