radeonsi: add RADEON_REPLACE_SHADERS debug option
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 15 Dec 2015 01:41:15 +0000 (20:41 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 29 Dec 2015 14:07:04 +0000 (09:07 -0500)
commit7b8db37abb1b7f08c43f20380a370766ae7923ae
treefd88dccd8777486aa8536914999689164872ab2e
parent7d1fc2cf51438a649eecbe4f8e858eebd93c1757
radeonsi: add RADEON_REPLACE_SHADERS debug option

This option allows replacing a single shader by a pre-compiled ELF object
as generated by LLVM's llc, for example. This can be useful for debugging a
deterministically occuring error in shaders (and has in fact helped find
the causes of https://bugs.freedesktop.org/show_bug.cgi?id=93264).

v2: drop the debug flag, use DEBUG_GET_ONCE_OPTION instead

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_debug.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_shader.c