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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user