anv: Add new debug flag to show shader stage

Add debug option to show current shader type being
compiled within anv_shader_bin_create.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34596>
This commit is contained in:
Michael Cheng
2025-04-18 15:16:22 -07:00
committed by Marge Bot
parent ad328bc58d
commit 3c267535ae
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -119,6 +119,7 @@ static const struct debug_control debug_control[] = {
{ "cl-quiet", DEBUG_CL_QUIET },
{ "no-send-gather", DEBUG_NO_SEND_GATHER },
{ "shaders-lineno", DEBUG_SHADERS_LINENO },
{ "show_shader_stage", DEBUG_SHOW_SHADER_STAGE },
{ NULL, 0 }
};
uint64_t intel_simd = 0;
+1
View File
@@ -113,6 +113,7 @@ enum intel_debug_flag {
DEBUG_NO_SEND_GATHER,
DEBUG_RT_NO_TRACE,
DEBUG_SHADERS_LINENO,
DEBUG_SHOW_SHADER_STAGE,
};
+2
View File
@@ -250,6 +250,8 @@ anv_shader_bin_create(struct anv_device *device,
&anv_shader_bin_ops, obj_key_data, key_size);
shader->stage = stage;
if(INTEL_DEBUG(DEBUG_SHOW_SHADER_STAGE))
fprintf(stderr, "Stage: %s\n", gl_shader_stage_name(shader->stage));
shader->kernel =
anv_state_pool_alloc(&device->instruction_state_pool, kernel_size, 64);