GPU: Add shader and pass name inside debug groups

This allows to know which shader specialization and
compilation are affecting performance.
This commit is contained in:
Clément Foucault
2025-05-20 14:44:23 +02:00
parent 1c17063155
commit decf99106a
2 changed files with 4 additions and 0 deletions

View File

@@ -689,6 +689,7 @@ template<class T>
void PassBase<T>::warm_shader_specialization(command::RecordingState &state) const
{
GPU_debug_group_begin("warm_shader_specialization");
GPU_debug_group_begin(this->debug_name);
for (const command::Header &header : headers_) {
switch (header.type) {
@@ -736,6 +737,7 @@ void PassBase<T>::warm_shader_specialization(command::RecordingState &state) con
}
GPU_debug_group_end();
GPU_debug_group_end();
}
template<class T> void PassBase<T>::submit(command::RecordingState &state) const

View File

@@ -801,6 +801,7 @@ Shader *ShaderCompiler::compile(const shader::ShaderCreateInfo &info, bool is_ba
if (Context::get()) {
/* Context can be null in Vulkan compilation threads. */
GPU_debug_group_begin(GPU_DEBUG_SHADER_COMPILATION_GROUP);
GPU_debug_group_begin(info.name_.c_str());
}
const std::string error = info.check_error();
@@ -923,6 +924,7 @@ Shader *ShaderCompiler::compile(const shader::ShaderCreateInfo &info, bool is_ba
if (Context::get()) {
/* Context can be null in Vulkan compilation threads. */
GPU_debug_group_end();
GPU_debug_group_end();
}
return shader;