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:
@@ -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;
|
||||
|
||||
@@ -113,6 +113,7 @@ enum intel_debug_flag {
|
||||
DEBUG_NO_SEND_GATHER,
|
||||
DEBUG_RT_NO_TRACE,
|
||||
DEBUG_SHADERS_LINENO,
|
||||
DEBUG_SHOW_SHADER_STAGE,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user