radeonsi: add a debug flag that disables optimized shader variants
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
ac458d2ae8
commit
e5302ad936
|
@ -671,6 +671,7 @@ static const struct debug_named_value common_debug_options[] = {
|
|||
{ "noasm", DBG_NO_ASM, "Don't print disassembled shaders"},
|
||||
{ "preoptir", DBG_PREOPT_IR, "Print the LLVM IR before initial optimizations" },
|
||||
{ "checkir", DBG_CHECK_IR, "Enable additional sanity checks on shader IR" },
|
||||
{ "nooptvariant", DBG_NO_OPT_VARIANT, "Disable compiling optimized shader variants." },
|
||||
|
||||
{ "testdma", DBG_TEST_DMA, "Invoke SDMA tests and exit." },
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
#define DBG_NO_ASM (1 << 14)
|
||||
#define DBG_PREOPT_IR (1 << 15)
|
||||
#define DBG_CHECK_IR (1 << 16)
|
||||
#define DBG_NO_OPT_VARIANT (1 << 17)
|
||||
/* gaps */
|
||||
#define DBG_TEST_DMA (1 << 20)
|
||||
/* Bits 21-31 are reserved for the r600g driver. */
|
||||
|
|
|
@ -1121,6 +1121,11 @@ static int si_shader_select_with_key(struct si_screen *sscreen,
|
|||
struct si_shader_selector *sel = state->cso;
|
||||
struct si_shader *current = state->current;
|
||||
struct si_shader *iter, *shader = NULL;
|
||||
|
||||
if (unlikely(sscreen->b.chip_class & DBG_NO_OPT_VARIANT)) {
|
||||
memset(&key->opt, 0, sizeof(key->opt));
|
||||
}
|
||||
|
||||
again:
|
||||
/* Check if we don't need to change anything.
|
||||
* This path is also used for most shaders that don't need multiple
|
||||
|
|
Loading…
Reference in New Issue