mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-23 09:40:29 +01:00
iris: 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
a09ddc3b77
commit
69b73e807f
1 changed files with 14 additions and 0 deletions
|
|
@ -36,6 +36,7 @@
|
|||
#include "pipe/p_screen.h"
|
||||
#include "util/u_atomic.h"
|
||||
#include "util/u_upload_mgr.h"
|
||||
#include "compiler/brw_disasm.h"
|
||||
#include "compiler/nir/nir.h"
|
||||
#include "compiler/nir/nir_builder.h"
|
||||
#include "intel/compiler/brw_compiler.h"
|
||||
|
|
@ -217,6 +218,19 @@ iris_upload_shader(struct iris_screen *screen,
|
|||
struct keybox *keybox = make_keybox(shader, cache_id, key, key_size);
|
||||
_mesa_hash_table_insert(driver_shaders, keybox, shader);
|
||||
}
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_SHADERS_LINENO) && screen->brw) {
|
||||
int start = 0;
|
||||
/* dump each simd variant of shader */
|
||||
while (start < shader->brw_prog_data->program_size) {
|
||||
brw_disassemble_with_lineno(&screen->brw->isa, shader->stage, -1,
|
||||
ish ? ish->source_hash : 0, assembly, start,
|
||||
res->bo->address + shader->assembly.offset,
|
||||
stderr);
|
||||
start += align64(brw_disassemble_find_end(&screen->brw->isa,
|
||||
assembly, start), 64);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue