mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 05:46:56 +01:00
shader: map debug SPIR-V blocks to native RDNA2 PCs
This commit is contained in:
@@ -89,6 +89,7 @@ struct EmitterState {
|
||||
IR::Program& program;
|
||||
ShaderStageInputInfo input_info;
|
||||
bool maintenance8_enabled;
|
||||
uint32_t debug_source = 0;
|
||||
uint32_t void_type = 0;
|
||||
uint32_t bool_type = 0;
|
||||
uint32_t u32_type = 0;
|
||||
@@ -182,6 +183,11 @@ uint32_t TypeU32ElementPointer(EmitterState& state, spv::StorageClass storage_cl
|
||||
inline void EmitLabel(EmitterState& state, uint32_t label) {
|
||||
state.current_label = label;
|
||||
state.builder.AddFunction(spv::OpLabel, label);
|
||||
if (state.debug_source != 0 && state.current_block != nullptr) {
|
||||
// Source lines encode the containing native block's byte offset plus one.
|
||||
state.builder.AddFunction(spv::OpLine, state.debug_source,
|
||||
state.current_block->start_pc + 1u, 0u);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t TypeId(EmitterState& state, IR::Type type);
|
||||
|
||||
Reference in New Issue
Block a user