treewide: Disambiguate various variables named "debug_options"
Name them after what they control so 'vi -t' can take you somewhere useful. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8165>
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
#include <dxguids/dxguids.h>
|
||||
|
||||
static const struct debug_named_value
|
||||
debug_options[] = {
|
||||
d3d12_debug_options[] = {
|
||||
{ "verbose", D3D12_DEBUG_VERBOSE, NULL },
|
||||
{ "blit", D3D12_DEBUG_BLIT, "Trace blit and copy resource calls" },
|
||||
{ "experimental", D3D12_DEBUG_EXPERIMENTAL, "Enable experimental shader models feature" },
|
||||
@@ -59,7 +59,7 @@ debug_options[] = {
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(d3d12_debug, "D3D12_DEBUG", debug_options, 0)
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(d3d12_debug, "D3D12_DEBUG", d3d12_debug_options, 0)
|
||||
|
||||
uint32_t
|
||||
d3d12_debug;
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#define ETNA_DRM_VERSION_FENCE_FD ETNA_DRM_VERSION(1, 1)
|
||||
#define ETNA_DRM_VERSION_PERFMON ETNA_DRM_VERSION(1, 2)
|
||||
|
||||
static const struct debug_named_value debug_options[] = {
|
||||
static const struct debug_named_value etna_debug_options[] = {
|
||||
{"dbg_msgs", ETNA_DBG_MSGS, "Print debug messages"},
|
||||
{"frame_msgs", ETNA_DBG_FRAME_MSGS, "Print frame messages"},
|
||||
{"resource_msgs", ETNA_DBG_RESOURCE_MSGS, "Print resource messages"},
|
||||
@@ -78,7 +78,7 @@ static const struct debug_named_value debug_options[] = {
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(etna_mesa_debug, "ETNA_MESA_DEBUG", debug_options, 0)
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(etna_mesa_debug, "ETNA_MESA_DEBUG", etna_debug_options, 0)
|
||||
int etna_mesa_debug = 0;
|
||||
|
||||
static void
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
#include "ir3/ir3_compiler.h"
|
||||
#include "a2xx/ir2.h"
|
||||
|
||||
static const struct debug_named_value debug_options[] = {
|
||||
static const struct debug_named_value fd_debug_options[] = {
|
||||
{"msgs", FD_DBG_MSGS, "Print debug messages"},
|
||||
{"disasm", FD_DBG_DISASM, "Dump TGSI and adreno shader disassembly (a2xx only, see IR3_SHADER_DEBUG)"},
|
||||
{"dclear", FD_DBG_DCLEAR, "Mark all state dirty after clear"},
|
||||
@@ -97,7 +97,7 @@ static const struct debug_named_value debug_options[] = {
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(fd_mesa_debug, "FD_MESA_DEBUG", debug_options, 0)
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(fd_mesa_debug, "FD_MESA_DEBUG", fd_debug_options, 0)
|
||||
|
||||
int fd_mesa_debug = 0;
|
||||
bool fd_binning_enabled = true;
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
|
||||
static const struct debug_named_value debug_options[] = {
|
||||
static const struct debug_named_value i915_debug_options[] = {
|
||||
{"blit", DBG_BLIT, "Print when using the 2d blitter"},
|
||||
{"emit", DBG_EMIT, "State emit information"},
|
||||
{"atoms", DBG_ATOMS, "Print dirty state atoms"},
|
||||
@@ -47,7 +47,7 @@ static const struct debug_named_value debug_options[] = {
|
||||
|
||||
unsigned i915_debug = 0;
|
||||
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(i915_debug, "I915_DEBUG", debug_options, 0)
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(i915_debug, "I915_DEBUG", i915_debug_options, 0)
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(i915_no_tiling, "I915_NO_TILING", FALSE)
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(i915_lie, "I915_LIE", TRUE)
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(i915_use_blitter, "I915_USE_BLITTER", FALSE)
|
||||
|
||||
@@ -541,7 +541,7 @@ lima_screen_is_dmabuf_modifier_supported(struct pipe_screen *pscreen,
|
||||
return false;
|
||||
}
|
||||
|
||||
static const struct debug_named_value debug_options[] = {
|
||||
static const struct debug_named_value lima_debug_options[] = {
|
||||
{ "gp", LIMA_DEBUG_GP,
|
||||
"print GP shader compiler result of each stage" },
|
||||
{ "pp", LIMA_DEBUG_PP,
|
||||
@@ -563,7 +563,7 @@ static const struct debug_named_value debug_options[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(lima_debug, "LIMA_DEBUG", debug_options, 0)
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(lima_debug, "LIMA_DEBUG", lima_debug_options, 0)
|
||||
uint32_t lima_debug;
|
||||
|
||||
static void
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include "bifrost/bifrost_compile.h"
|
||||
#include "panfrost-quirks.h"
|
||||
|
||||
static const struct debug_named_value debug_options[] = {
|
||||
static const struct debug_named_value panfrost_debug_options[] = {
|
||||
{"msgs", PAN_DBG_MSGS, "Print debug messages"},
|
||||
{"trace", PAN_DBG_TRACE, "Trace the command stream"},
|
||||
{"deqp", PAN_DBG_DEQP, "Hacks for dEQP"},
|
||||
@@ -779,7 +779,7 @@ panfrost_create_screen(int fd, struct renderonly *ro)
|
||||
struct panfrost_device *dev = pan_device(&screen->base);
|
||||
panfrost_open_device(screen, fd, dev);
|
||||
|
||||
dev->debug = debug_get_flags_option("PAN_MESA_DEBUG", debug_options, 0);
|
||||
dev->debug = debug_get_flags_option("PAN_MESA_DEBUG", panfrost_debug_options, 0);
|
||||
|
||||
if (dev->debug & PAN_DBG_NO_AFBC)
|
||||
dev->quirks |= MIDGARD_NO_AFBC;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
static const struct debug_named_value debug_options[] = {
|
||||
static const struct debug_named_value r300_debug_options[] = {
|
||||
{ "info", DBG_INFO, "Print hardware info (printed by default on debug builds"},
|
||||
{ "fp", DBG_FP, "Log fragment program compilation" },
|
||||
{ "vp", DBG_VP, "Log vertex program compilation" },
|
||||
@@ -58,7 +58,7 @@ static const struct debug_named_value debug_options[] = {
|
||||
|
||||
void r300_init_debug(struct r300_screen * screen)
|
||||
{
|
||||
screen->debug = debug_get_flags_option("RADEON_DEBUG", debug_options, 0);
|
||||
screen->debug = debug_get_flags_option("RADEON_DEBUG", r300_debug_options, 0);
|
||||
}
|
||||
|
||||
void r500_dump_rs_block(struct r300_rs_block *rs)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
static struct pipe_context *si_create_context(struct pipe_screen *screen, unsigned flags);
|
||||
|
||||
static const struct debug_named_value debug_options[] = {
|
||||
static const struct debug_named_value radeonsi_debug_options[] = {
|
||||
/* Shader logging options: */
|
||||
{"vs", DBG(VS), "Print vertex shaders"},
|
||||
{"ps", DBG(PS), "Print pixel shaders"},
|
||||
@@ -970,8 +970,8 @@ static struct pipe_screen *radeonsi_screen_create_impl(struct radeon_winsys *ws,
|
||||
&sscreen->pa_sc_raster_config_1, &sscreen->se_tile_repeat);
|
||||
}
|
||||
|
||||
sscreen->debug_flags = debug_get_flags_option("R600_DEBUG", debug_options, 0);
|
||||
sscreen->debug_flags |= debug_get_flags_option("AMD_DEBUG", debug_options, 0);
|
||||
sscreen->debug_flags = debug_get_flags_option("R600_DEBUG", radeonsi_debug_options, 0);
|
||||
sscreen->debug_flags |= debug_get_flags_option("AMD_DEBUG", radeonsi_debug_options, 0);
|
||||
test_flags = debug_get_flags_option("AMD_TEST", test_options, 0);
|
||||
|
||||
if (sscreen->debug_flags & DBG(NO_GFX))
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "vc4_context.h"
|
||||
#include "vc4_resource.h"
|
||||
|
||||
static const struct debug_named_value debug_options[] = {
|
||||
static const struct debug_named_value vc4_debug_options[] = {
|
||||
{ "cl", VC4_DEBUG_CL,
|
||||
"Dump command list during creation" },
|
||||
{ "surf", VC4_DEBUG_SURFACE,
|
||||
@@ -73,7 +73,7 @@ static const struct debug_named_value debug_options[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(vc4_debug, "VC4_DEBUG", debug_options, 0)
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(vc4_debug, "VC4_DEBUG", vc4_debug_options, 0)
|
||||
uint32_t vc4_debug;
|
||||
|
||||
static const char *
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "virtio-gpu/virgl_protocol.h"
|
||||
|
||||
int virgl_debug = 0;
|
||||
static const struct debug_named_value debug_options[] = {
|
||||
static const struct debug_named_value virgl_debug_options[] = {
|
||||
{ "verbose", VIRGL_DEBUG_VERBOSE, NULL },
|
||||
{ "tgsi", VIRGL_DEBUG_TGSI, NULL },
|
||||
{ "noemubgra", VIRGL_DEBUG_NO_EMULATE_BGRA, "Disable tweak to emulate BGRA as RGBA on GLES hosts"},
|
||||
@@ -49,7 +49,7 @@ static const struct debug_named_value debug_options[] = {
|
||||
{ "xfer", VIRGL_DEBUG_XFER, "Do not optimize for transfers" },
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(virgl_debug, "VIRGL_DEBUG", debug_options, 0)
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(virgl_debug, "VIRGL_DEBUG", virgl_debug_options, 0)
|
||||
|
||||
static const char *
|
||||
virgl_get_vendor(struct pipe_screen *screen)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "frontend/sw_winsys.h"
|
||||
|
||||
static const struct debug_named_value
|
||||
debug_options[] = {
|
||||
zink_debug_options[] = {
|
||||
{ "nir", ZINK_DEBUG_NIR, "Dump NIR during program compile" },
|
||||
{ "spirv", ZINK_DEBUG_SPIRV, "Dump SPIR-V during program compile" },
|
||||
{ "tgsi", ZINK_DEBUG_TGSI, "Dump TGSI during program compile" },
|
||||
@@ -51,7 +51,7 @@ debug_options[] = {
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(zink_debug, "ZINK_DEBUG", debug_options, 0)
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(zink_debug, "ZINK_DEBUG", zink_debug_options, 0)
|
||||
|
||||
uint32_t
|
||||
zink_debug;
|
||||
|
||||
@@ -45,13 +45,13 @@ enum clc_debug_flags {
|
||||
CLC_DEBUG_VERBOSE = 1 << 1,
|
||||
};
|
||||
|
||||
static const struct debug_named_value debug_options[] = {
|
||||
static const struct debug_named_value clc_debug_options[] = {
|
||||
{ "dump_spirv", CLC_DEBUG_DUMP_SPIRV, "Dump spirv blobs" },
|
||||
{ "verbose", CLC_DEBUG_VERBOSE, NULL },
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(debug_clc, "CLC_DEBUG", debug_options, 0)
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(debug_clc, "CLC_DEBUG", clc_debug_options, 0)
|
||||
|
||||
static void
|
||||
clc_print_kernels_info(const struct clc_object *obj)
|
||||
|
||||
@@ -45,7 +45,7 @@ enum compute_test_debug_flags {
|
||||
COMPUTE_DEBUG_SERIALIZE_LIBCLC = 1 << 3,
|
||||
};
|
||||
|
||||
static const struct debug_named_value debug_options[] = {
|
||||
static const struct debug_named_value compute_debug_options[] = {
|
||||
{ "experimental_shaders", COMPUTE_DEBUG_EXPERIMENTAL_SHADERS, "Enable experimental shaders" },
|
||||
{ "use_hw_d3d", COMPUTE_DEBUG_USE_HW_D3D, "Use a hardware D3D device" },
|
||||
{ "optimize_libclc", COMPUTE_DEBUG_OPTIMIZE_LIBCLC, "Optimize the clc_context before using it" },
|
||||
@@ -53,7 +53,7 @@ static const struct debug_named_value debug_options[] = {
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(debug_compute, "COMPUTE_TEST_DEBUG", debug_options, 0)
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(debug_compute, "COMPUTE_TEST_DEBUG", compute_debug_options, 0)
|
||||
|
||||
static void warning_callback(void *priv, const char *msg)
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
int debug_dxil = 0;
|
||||
|
||||
static const struct debug_named_value
|
||||
debug_options[] = {
|
||||
dxil_debug_options[] = {
|
||||
{ "verbose", DXIL_DEBUG_VERBOSE, NULL },
|
||||
{ "dump_blob", DXIL_DEBUG_DUMP_BLOB , "Write shader blobs" },
|
||||
{ "trace", DXIL_DEBUG_TRACE , "Trace instruction conversion" },
|
||||
@@ -50,7 +50,7 @@ debug_options[] = {
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(debug_dxil, "DXIL_DEBUG", debug_options, 0)
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(debug_dxil, "DXIL_DEBUG", dxil_debug_options, 0)
|
||||
|
||||
#define NIR_INSTR_UNSUPPORTED(instr) \
|
||||
if (debug_dxil & DXIL_DEBUG_VERBOSE) \
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "bi_quirks.h"
|
||||
#include "bi_builder.h"
|
||||
|
||||
static const struct debug_named_value debug_options[] = {
|
||||
static const struct debug_named_value bifrost_debug_options[] = {
|
||||
{"msgs", BIFROST_DBG_MSGS, "Print debug messages"},
|
||||
{"shaders", BIFROST_DBG_SHADERS, "Dump shaders in NIR and MIR"},
|
||||
{"shaderdb", BIFROST_DBG_SHADERDB, "Print statistics"},
|
||||
@@ -45,7 +45,7 @@ static const struct debug_named_value debug_options[] = {
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(bifrost_debug, "BIFROST_MESA_DEBUG", debug_options, 0)
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(bifrost_debug, "BIFROST_MESA_DEBUG", bifrost_debug_options, 0)
|
||||
|
||||
/* TODO: This is not thread safe!! */
|
||||
static unsigned SHADER_DB_COUNT = 0;
|
||||
|
||||
@@ -54,14 +54,14 @@
|
||||
|
||||
#include "disassemble.h"
|
||||
|
||||
static const struct debug_named_value debug_options[] = {
|
||||
static const struct debug_named_value midgard_debug_options[] = {
|
||||
{"msgs", MIDGARD_DBG_MSGS, "Print debug messages"},
|
||||
{"shaders", MIDGARD_DBG_SHADERS, "Dump shaders in NIR and MIR"},
|
||||
{"shaderdb", MIDGARD_DBG_SHADERDB, "Prints shader-db statistics"},
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(midgard_debug, "MIDGARD_MESA_DEBUG", debug_options, 0)
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(midgard_debug, "MIDGARD_MESA_DEBUG", midgard_debug_options, 0)
|
||||
|
||||
/* TODO: This is not thread safe!! */
|
||||
static unsigned SHADER_DB_COUNT = 0;
|
||||
|
||||
Reference in New Issue
Block a user