radeonsi: add si_debug_options for convenient adding/removing of options
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 15 Mar 2019 13:56:36 +0000 (14:56 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 25 Apr 2019 10:31:02 +0000 (12:31 +0200)
commit8bef4df196fbb0fad7f3bd6048f71dbc38ebceb3
tree7ef5fd5bac743bec824fd126cdc71ba9e26031f2
parent5078d66a8699e2cbfc5a8244a7d7e0437919a281
radeonsi: add si_debug_options for convenient adding/removing of options

Move the definition of radeonsi_clear_db_cache_before_clear there,
as well as radeonsi_enable_nir.

This removes the AMD_DEBUG=nir option.

We currently still have two places for options: the driconf machinery
and AMD_DEBUG/R600_DEBUG. If we are to have a single place for options,
then the driconf machinery should be preferred since it's more flexible.

The only downside of the driconf machinery was that adding new options
was quite inconvenient. With this change, a simple boolean option can
be added with a single line of code, same as for AMD_DEBUG.

One technical limitation of this particular implementation is that while
almost all driconf features are available, the translation machinery doesn't
pick up the description strings for options added in si_debvug_options. In
practice, translations haven't been provided anyway, and this is intended
for developer options, so I'm not too worried. It could always be added
later if anybody really cares.

v2:
- use bool instead of uint8_t for options
- si_debug_options.inc -> si_debug_options.h

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/driinfo_radeonsi.h
src/gallium/drivers/radeonsi/si_clear.c
src/gallium/drivers/radeonsi/si_debug_options.h [new file with mode: 0644]
src/gallium/drivers/radeonsi/si_get.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h
src/util/merge_driinfo.py
src/util/xmlpool/t_options.h