amd: Add ac_shader_debug_info
This is very similar to nir_debug_info_instr but it can exist outside of a nir shader. Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
This commit is contained in:
committed by
Marge Bot
parent
4d09cd7fa5
commit
7dd9840128
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2024 Valve Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#ifndef AC_SHADER_DEBUG_INFO_H
|
||||
#define AC_SHADER_DEBUG_INFO_H
|
||||
|
||||
#include "stdint.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum ac_shader_debug_info_type {
|
||||
ac_shader_debug_info_src_loc,
|
||||
};
|
||||
|
||||
/*
|
||||
* ac_shader_debug_info holds information about a sequence of hardware instructions starting
|
||||
* at ac_shader_debug_info::offset and ending at the offset of the next ac_shader_debug_info.
|
||||
*/
|
||||
struct ac_shader_debug_info {
|
||||
enum ac_shader_debug_info_type type;
|
||||
|
||||
union {
|
||||
struct {
|
||||
/* Line number and spirv offset this instruction sequence was generated from. */
|
||||
char *file;
|
||||
uint32_t line;
|
||||
uint32_t column;
|
||||
uint32_t spirv_offset;
|
||||
} src_loc;
|
||||
};
|
||||
|
||||
/* Offset into the shader binary: */
|
||||
uint32_t offset;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user