mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
anv: add INTEL_DEBUG=shaders-lineno
Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
This commit is contained in:
parent
7a3de9e877
commit
a09ddc3b77
4 changed files with 16 additions and 0 deletions
|
|
@ -117,6 +117,7 @@ static const struct debug_control debug_control[] = {
|
|||
{ "shader-print", DEBUG_SHADER_PRINT },
|
||||
{ "cl-quiet", DEBUG_CL_QUIET },
|
||||
{ "no-send-gather", DEBUG_NO_SEND_GATHER },
|
||||
{ "shaders-lineno", DEBUG_SHADERS_LINENO },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ extern uint64_t intel_debug;
|
|||
#define DEBUG_BVH_NO_BUILD (1ull << 60)
|
||||
#define DEBUG_NO_SEND_GATHER (1ull << 61)
|
||||
#define DEBUG_RT_NO_TRACE (1ull << 62)
|
||||
#define DEBUG_SHADERS_LINENO (1ull << 63)
|
||||
|
||||
#define DEBUG_ANY (~0ull)
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "anv_private.h"
|
||||
#include "compiler/brw_disasm.h"
|
||||
#include "genxml/gen80_pack.h"
|
||||
|
||||
static bool
|
||||
|
|
@ -85,6 +86,12 @@ upload_blorp_shader(struct blorp_batch *batch, uint32_t stage,
|
|||
*/
|
||||
anv_shader_bin_unref(device, bin);
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_SHADERS_LINENO)) {
|
||||
brw_disassemble_with_lineno(&device->physical->compiler->isa,
|
||||
stage, -1, 0, kernel, 0,
|
||||
bin->kernel.offset, stderr);
|
||||
}
|
||||
|
||||
*kernel_out = bin->kernel.offset;
|
||||
*(const struct brw_stage_prog_data **)prog_data_out = bin->prog_data;
|
||||
|
||||
|
|
|
|||
|
|
@ -1695,6 +1695,13 @@ anv_pipeline_add_executable(struct anv_pipeline *pipeline,
|
|||
free(stream_data);
|
||||
}
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_SHADERS_LINENO) && stage->code) {
|
||||
brw_disassemble_with_lineno(&pipeline->device->physical->compiler->isa,
|
||||
stage->stage, (int)stats->dispatch_width,
|
||||
stage->source_hash, stage->code, code_offset,
|
||||
stage->bin->kernel.offset, stderr);
|
||||
}
|
||||
|
||||
const struct anv_pipeline_executable exe = {
|
||||
.stage = stage->stage,
|
||||
.stats = *stats,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue