From b4a087ce1b939257a652f545a66d9a85c1fd8dc8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 16 Sep 2020 12:44:14 -0700 Subject: [PATCH] driconf: Use nesting macros for defining options. Manually balancing the BEGIN/ENDs is a recipe for xml validation failures, just make the macros do the balancing. The only ugly bit I think is that enums take a list of DRI_CONF_ENUM() without ','s in between them. Reviewed-by: Kristian H. Kristensen Part-of: --- src/gallium/drivers/iris/driinfo_iris.h | 4 +- src/gallium/drivers/radeonsi/driinfo_radeonsi.h | 5 +- src/mesa/drivers/dri/i915/intel_screen.c | 23 +- src/mesa/drivers/dri/i965/intel_screen.c | 14 +- src/mesa/drivers/dri/radeon/radeon_screen.c | 32 +-- src/mesa/drivers/dri/radeon/radeon_screen.h | 58 ++-- src/util/driconf.h | 367 +++++++++++------------- src/util/tests/xmlconfig.cpp | 10 +- 8 files changed, 221 insertions(+), 292 deletions(-) diff --git a/src/gallium/drivers/iris/driinfo_iris.h b/src/gallium/drivers/iris/driinfo_iris.h index 012086b..361d8de 100644 --- a/src/gallium/drivers/iris/driinfo_iris.h +++ b/src/gallium/drivers/iris/driinfo_iris.h @@ -7,7 +7,5 @@ DRI_CONF_SECTION_DEBUG DRI_CONF_SECTION_END DRI_CONF_SECTION_PERFORMANCE - DRI_CONF_OPT_BEGIN_V(bo_reuse, enum, 1, "0:1") - DRI_CONF_DESC("Buffer object reuse") - DRI_CONF_OPT_END + DRI_CONF_OPT_E(bo_reuse, 1, 0, 1, "Buffer object reuse", "") DRI_CONF_SECTION_END diff --git a/src/gallium/drivers/radeonsi/driinfo_radeonsi.h b/src/gallium/drivers/radeonsi/driinfo_radeonsi.h index 4fab058..1f5cb06 100644 --- a/src/gallium/drivers/radeonsi/driinfo_radeonsi.h +++ b/src/gallium/drivers/radeonsi/driinfo_radeonsi.h @@ -7,10 +7,7 @@ DRI_CONF_RADEONSI_ZERO_ALL_VRAM_ALLOCS("false") DRI_CONF_SECTION_END DRI_CONF_SECTION_DEBUG -#define OPT_BOOL(name, dflt, description) \ - DRI_CONF_OPT_BEGIN_B(radeonsi_##name, #dflt) \ - DRI_CONF_DESC(description) \ - DRI_CONF_OPT_END +#define OPT_BOOL(name, dflt, description) DRI_CONF_OPT_B(radeonsi_##name, #dflt, description) #include "radeonsi/si_debug_options.h" DRI_CONF_SECTION_END diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c index cf13433..9eac6ad 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.c +++ b/src/mesa/drivers/dri/i915/intel_screen.c @@ -52,16 +52,13 @@ DRI_CONF_BEGIN /* Options correspond to DRI_CONF_BO_REUSE_DISABLED, * DRI_CONF_BO_REUSE_ALL */ - DRI_CONF_OPT_BEGIN_V(bo_reuse, enum, 1, "0:1") - DRI_CONF_DESC_BEGIN("Buffer object reuse") - DRI_CONF_ENUM(0, "Disable buffer object reuse") - DRI_CONF_ENUM(1, "Enable reuse of all sizes of buffer objects") - DRI_CONF_DESC_END - DRI_CONF_OPT_END + DRI_CONF_OPT_E(bo_reuse, 1, 0, 1, + "Buffer object reuse", + DRI_CONF_ENUM(0, "Disable buffer object reuse") + DRI_CONF_ENUM(1, "Enable reuse of all sizes of buffer objects")) - DRI_CONF_OPT_BEGIN_B(fragment_shader, "true") - DRI_CONF_DESC("Enable limited ARB_fragment_shader support on 915/945.") - DRI_CONF_OPT_END + DRI_CONF_OPT_B(fragment_shader, "true", + "Enable limited ARB_fragment_shader support on 915/945.") DRI_CONF_SECTION_END DRI_CONF_SECTION_QUALITY @@ -74,13 +71,9 @@ DRI_CONF_BEGIN DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false") DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false") - DRI_CONF_OPT_BEGIN_B(stub_occlusion_query, "false") - DRI_CONF_DESC("Enable stub ARB_occlusion_query support on 915/945.") - DRI_CONF_OPT_END + DRI_CONF_OPT_B(stub_occlusion_query, "false", "Enable stub ARB_occlusion_query support on 915/945.") - DRI_CONF_OPT_BEGIN_B(shader_precompile, "true") - DRI_CONF_DESC("Perform code generation at shader link time.") - DRI_CONF_OPT_END + DRI_CONF_OPT_B(shader_precompile, "true", "Perform code generation at shader link time.") DRI_CONF_SECTION_END DRI_CONF_END }; diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 77577ec..c585fa0 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -57,12 +57,10 @@ DRI_CONF_BEGIN /* Options correspond to DRI_CONF_BO_REUSE_DISABLED, * DRI_CONF_BO_REUSE_ALL */ - DRI_CONF_OPT_BEGIN_V(bo_reuse, enum, 1, "0:1") - DRI_CONF_DESC_BEGIN("Buffer object reuse") - DRI_CONF_ENUM(0, "Disable buffer object reuse") - DRI_CONF_ENUM(1, "Enable reuse of all sizes of buffer objects") - DRI_CONF_DESC_END - DRI_CONF_OPT_END + DRI_CONF_OPT_E(bo_reuse, 1, 0, 1, + "Buffer object reuse", + DRI_CONF_ENUM(0, "Disable buffer object reuse") + DRI_CONF_ENUM(1, "Enable reuse of all sizes of buffer objects")) DRI_CONF_MESA_NO_ERROR("false") DRI_CONF_MESA_GLTHREAD("false") DRI_CONF_SECTION_END @@ -93,9 +91,7 @@ DRI_CONF_BEGIN DRI_CONF_FORCE_GLSL_ABS_SQRT("false") DRI_CONF_FORCE_GL_VENDOR() - DRI_CONF_OPT_BEGIN_B(shader_precompile, "true") - DRI_CONF_DESC("Perform code generation at shader link time.") - DRI_CONF_OPT_END + DRI_CONF_OPT_B(shader_precompile, "true", "Perform code generation at shader link time.") DRI_CONF_SECTION_END DRI_CONF_SECTION_MISCELLANEOUS diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index c56eba0..7ed6560 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -65,34 +65,26 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "util/driconf.h" #define DRI_CONF_COMMAND_BUFFER_SIZE(def,min,max) \ -DRI_CONF_OPT_BEGIN_V(command_buffer_size,int,def, # min ":" # max ) \ - DRI_CONF_DESC("Size of command buffer (in KB)") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_I(command_buffer_size, def, min, max, \ + "Size of command buffer (in KB)") #define DRI_CONF_MAX_TEXTURE_UNITS(def,min,max) \ -DRI_CONF_OPT_BEGIN_V(texture_units,int,def, # min ":" # max ) \ - DRI_CONF_DESC("Number of texture units used") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_I(texture_units,def, min, max, \ + "Number of texture units used") #define DRI_CONF_HYPERZ(def) \ -DRI_CONF_OPT_BEGIN_B(hyperz, def) \ - DRI_CONF_DESC("Use HyperZ to boost performance") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(hyperz, def, "Use HyperZ to boost performance") #define DRI_CONF_TCL_MODE(def) \ -DRI_CONF_OPT_BEGIN_V(tcl_mode,enum,def,"0:3") \ - DRI_CONF_DESC_BEGIN("TCL mode (Transformation, Clipping, Lighting)") \ - DRI_CONF_ENUM(0,"Use software TCL pipeline") \ - DRI_CONF_ENUM(1,"Use hardware TCL as first TCL pipeline stage") \ - DRI_CONF_ENUM(2,"Bypass the TCL pipeline") \ - DRI_CONF_ENUM(3,"Bypass the TCL pipeline with state-based machine code generated on-the-fly") \ - DRI_CONF_DESC_END \ -DRI_CONF_OPT_END + DRI_CONF_OPT_E(tcl_mode, def, 0, 3, \ + "TCL mode (Transformation, Clipping, Lighting)", \ + DRI_CONF_ENUM(0,"Use software TCL pipeline") \ + DRI_CONF_ENUM(1,"Use hardware TCL as first TCL pipeline stage") \ + DRI_CONF_ENUM(2,"Bypass the TCL pipeline") \ + DRI_CONF_ENUM(3,"Bypass the TCL pipeline with state-based machine code generated on-the-fly")) #define DRI_CONF_NO_NEG_LOD_BIAS(def) \ -DRI_CONF_OPT_BEGIN_B(no_neg_lod_bias, def) \ - DRI_CONF_DESC("Forbid negative texture LOD bias") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(no_neg_lod_bias, def, "Forbid negative texture LOD bias") #define DRI_CONF_DEF_MAX_ANISOTROPY(def,range) \ DRI_CONF_OPT_BEGIN_V(def_max_anisotropy,float,def,range) \ diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.h b/src/mesa/drivers/dri/radeon/radeon_screen.h index 6a49cec..4aee0c4 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.h +++ b/src/mesa/drivers/dri/radeon/radeon_screen.h @@ -50,60 +50,50 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define DRI_CONF_COLOR_REDUCTION_ROUND 0 #define DRI_CONF_COLOR_REDUCTION_DITHER 1 #define DRI_CONF_COLOR_REDUCTION(def) \ -DRI_CONF_OPT_BEGIN_V(color_reduction,enum,def,"0:1") \ - DRI_CONF_DESC_BEGIN("Initial color reduction method") \ - DRI_CONF_ENUM(0,"Round colors") \ - DRI_CONF_ENUM(1,"Dither colors") \ - DRI_CONF_DESC_END \ -DRI_CONF_OPT_END + DRI_CONF_OPT_E(color_reduction, def, 0, 1, \ + "Initial color reduction method", \ + DRI_CONF_ENUM(0, "Round colors") \ + DRI_CONF_ENUM(1, "Dither colors")) #define DRI_CONF_DITHER_XERRORDIFF 0 #define DRI_CONF_DITHER_XERRORDIFFRESET 1 #define DRI_CONF_DITHER_ORDERED 2 #define DRI_CONF_DITHER_MODE(def) \ -DRI_CONF_OPT_BEGIN_V(dither_mode,enum,def,"0:2") \ - DRI_CONF_DESC_BEGIN("Color dithering method") \ - DRI_CONF_ENUM(0,"Horizontal error diffusion") \ - DRI_CONF_ENUM(1,"Horizontal error diffusion, reset error at line start") \ - DRI_CONF_ENUM(2,"Ordered 2D color dithering") \ - DRI_CONF_DESC_END \ -DRI_CONF_OPT_END + DRI_CONF_OPT_E(dither_mode, def, 0, 2, \ + "Color dithering method", \ + DRI_CONF_ENUM(0, "Horizontal error diffusion") \ + DRI_CONF_ENUM(1, "Horizontal error diffusion, reset error at line start") \ + DRI_CONF_ENUM(2, "Ordered 2D color dithering")) #define DRI_CONF_ROUND_TRUNC 0 #define DRI_CONF_ROUND_ROUND 1 #define DRI_CONF_ROUND_MODE(def) \ -DRI_CONF_OPT_BEGIN_V(round_mode,enum,def,"0:1") \ - DRI_CONF_DESC_BEGIN("Color rounding method") \ - DRI_CONF_ENUM(0,"Round color components downward") \ - DRI_CONF_ENUM(1,"Round to nearest color") \ - DRI_CONF_DESC_END \ -DRI_CONF_OPT_END + DRI_CONF_OPT_E(round_mode, def, 0, 1, \ + "Color rounding method", \ + DRI_CONF_ENUM(0, "Round color components downward") \ + DRI_CONF_ENUM(1, "Round to nearest color")) #define DRI_CONF_FTHROTTLE_BUSY 0 #define DRI_CONF_FTHROTTLE_USLEEPS 1 #define DRI_CONF_FTHROTTLE_IRQS 2 #define DRI_CONF_FTHROTTLE_MODE(def) \ -DRI_CONF_OPT_BEGIN_V(fthrottle_mode,enum,def,"0:2") \ - DRI_CONF_DESC_BEGIN("Method to limit rendering latency") \ - DRI_CONF_ENUM(0,"Busy waiting for the graphics hardware") \ - DRI_CONF_ENUM(1,"Sleep for brief intervals while waiting for the graphics hardware") \ - DRI_CONF_ENUM(2,"Let the graphics hardware emit a software interrupt and sleep") \ - DRI_CONF_DESC_END \ -DRI_CONF_OPT_END + DRI_CONF_OPT_E(fthrottle_mode, def, 0, 2, \ + "Method to limit rendering latency", \ + DRI_CONF_ENUM(0, "Busy waiting for the graphics hardware") \ + DRI_CONF_ENUM(1, "Sleep for brief intervals while waiting for the graphics hardware") \ + DRI_CONF_ENUM(2, "Let the graphics hardware emit a software interrupt and sleep")) #define DRI_CONF_TEXTURE_DEPTH_FB 0 #define DRI_CONF_TEXTURE_DEPTH_32 1 #define DRI_CONF_TEXTURE_DEPTH_16 2 #define DRI_CONF_TEXTURE_DEPTH_FORCE_16 3 #define DRI_CONF_TEXTURE_DEPTH(def) \ -DRI_CONF_OPT_BEGIN_V(texture_depth,enum,def,"0:3") \ - DRI_CONF_DESC_BEGIN("Texture color depth") \ - DRI_CONF_ENUM(0,"Prefer frame buffer color depth") \ - DRI_CONF_ENUM(1,"Prefer 32 bits per texel") \ - DRI_CONF_ENUM(2,"Prefer 16 bits per texel") \ - DRI_CONF_ENUM(3,"Force 16 bits per texel") \ - DRI_CONF_DESC_END \ -DRI_CONF_OPT_END + DRI_CONF_OPT_E(texture_depth, def, 0, 3, \ + "Texture color depth", \ + DRI_CONF_ENUM(0, "Prefer frame buffer color depth") \ + DRI_CONF_ENUM(1, "Prefer 32 bits per texel") \ + DRI_CONF_ENUM(2, "Prefer 16 bits per texel") \ + DRI_CONF_ENUM(3, "Force 16 bits per texel")) #define DRI_CONF_TCL_SW 0 #define DRI_CONF_TCL_PIPELINED 1 diff --git a/src/util/driconf.h b/src/util/driconf.h index 0cd94ea..3a58a3a 100644 --- a/src/util/driconf.h +++ b/src/util/driconf.h @@ -104,6 +104,38 @@ #define DRI_CONF_ENUM(value,text) \ "\n" +#define DRI_CONF(sections) \ + DRI_CONF_BEGIN \ + sections \ + DRI_CONF_END + +#define DRI_CONF_SECTION(desc, options) \ + DRI_CONF_SECTION_BEGIN \ + DRI_CONF_DESC(desc) \ + options \ + DRI_CONF_SECTION_END + +#define DRI_CONF_OPT_B(name, def, desc) \ + DRI_CONF_OPT_BEGIN_B(name, def) \ + DRI_CONF_DESC(desc) \ + DRI_CONF_OPT_END + +#define DRI_CONF_OPT_I(name, def, min, max, desc) \ + DRI_CONF_OPT_BEGIN_V(name, int, def, #min ":" #max) \ + DRI_CONF_DESC(desc) \ + DRI_CONF_OPT_END + +#define DRI_CONF_OPT_F(name, def, min, max, desc) \ + DRI_CONF_OPT_BEGIN_V(name, float, def, #min ":" #max) \ + DRI_CONF_DESC(desc) \ + DRI_CONF_OPT_END + +#define DRI_CONF_OPT_E(name, def, min, max, desc, values) \ + DRI_CONF_OPT_BEGIN_V(name, enum, def, #min ":" #max) \ + DRI_CONF_DESC_BEGIN(desc) \ + values \ + DRI_CONF_DESC_END \ + DRI_CONF_OPT_END /** * \brief Debugging options @@ -113,104 +145,84 @@ DRI_CONF_SECTION_BEGIN \ DRI_CONF_DESC("Debugging") #define DRI_CONF_ALWAYS_FLUSH_BATCH(def) \ -DRI_CONF_OPT_BEGIN_B(always_flush_batch, def) \ - DRI_CONF_DESC("Enable flushing batchbuffer after each draw call") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(always_flush_batch, def, \ + "Enable flushing batchbuffer after each draw call") #define DRI_CONF_ALWAYS_FLUSH_CACHE(def) \ -DRI_CONF_OPT_BEGIN_B(always_flush_cache, def) \ - DRI_CONF_DESC("Enable flushing GPU caches with each draw call") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(always_flush_cache, def, \ + "Enable flushing GPU caches with each draw call") #define DRI_CONF_DISABLE_THROTTLING(def) \ -DRI_CONF_OPT_BEGIN_B(disable_throttling, def) \ - DRI_CONF_DESC("Disable throttling on first batch after flush") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(disable_throttling, def, \ + "Disable throttling on first batch after flush") #define DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(def) \ -DRI_CONF_OPT_BEGIN_B(force_glsl_extensions_warn, def) \ - DRI_CONF_DESC("Force GLSL extension default behavior to 'warn'") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(force_glsl_extensions_warn, def, \ + "Force GLSL extension default behavior to 'warn'") #define DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED(def) \ -DRI_CONF_OPT_BEGIN_B(disable_blend_func_extended, def) \ - DRI_CONF_DESC("Disable dual source blending") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(disable_blend_func_extended, def, \ + "Disable dual source blending") #define DRI_CONF_DISABLE_ARB_GPU_SHADER5(def) \ -DRI_CONF_OPT_BEGIN_B(disable_arb_gpu_shader5, def) \ - DRI_CONF_DESC("Disable GL_ARB_gpu_shader5") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(disable_arb_gpu_shader5, def, \ + "Disable GL_ARB_gpu_shader5") #define DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION(def) \ -DRI_CONF_OPT_BEGIN_B(dual_color_blend_by_location, def) \ - DRI_CONF_DESC("Identify dual color blending sources by location rather than index") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(dual_color_blend_by_location, def, \ + "Identify dual color blending sources by location rather than index") #define DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(def) \ -DRI_CONF_OPT_BEGIN_B(disable_glsl_line_continuations, def) \ - DRI_CONF_DESC("Disable backslash-based line continuations in GLSL source") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(disable_glsl_line_continuations, def, \ + "Disable backslash-based line continuations in GLSL source") #define DRI_CONF_FORCE_GLSL_VERSION(def) \ -DRI_CONF_OPT_BEGIN_V(force_glsl_version, int, def, "0:999") \ - DRI_CONF_DESC("Force a default GLSL version for shaders that lack an explicit #version line") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_I(force_glsl_version, def, 0, 999, \ + "Force a default GLSL version for shaders that lack an explicit #version line") #define DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER(def) \ -DRI_CONF_OPT_BEGIN_B(allow_glsl_extension_directive_midshader, def) \ - DRI_CONF_DESC("Allow GLSL #extension directives in the middle of shaders") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(allow_glsl_extension_directive_midshader, def, \ + "Allow GLSL #extension directives in the middle of shaders") #define DRI_CONF_ALLOW_GLSL_120_SUBSET_IN_110(def) \ -DRI_CONF_OPT_BEGIN_B(allow_glsl_120_subset_in_110, def) \ - DRI_CONF_DESC("Allow a subset of GLSL 1.20 in GLSL 1.10 as needed by SPECviewperf13") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(allow_glsl_120_subset_in_110, def, \ + "Allow a subset of GLSL 1.20 in GLSL 1.10 as needed by SPECviewperf13") #define DRI_CONF_ALLOW_GLSL_BUILTIN_CONST_EXPRESSION(def) \ -DRI_CONF_OPT_BEGIN_B(allow_glsl_builtin_const_expression, def) \ - DRI_CONF_DESC("Allow builtins as part of constant expressions") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(allow_glsl_builtin_const_expression, def, \ + "Allow builtins as part of constant expressions") #define DRI_CONF_ALLOW_GLSL_RELAXED_ES(def) \ -DRI_CONF_OPT_BEGIN_B(allow_glsl_relaxed_es, def) \ - DRI_CONF_DESC("Allow some relaxation of GLSL ES shader restrictions") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(allow_glsl_relaxed_es, def, \ + "Allow some relaxation of GLSL ES shader restrictions") #define DRI_CONF_ALLOW_GLSL_BUILTIN_VARIABLE_REDECLARATION(def) \ -DRI_CONF_OPT_BEGIN_B(allow_glsl_builtin_variable_redeclaration, def) \ - DRI_CONF_DESC("Allow GLSL built-in variables to be redeclared verbatim") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(allow_glsl_builtin_variable_redeclaration, def, \ + "Allow GLSL built-in variables to be redeclared verbatim") #define DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION(def) \ -DRI_CONF_OPT_BEGIN_B(allow_higher_compat_version, def) \ - DRI_CONF_DESC("Allow a higher compat profile (version 3.1+) for apps that request it") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(allow_higher_compat_version, def, \ + "Allow a higher compat profile (version 3.1+) for apps that request it") #define DRI_CONF_FORCE_GLSL_ABS_SQRT(def) \ -DRI_CONF_OPT_BEGIN_B(force_glsl_abs_sqrt, def) \ - DRI_CONF_DESC("Force computing the absolute value for sqrt() and inversesqrt()") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(force_glsl_abs_sqrt, def, \ + "Force computing the absolute value for sqrt() and inversesqrt()") #define DRI_CONF_GLSL_CORRECT_DERIVATIVES_AFTER_DISCARD(def) \ -DRI_CONF_OPT_BEGIN_B(glsl_correct_derivatives_after_discard, def) \ - DRI_CONF_DESC("Implicit and explicit derivatives after a discard behave as if the discard didn't happen") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(glsl_correct_derivatives_after_discard, def, \ + "Implicit and explicit derivatives after a discard behave as if the discard didn't happen") #define DRI_CONF_ALLOW_GLSL_CROSS_STAGE_INTERPOLATION_MISMATCH(def) \ -DRI_CONF_OPT_BEGIN_B(allow_glsl_cross_stage_interpolation_mismatch, def) \ - DRI_CONF_DESC("Allow interpolation qualifier mismatch across shader stages") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(allow_glsl_cross_stage_interpolation_mismatch, def, \ + "Allow interpolation qualifier mismatch across shader stages") #define DRI_CONF_ALLOW_GLSL_LAYOUT_QUALIFIER_ON_FUNCTION_PARAMETERS(def) \ -DRI_CONF_OPT_BEGIN_B(allow_glsl_layout_qualifier_on_function_parameters, def) \ - DRI_CONF_DESC("Allow layout qualifiers on function parameters.") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(allow_glsl_layout_qualifier_on_function_parameters, def, \ + "Allow layout qualifiers on function parameters.") #define DRI_CONF_ALLOW_DRAW_OUT_OF_ORDER(def) \ -DRI_CONF_OPT_BEGIN_B(allow_draw_out_of_order, def) \ - DRI_CONF_DESC("Allow out-of-order draw optimizations. Set when Z fighting doesn't have to be accurate.") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(allow_draw_out_of_order, def, \ + "Allow out-of-order draw optimizations. Set when Z fighting doesn't have to be accurate.") #define DRI_CONF_FORCE_GL_VENDOR(def) \ DRI_CONF_OPT_BEGIN(force_gl_vendor, string, def) \ @@ -218,19 +230,15 @@ DRI_CONF_OPT_BEGIN(force_gl_vendor, string, def) \ DRI_CONF_OPT_END #define DRI_CONF_FORCE_COMPAT_PROFILE(def) \ -DRI_CONF_OPT_BEGIN_B(force_compat_profile, def) \ - DRI_CONF_DESC("Force an OpenGL compatibility context") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(force_compat_profile, def, \ + "Force an OpenGL compatibility context") #define DRI_CONF_OVERRIDE_VRAM_SIZE() \ -DRI_CONF_OPT_BEGIN_V(override_vram_size, int, -1, "-1:2147483647") \ - DRI_CONF_DESC("Override the VRAM size advertised to the application in MiB (-1 = default)") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_I(override_vram_size, -1, -1, 2147483647, \ + "Override the VRAM size advertised to the application in MiB (-1 = default)") #define DRI_CONF_FORCE_GL_NAMES_REUSE(def) \ -DRI_CONF_OPT_BEGIN_B(force_gl_names_reuse, def) \ - DRI_CONF_DESC("Force GL names reuse") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(force_gl_names_reuse, def, "Force GL names reuse") /** * \brief Image quality-related options @@ -240,41 +248,36 @@ DRI_CONF_SECTION_BEGIN \ DRI_CONF_DESC("Image Quality") #define DRI_CONF_PRECISE_TRIG(def) \ -DRI_CONF_OPT_BEGIN_B(precise_trig, def) \ - DRI_CONF_DESC("Prefer accuracy over performance in trig functions") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(precise_trig, def, \ + "Prefer accuracy over performance in trig functions") #define DRI_CONF_PP_CELSHADE(def) \ -DRI_CONF_OPT_BEGIN_V(pp_celshade,enum,def,"0:1") \ - DRI_CONF_DESC("A post-processing filter to cel-shade the output") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_E(pp_celshade, def, 0, 1, \ + "A post-processing filter to cel-shade the output", \ + "") #define DRI_CONF_PP_NORED(def) \ -DRI_CONF_OPT_BEGIN_V(pp_nored,enum,def,"0:1") \ - DRI_CONF_DESC("A post-processing filter to remove the red channel") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_E(pp_nored, def, 0, 1, \ + "A post-processing filter to remove the red channel", \ + "") #define DRI_CONF_PP_NOGREEN(def) \ -DRI_CONF_OPT_BEGIN_V(pp_nogreen,enum,def,"0:1") \ - DRI_CONF_DESC("A post-processing filter to remove the green channel") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_E(pp_nogreen, def, 0, 1, \ + "A post-processing filter to remove the green channel", \ + "") #define DRI_CONF_PP_NOBLUE(def) \ -DRI_CONF_OPT_BEGIN_V(pp_noblue,enum,def,"0:1") \ - DRI_CONF_DESC("A post-processing filter to remove the blue channel") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_E(pp_noblue, def, 0, 1, \ + "A post-processing filter to remove the blue channel", \ + "") #define DRI_CONF_PP_JIMENEZMLAA(def,min,max) \ -DRI_CONF_OPT_BEGIN_V(pp_jimenezmlaa,int,def, # min ":" # max ) \ - DRI_CONF_DESC("Morphological anti-aliasing based on Jimenez\\\' MLAA. 0 to disable, 8 for default quality") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_I(pp_jimenezmlaa, def, min, max, \ + "Morphological anti-aliasing based on Jimenez\\\' MLAA. 0 to disable, 8 for default quality") #define DRI_CONF_PP_JIMENEZMLAA_COLOR(def,min,max) \ -DRI_CONF_OPT_BEGIN_V(pp_jimenezmlaa_color,int,def, # min ":" # max ) \ - DRI_CONF_DESC("Morphological anti-aliasing based on Jimenez\\\' MLAA. 0 to disable, 8 for default quality. Color version, usable with 2d GL apps") \ -DRI_CONF_OPT_END - - + DRI_CONF_OPT_I(pp_jimenezmlaa_color, def, min, max, \ + "Morphological anti-aliasing based on Jimenez\\\' MLAA. 0 to disable, 8 for default quality. Color version, usable with 2d GL apps") /** * \brief Performance-related options @@ -288,64 +291,52 @@ DRI_CONF_SECTION_BEGIN \ #define DRI_CONF_VBLANK_DEF_INTERVAL_1 2 #define DRI_CONF_VBLANK_ALWAYS_SYNC 3 #define DRI_CONF_VBLANK_MODE(def) \ -DRI_CONF_OPT_BEGIN_V(vblank_mode,enum,def,"0:3") \ - DRI_CONF_DESC_BEGIN("Synchronization with vertical refresh (swap intervals)") \ - DRI_CONF_ENUM(0,"Never synchronize with vertical refresh, ignore application's choice") \ - DRI_CONF_ENUM(1,"Initial swap interval 0, obey application's choice") \ - DRI_CONF_ENUM(2,"Initial swap interval 1, obey application's choice") \ - DRI_CONF_ENUM(3,"Always synchronize with vertical refresh, application chooses the minimum swap interval") \ - DRI_CONF_DESC_END \ -DRI_CONF_OPT_END + DRI_CONF_OPT_E(vblank_mode, def, 0, 3, \ + "Synchronization with vertical refresh (swap intervals)", \ + DRI_CONF_ENUM(0,"Never synchronize with vertical refresh, ignore application's choice") \ + DRI_CONF_ENUM(1,"Initial swap interval 0, obey application's choice") \ + DRI_CONF_ENUM(2,"Initial swap interval 1, obey application's choice") \ + DRI_CONF_ENUM(3,"Always synchronize with vertical refresh, application chooses the minimum swap interval")) #define DRI_CONF_ADAPTIVE_SYNC(def) \ -DRI_CONF_OPT_BEGIN_B(adaptive_sync,def) \ - DRI_CONF_DESC("Adapt the monitor sync to the application performance (when possible)") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(adaptive_sync,def, \ + "Adapt the monitor sync to the application performance (when possible)") #define DRI_CONF_VK_WSI_FORCE_BGRA8_UNORM_FIRST(def) \ -DRI_CONF_OPT_BEGIN_B(vk_wsi_force_bgra8_unorm_first, def) \ - DRI_CONF_DESC("Force vkGetPhysicalDeviceSurfaceFormatsKHR to return VK_FORMAT_B8G8R8A8_UNORM as the first format") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(vk_wsi_force_bgra8_unorm_first, def, \ + "Force vkGetPhysicalDeviceSurfaceFormatsKHR to return VK_FORMAT_B8G8R8A8_UNORM as the first format") #define DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(def) \ -DRI_CONF_OPT_BEGIN_V(vk_x11_override_min_image_count, int, def, "0:999") \ - DRI_CONF_DESC("Override the VkSurfaceCapabilitiesKHR::minImageCount (0 = no override)") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_I(vk_x11_override_min_image_count, def, 0, 999, \ + "Override the VkSurfaceCapabilitiesKHR::minImageCount (0 = no override)") #define DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(def) \ -DRI_CONF_OPT_BEGIN_B(vk_x11_strict_image_count, def) \ - DRI_CONF_DESC("Force the X11 WSI to create exactly the number of image specified by the application in VkSwapchainCreateInfoKHR::minImageCount") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(vk_x11_strict_image_count, def, \ + "Force the X11 WSI to create exactly the number of image specified by the application in VkSwapchainCreateInfoKHR::minImageCount") #define DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(def) \ -DRI_CONF_OPT_BEGIN_B(vk_x11_ensure_min_image_count, def) \ - DRI_CONF_DESC("Force the X11 WSI to create at least the number of image specified by the driver in VkSurfaceCapabilitiesKHR::minImageCount") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(vk_x11_ensure_min_image_count, def, \ + "Force the X11 WSI to create at least the number of image specified by the driver in VkSurfaceCapabilitiesKHR::minImageCount") #define DRI_CONF_MESA_GLTHREAD(def) \ -DRI_CONF_OPT_BEGIN_B(mesa_glthread, def) \ - DRI_CONF_DESC("Enable offloading GL driver work to a separate thread") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(mesa_glthread, def, \ + "Enable offloading GL driver work to a separate thread") #define DRI_CONF_MESA_NO_ERROR(def) \ -DRI_CONF_OPT_BEGIN_B(mesa_no_error, def) \ - DRI_CONF_DESC("Disable GL driver error checking") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(mesa_no_error, def, \ + "Disable GL driver error checking") #define DRI_CONF_DISABLE_EXT_BUFFER_AGE(def) \ -DRI_CONF_OPT_BEGIN_B(glx_disable_ext_buffer_age, def) \ - DRI_CONF_DESC("Disable the GLX_EXT_buffer_age extension") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(glx_disable_ext_buffer_age, def, \ + "Disable the GLX_EXT_buffer_age extension") #define DRI_CONF_DISABLE_OML_SYNC_CONTROL(def) \ -DRI_CONF_OPT_BEGIN_B(glx_disable_oml_sync_control, def) \ - DRI_CONF_DESC("Disable the GLX_OML_sync_control extension") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(glx_disable_oml_sync_control, def, \ + "Disable the GLX_OML_sync_control extension") #define DRI_CONF_DISABLE_SGI_VIDEO_SYNC(def) \ -DRI_CONF_OPT_BEGIN_B(glx_disable_sgi_video_sync, def) \ - DRI_CONF_DESC("Disable the GLX_SGI_video_sync extension") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(glx_disable_sgi_video_sync, def, \ + "Disable the GLX_SGI_video_sync extension") @@ -357,39 +348,32 @@ DRI_CONF_SECTION_BEGIN \ DRI_CONF_DESC("Miscellaneous") #define DRI_CONF_ALWAYS_HAVE_DEPTH_BUFFER(def) \ -DRI_CONF_OPT_BEGIN_B(always_have_depth_buffer, def) \ - DRI_CONF_DESC("Create all visuals with a depth buffer") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(always_have_depth_buffer, def, \ + "Create all visuals with a depth buffer") #define DRI_CONF_GLSL_ZERO_INIT(def) \ -DRI_CONF_OPT_BEGIN_B(glsl_zero_init, def) \ - DRI_CONF_DESC("Force uninitialized variables to default to zero") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(glsl_zero_init, def, \ + "Force uninitialized variables to default to zero") #define DRI_CONF_VS_POSITION_ALWAYS_INVARIANT(def) \ -DRI_CONF_OPT_BEGIN_B(vs_position_always_invariant, def) \ - DRI_CONF_DESC("Force the vertex shader's gl_Position output to be considered 'invariant'") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(vs_position_always_invariant, def, \ + "Force the vertex shader's gl_Position output to be considered 'invariant'") #define DRI_CONF_ALLOW_RGB10_CONFIGS(def) \ -DRI_CONF_OPT_BEGIN_B(allow_rgb10_configs, def) \ -DRI_CONF_DESC("Allow exposure of visuals and fbconfigs with rgb10a2 formats") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(allow_rgb10_configs, def, \ + "Allow exposure of visuals and fbconfigs with rgb10a2 formats") #define DRI_CONF_ALLOW_RGB565_CONFIGS(def) \ -DRI_CONF_OPT_BEGIN_B(allow_rgb565_configs, def) \ -DRI_CONF_DESC("Allow exposure of visuals and fbconfigs with rgb565 formats") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(allow_rgb565_configs, def, \ + "Allow exposure of visuals and fbconfigs with rgb565 formats") #define DRI_CONF_ALLOW_FP16_CONFIGS(def) \ -DRI_CONF_OPT_BEGIN_B(allow_fp16_configs, def) \ -DRI_CONF_DESC("Allow exposure of visuals and fbconfigs with fp16 formats") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(allow_fp16_configs, def, \ + "Allow exposure of visuals and fbconfigs with fp16 formats") #define DRI_CONF_FORCE_INTEGER_TEX_NEAREST(def) \ -DRI_CONF_OPT_BEGIN_B(force_integer_tex_nearest, def) \ - DRI_CONF_DESC("Force integer textures to use nearest filtering") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(force_integer_tex_nearest, def, \ + "Force integer textures to use nearest filtering") /** * \brief Initialization configuration options @@ -422,9 +406,8 @@ DRI_CONF_OPT_BEGIN(throttle_value, int, def) \ DRI_CONF_OPT_END #define DRI_CONF_NINE_THREADSUBMIT(def) \ -DRI_CONF_OPT_BEGIN_B(thread_submit, def) \ - DRI_CONF_DESC("Use an additional thread to submit buffers.") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(thread_submit, def, \ + "Use an additional thread to submit buffers.") #define DRI_CONF_NINE_OVERRIDEVENDOR(def) \ DRI_CONF_OPT_BEGIN(override_vendorid, int, def) \ @@ -432,14 +415,12 @@ DRI_CONF_OPT_BEGIN(override_vendorid, int, def) \ DRI_CONF_OPT_END #define DRI_CONF_NINE_ALLOWDISCARDDELAYEDRELEASE(def) \ -DRI_CONF_OPT_BEGIN_B(discard_delayed_release, def) \ - DRI_CONF_DESC("Whether to allow the display server to release buffers with a delay when using d3d's presentation mode DISCARD. Default to true. Set to false if suffering from lag (thread_submit=true can also help in this situation).") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(discard_delayed_release, def, \ + "Whether to allow the display server to release buffers with a delay when using d3d's presentation mode DISCARD. Default to true. Set to false if suffering from lag (thread_submit=true can also help in this situation).") #define DRI_CONF_NINE_TEARFREEDISCARD(def) \ -DRI_CONF_OPT_BEGIN_B(tearfree_discard, def) \ - DRI_CONF_DESC("Whether to make d3d's presentation mode DISCARD (games usually use that mode) Tear Free. If rendering above screen refresh, some frames will get skipped. false by default.") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(tearfree_discard, def, \ + "Whether to make d3d's presentation mode DISCARD (games usually use that mode) Tear Free. If rendering above screen refresh, some frames will get skipped. false by default.") #define DRI_CONF_NINE_CSMT(def) \ DRI_CONF_OPT_BEGIN(csmt_force, int, def) \ @@ -447,79 +428,67 @@ DRI_CONF_OPT_BEGIN(csmt_force, int, def) \ DRI_CONF_OPT_END #define DRI_CONF_NINE_DYNAMICTEXTUREWORKAROUND(def) \ -DRI_CONF_OPT_BEGIN_B(dynamic_texture_workaround, def) \ - DRI_CONF_DESC("If set to true, use a ram intermediate buffer for dynamic textures. Increases ram usage, which can cause out of memory issues, but can fix glitches for some games.") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(dynamic_texture_workaround, def, \ + "If set to true, use a ram intermediate buffer for dynamic textures. Increases ram usage, which can cause out of memory issues, but can fix glitches for some games.") #define DRI_CONF_NINE_SHADERINLINECONSTANTS(def) \ -DRI_CONF_OPT_BEGIN_B(shader_inline_constants, def) \ - DRI_CONF_DESC("If set to true, recompile shaders with integer or boolean constants when the values are known. Can cause stutter, but can increase slightly performance.") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(shader_inline_constants, def, \ + "If set to true, recompile shaders with integer or boolean constants when the values are known. Can cause stutter, but can increase slightly performance.") /** * \brief radeonsi specific configuration options */ #define DRI_CONF_RADEONSI_ASSUME_NO_Z_FIGHTS(def) \ -DRI_CONF_OPT_BEGIN_B(radeonsi_assume_no_z_fights, def) \ - DRI_CONF_DESC("Assume no Z fights (enables aggressive out-of-order rasterization to improve performance; may cause rendering errors)") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(radeonsi_assume_no_z_fights, def, \ + "Assume no Z fights (enables aggressive out-of-order rasterization to improve performance; may cause rendering errors)") #define DRI_CONF_RADEONSI_COMMUTATIVE_BLEND_ADD(def) \ -DRI_CONF_OPT_BEGIN_B(radeonsi_commutative_blend_add, def) \ - DRI_CONF_DESC("Commutative additive blending optimizations (may cause rendering errors)") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(radeonsi_commutative_blend_add, def, \ + "Commutative additive blending optimizations (may cause rendering errors)") #define DRI_CONF_RADEONSI_ZERO_ALL_VRAM_ALLOCS(def) \ -DRI_CONF_OPT_BEGIN_B(radeonsi_zerovram, def) \ - DRI_CONF_DESC("Zero all vram allocations") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(radeonsi_zerovram, def, \ + "Zero all vram allocations") #define DRI_CONF_V3D_NONMSAA_TEXTURE_SIZE_LIMIT(def) \ -DRI_CONF_OPT_BEGIN_B(v3d_nonmsaa_texture_size_limit, def) \ - DRI_CONF_DESC("Report the non-MSAA-only texture size limit") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(v3d_nonmsaa_texture_size_limit, def, \ + "Report the non-MSAA-only texture size limit") /** * \brief virgl specific configuration options */ #define DRI_CONF_GLES_EMULATE_BGRA(def) \ -DRI_CONF_OPT_BEGIN_B(gles_emulate_bgra, def) \ - DRI_CONF_DESC("On GLES emulate BGRA formats by using a swizzled RGBA format") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(gles_emulate_bgra, def, \ + "On GLES emulate BGRA formats by using a swizzled RGBA format") #define DRI_CONF_GLES_APPLY_BGRA_DEST_SWIZZLE(def) \ -DRI_CONF_OPT_BEGIN_B(gles_apply_bgra_dest_swizzle, def) \ - DRI_CONF_DESC("When the BGRA formats are emulated by using swizzled RGBA formats on GLES apply the swizzle when writing") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(gles_apply_bgra_dest_swizzle, def, \ + "When the BGRA formats are emulated by using swizzled RGBA formats on GLES apply the swizzle when writing") #define DRI_CONF_GLES_SAMPLES_PASSED_VALUE(def, minimum, maximum) \ - DRI_CONF_OPT_BEGIN_V(gles_samples_passed_value, int, def, #minimum ":" #maximum) \ - DRI_CONF_DESC("GL_SAMPLES_PASSED value when emulated by GL_ANY_SAMPLES_PASSED") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_I(gles_samples_passed_value, def, minimum, maximum, \ + "GL_SAMPLES_PASSED value when emulated by GL_ANY_SAMPLES_PASSED") /** * \brief RADV specific configuration options */ #define DRI_CONF_RADV_REPORT_LLVM9_VERSION_STRING(def) \ -DRI_CONF_OPT_BEGIN_B(radv_report_llvm9_version_string, def) \ - DRI_CONF_DESC("Report LLVM 9.0.1 for games that apply shader workarounds if missing (for ACO only)") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(radv_report_llvm9_version_string, def, \ + "Report LLVM 9.0.1 for games that apply shader workarounds if missing (for ACO only)") #define DRI_CONF_RADV_ENABLE_MRT_OUTPUT_NAN_FIXUP(def) \ -DRI_CONF_OPT_BEGIN_B(radv_enable_mrt_output_nan_fixup, def) \ - DRI_CONF_DESC("Replace NaN outputs from fragment shaders with zeroes for floating point render target") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(radv_enable_mrt_output_nan_fixup, def, \ + "Replace NaN outputs from fragment shaders with zeroes for floating point render target") #define DRI_CONF_RADV_NO_DYNAMIC_BOUNDS(def) \ -DRI_CONF_OPT_BEGIN_B(radv_no_dynamic_bounds, def) \ - DRI_CONF_DESC("Disabling bounds checking for dynamic buffer descriptors") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_B(radv_no_dynamic_bounds, def, \ + "Disabling bounds checking for dynamic buffer descriptors") #define DRI_CONF_RADV_OVERRIDE_UNIFORM_OFFSET_ALIGNMENT(def) \ -DRI_CONF_OPT_BEGIN_V(radv_override_uniform_offset_alignment, int, def, "0:128") \ - DRI_CONF_DESC("Override the minUniformBufferOffsetAlignment exposed to the application. (0 = default)") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_I(radv_override_uniform_offset_alignment, def, 0, 128, \ + "Override the minUniformBufferOffsetAlignment exposed to the application. (0 = default)") + #endif diff --git a/src/util/tests/xmlconfig.cpp b/src/util/tests/xmlconfig.cpp index a95a90a..ff11225 100644 --- a/src/util/tests/xmlconfig.cpp +++ b/src/util/tests/xmlconfig.cpp @@ -46,11 +46,7 @@ xmlconfig_test::~xmlconfig_test() /* wraps a DRI_CONF_OPT_* in the required xml bits */ #define DRI_CONF_TEST_OPT(x) \ - DRI_CONF_BEGIN \ - DRI_CONF_SECTION_MISCELLANEOUS \ - x \ - DRI_CONF_SECTION_END \ - DRI_CONF_END + DRI_CONF(DRI_CONF_SECTION("section", x)) void xmlconfig_test::driconf(const char *driconf) @@ -74,9 +70,7 @@ TEST_F(xmlconfig_test, bools) TEST_F(xmlconfig_test, ints) { driconf(DRI_CONF_TEST_OPT( - DRI_CONF_OPT_BEGIN_V(opt, int, 2, "0:999") - DRI_CONF_DESC("option") - DRI_CONF_OPT_END)); + DRI_CONF_OPT_I(opt, 2, 0, 999, "option"))); EXPECT_EQ(driQueryOptioni(&options, "opt"), 2); } -- 2.7.4