util: rename xmlpool.h to driconf.h
authorEric Engestrom <eric@engestrom.ch>
Fri, 12 Jun 2020 09:42:32 +0000 (11:42 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 22 Jun 2020 21:50:12 +0000 (21:50 +0000)
To make it clearer what it is and does.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440>

28 files changed:
src/amd/vulkan/radv_device.c
src/egl/drivers/dri2/egl_dri2.h
src/gallium/auxiliary/pipe-loader/pipe_loader.c
src/gallium/auxiliary/postprocess/ADDING
src/gallium/auxiliary/target-helpers/drm_helper.h
src/gallium/drivers/virgl/virgl_driinfo.h.in
src/gallium/targets/d3dadapter9/drm.c
src/gallium/targets/pipe-loader/pipe_radeonsi.c
src/glx/dri2_glx.c
src/glx/dri3_priv.h
src/intel/vulkan/anv_device.c
src/loader/loader.c
src/loader/loader_dri3_helper.c
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/i915/intel_screen.c
src/mesa/drivers/dri/i965/intel_screen.c
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r200/r200_state_init.c
src/mesa/drivers/dri/r200/r200_tex.c
src/mesa/drivers/dri/radeon/radeon_common_context.c
src/mesa/drivers/dri/radeon/radeon_context.c
src/mesa/drivers/dri/radeon/radeon_screen.c
src/mesa/drivers/dri/radeon/radeon_state_init.c
src/mesa/drivers/dri/radeon/radeon_tex.c
src/mesa/drivers/dri/radeon/radeon_texture.c
src/util/driconf.h [new file with mode: 0644]
src/util/merge_driinfo.py
src/util/xmlpool.h [deleted file]

index 423b5b36b00ceb125772a48defadf2ac6289ae5a..1db64cb2ac9059f032f2f19b63d99c03edc9a2c4 100644 (file)
@@ -63,7 +63,7 @@
 #include "util/timespec.h"
 #include "util/u_atomic.h"
 #include "compiler/glsl_types.h"
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 
 static struct radv_timeline_point *
 radv_timeline_find_point_at_least_locked(struct radv_device *device,
index 2fc3752a7838e5593a836a696cbcddd041c96720..3da538c7dc9cb7cf75aaa45d0c6d401f7d45e068 100644 (file)
@@ -363,7 +363,7 @@ struct dri2_egl_sync {
    void *fence;
 };
 
-/* From xmlpool.h, user exposed so should be stable */
+/* From driconf.h, user exposed so should be stable */
 #define DRI_CONF_VBLANK_NEVER 0
 #define DRI_CONF_VBLANK_DEF_INTERVAL_0 1
 #define DRI_CONF_VBLANK_DEF_INTERVAL_1 2
index e0fb249b6f096b02cab242483d834e01d532edef..cfe6faddaf1e7110896b9e493281a0114dcc7848 100644 (file)
@@ -33,7 +33,7 @@
 #include "util/u_dl.h"
 #include "util/u_file.h"
 #include "util/xmlconfig.h"
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 
 #include <string.h>
 
index 39f2eda0022adb7d81d7ea3236e9a0c261ed4dfb..b202c5b627e6f0ca22e71583dfb225f843e515c0 100644 (file)
@@ -61,7 +61,7 @@ main function as is.
 ---------------------------
 
 First time outside of auxiliary/postprocess. First, add a suitable description to
-src/util/xmlpool.h.
+src/util/driconf.h.
 Use the name you put into filters.h as the config option name.
 
 With driconf aware of the option, make Gallium aware of it too. Add it to
index 6010631e9a601661ebad1a1c17679299b1d6969a..7d8e30e0ab46c8bfd05a6b004bc9d49b83742f73 100644 (file)
@@ -5,7 +5,7 @@
 #include "target-helpers/inline_debug_helper.h"
 #include "target-helpers/drm_helper_public.h"
 #include "frontend/drm_driver.h"
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 
 #ifdef GALLIUM_I915
 #include "i915/drm/i915_drm_public.h"
index 8119d77a18de25c7175dfffab3239700086d6798..2c7be56e92c5b50b3651177354ad5c53c6f8284f 100644 (file)
@@ -1,6 +1,6 @@
 // DriConf options specific to virgl
 // To add a new tweak:
-//   1. Define the tweak in util/xmlpool.h and also add
+//   1. Define the tweak in util/driconf.h and also add
 //      the tweak name as define to virgl_protocol.h
 //   2. Add the tweak here with the appropriated default value
 //   3. Add the code to query the tweak in virgl_create_screen
index a230475d7de67aa9a31a8061f055bc380a94bfcc..41fa71a4349045b8767507e1203db38137e98f2d 100644 (file)
@@ -38,7 +38,7 @@
 #include "d3dadapter/drm.h"
 
 #include "util/xmlconfig.h"
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 
 #include "drm-uapi/drm.h"
 #include <sys/ioctl.h>
index f5c5770af081116cf980b9a734e808e76c314daa..d8cbe02c1b7b3c6c134a05b4904ca40a151cc5f1 100644 (file)
@@ -1,7 +1,7 @@
 #include "frontend/drm_driver.h"
 #include "target-helpers/inline_debug_helper.h"
 #include "radeonsi/si_public.h"
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 
 static struct pipe_screen *
 create_screen(int fd, const struct pipe_screen_config *config)
index 774c1ee58154cbb2d222154c7cc6117bd2b9073b..af50fbe9d9c86c2738d4e9d1ed38b94622508c32 100644 (file)
@@ -50,7 +50,7 @@
 #include "dri2_priv.h"
 #include "loader.h"
 
-/* From xmlpool.h, user exposed so should be stable */
+/* From driconf.h, user exposed so should be stable */
 #define DRI_CONF_VBLANK_NEVER 0
 #define DRI_CONF_VBLANK_DEF_INTERVAL_0 1
 #define DRI_CONF_VBLANK_DEF_INTERVAL_1 2
index f26edabe047b7faf8f7183c7487e7cd991142e9d..dbd04c00bb4903998f8f481b582cf43d75c0f206 100644 (file)
@@ -61,7 +61,7 @@
 
 #include "loader_dri3_helper.h"
 
-/* From xmlpool.h, user exposed so should be stable */
+/* From driconf.h, user exposed so should be stable */
 #define DRI_CONF_VBLANK_NEVER 0
 #define DRI_CONF_VBLANK_DEF_INTERVAL_0 1
 #define DRI_CONF_VBLANK_DEF_INTERVAL_1 2
index 97d0088bd9098c1d55f4d8bf86226066472a55b8..13492e4d5539a465e5b49b83f3e9ffb302e822f1 100644 (file)
@@ -39,7 +39,7 @@
 #include "util/os_file.h"
 #include "util/u_atomic.h"
 #include "util/u_string.h"
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 #include "git_sha1.h"
 #include "vk_util.h"
 #include "common/gen_aux_map.h"
index 8548cbdfedb369b7e855adb603e6f2275d8543aa..e0b08dfa6cb6046a39a052911ba2b638a360e718 100644 (file)
@@ -53,7 +53,7 @@
 #define MAX_DRM_DEVICES 64
 #ifdef USE_DRICONF
 #include "util/xmlconfig.h"
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 #endif
 #endif
 
index 2c8cb9a919361dda6719c45b8be11084595e98ba..95f93da0e3a3aa3b194dac62ebca28e3522551ec 100644 (file)
@@ -37,7 +37,7 @@
 #include "util/macros.h"
 #include "drm-uapi/drm_fourcc.h"
 
-/* From xmlpool.h, user exposed so should be stable */
+/* From driconf.h, user exposed so should be stable */
 #define DRI_CONF_VBLANK_NEVER 0
 #define DRI_CONF_VBLANK_DEF_INTERVAL_0 1
 #define DRI_CONF_VBLANK_DEF_INTERVAL_1 2
index e90179c7f2ec6c2af510860511a22d03ed8acb2d..c5e8091cf8098efa449eff26925cf668f4b7f849 100644 (file)
@@ -43,7 +43,7 @@
 #include "dri_util.h"
 #include "utils.h"
 #include "util/u_endian.h"
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 #include "main/mtypes.h"
 #include "main/framebuffer.h"
 #include "main/version.h"
index 2243b7df5dae943933ef28a0d72e4a1d286c84c2..cf134339564e88675c6717a13656c78fcbb781a8 100644 (file)
@@ -40,7 +40,7 @@
 #include "swrast/s_renderbuffer.h"
 
 #include "utils.h"
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 #include "util/u_memory.h"
 
 static const __DRIconfigOptionsExtension i915_config_options = {
index 45905c48ffa517e491a41153ce02e761775b93cf..b72c247bffba5ff2b95e0b8e963c2c5c16ffb0b1 100644 (file)
@@ -44,7 +44,7 @@
 
 #include "utils.h"
 #include "util/disk_cache.h"
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 #include "util/u_memory.h"
 
 #include "common/gen_defines.h"
index f1c5e8f172b794e8015229fea738c787b2884b45..ab0c6c9d38e8ddcb130d643d26c8e26305083741 100644 (file)
@@ -65,7 +65,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "radeon_span.h"
 
 #include "utils.h"
-#include "util/xmlpool.h" /* for symbolic values of enum-type options */
+#include "util/driconf.h" /* for symbolic values of enum-type options */
 
 /* Return various strings for glGetString().
  */
index 3d6e6559973a70a107dde7cce4be2320d1970f05..5c6b575ff87362cdef8ce921e0f5db99fc52d405 100644 (file)
@@ -50,7 +50,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "r200_state.h"
 #include "radeon_queryobj.h"
 
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 
 /* New (1.3) state mechanism.  3 commands (packet, scalar, vector) in
  * 1.3 cmdbuffers allow all previous state to be updated as well as
index 51f4495e18a46db87f0db75498c947508c6bdbdd..6e51ebe5553b65ce610c2020f80c77825370156c 100644 (file)
@@ -46,7 +46,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "r200_tex.h"
 
 #include "util/u_memory.h"
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 
 
 
index 47719baa57545caecd9ae98d47b9dd5c3ce24380..416d2d988fec06c882b354d3aa6ce94495d23949 100644 (file)
@@ -33,7 +33,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 **************************************************************************/
 
 #include "radeon_common.h"
-#include "util/xmlpool.h"              /* for symbolic values of enum-type options */
+#include "util/driconf.h"              /* for symbolic values of enum-type options */
 #include "utils.h"
 #include "drivers/common/meta.h"
 #include "main/context.h"
index e05b8ba2ff622563c06b90f95e8dcc71104e9493..5a1c01fdd0df751e899601d7e4aff85521399e96 100644 (file)
@@ -66,7 +66,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "radeon_fog.h"
 
 #include "utils.h"
-#include "util/xmlpool.h" /* for symbolic values of enum-type options */
+#include "util/driconf.h" /* for symbolic values of enum-type options */
 
 extern const struct tnl_pipeline_stage _radeon_render_stage;
 extern const struct tnl_pipeline_stage _radeon_tcl_stage;
index f438654fb26f528c2772dedce4a02d3be314f776..c56eba0b9359e945549425be2ffb28fd86afb93c 100644 (file)
@@ -62,7 +62,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 /* Radeon configuration
  */
-#include "util/xmlpool.h"
+#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 ) \
index ac387184f69418811b16963bdc539c8a68a3e8e2..d1369ce0b2c8adac7ff87c466d5edab355bdca60 100644 (file)
@@ -44,7 +44,7 @@
 
 #include "../r200/r200_reg.h"
 
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 
 /* New (1.3) state mechanism.  3 commands (packet, scalar, vector) in
  * 1.3 cmdbuffers allow all previous state to be updated as well as
index c3d7affffab9a473d39aed0bc34416d7535268db..6a5579b2c2b9fa6717e80cc01a6d59ba2e00bc4a 100644 (file)
@@ -44,7 +44,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "radeon_tex.h"
 
 #include "util/u_memory.h"
-#include "util/xmlpool.h"
+#include "util/driconf.h"
 
 
 
index 86059c4475190c93186be72777146460e9d8c55f..e6ab7a80ecd3f374b8c969a9cf57a91f8ea4443c 100644 (file)
@@ -40,7 +40,7 @@
 #include "main/texobj.h"
 #include "drivers/common/meta.h"
 
-#include "util/xmlpool.h"              /* for symbolic values of enum-type options */
+#include "util/driconf.h"              /* for symbolic values of enum-type options */
 
 #include "radeon_common.h"
 
diff --git a/src/util/driconf.h b/src/util/driconf.h
new file mode 100644 (file)
index 0000000..7f93122
--- /dev/null
@@ -0,0 +1,501 @@
+/*
+ * XML DRI client-side driver configuration
+ * Copyright (C) 2003 Felix Kuehling
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, 
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ */
+/**
+ * \file driconf.h
+ * \brief Pool of common options
+ * \author Felix Kuehling
+ *
+ * This file defines macros that can be used to construct
+ * driConfigOptions in the drivers.
+ */
+
+#ifndef __DRICONF_H
+#define __DRICONF_H
+
+/*
+ * generic macros
+ */
+
+/** \brief Begin __driConfigOptions */
+#define DRI_CONF_BEGIN \
+"<?xml version=\"1.0\" standalone=\"yes\"?>" \
+"<!DOCTYPE driinfo [" \
+"   <!ELEMENT driinfo      (section*)>" \
+"   <!ELEMENT section      (description+, option+)>" \
+"   <!ELEMENT description  (enum*)>" \
+"   <!ATTLIST description  lang CDATA #FIXED \"en\"" \
+"                          text CDATA #REQUIRED>" \
+"   <!ELEMENT option       (description+)>" \
+"   <!ATTLIST option       name CDATA #REQUIRED" \
+"                          type (bool|enum|int|float) #REQUIRED" \
+"                          default CDATA #REQUIRED" \
+"                          valid CDATA #IMPLIED>" \
+"   <!ELEMENT enum         EMPTY>" \
+"   <!ATTLIST enum         value CDATA #REQUIRED" \
+"                          text CDATA #REQUIRED>" \
+"]>" \
+"<driinfo>\n"
+
+/** \brief End __driConfigOptions */
+#define DRI_CONF_END \
+"</driinfo>\n"
+
+/** \brief Begin a section of related options */
+#define DRI_CONF_SECTION_BEGIN \
+"<section>\n"
+
+/** \brief End a section of related options */
+#define DRI_CONF_SECTION_END \
+"</section>\n"
+
+/** \brief Begin an option definition */
+#define DRI_CONF_OPT_BEGIN(name,type,def) \
+"<option name=\""#name"\" type=\""#type"\" default=\""#def"\">\n"
+
+/**
+ * \brief Begin a boolean option definition, with the default value passed in
+ * as a string
+ */
+#define DRI_CONF_OPT_BEGIN_B(name,def) \
+"<option name=\""#name"\" type=\"bool\" default="#def">\n"
+
+/** \brief Begin an option definition with restrictions on valid values */
+#define DRI_CONF_OPT_BEGIN_V(name,type,def,valid) \
+"<option name=\""#name"\" type=\""#type"\" default=\""#def"\" valid=\""valid"\">\n"
+
+/** \brief End an option description */
+#define DRI_CONF_OPT_END \
+"</option>\n"
+
+/** \brief A verbal description (empty version) */
+#define DRI_CONF_DESC(text) \
+"<description lang=\"en\" text=\""text"\"/>\n"
+
+/** \brief Begining of a verbal description */
+#define DRI_CONF_DESC_BEGIN(text) \
+"<description lang=\"en\" text=\""text"\">\n"
+
+/** \brief End a description */
+#define DRI_CONF_DESC_END \
+"</description>\n"
+
+/** \brief A verbal description of an enum value */
+#define DRI_CONF_ENUM(value,text) \
+"<enum value=\""#value"\" text=\""text"\"/>\n"
+
+
+/**
+ * \brief Debugging options
+ */
+#define DRI_CONF_SECTION_DEBUG \
+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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#define DRI_CONF_FORCE_GL_VENDOR(def) \
+DRI_CONF_OPT_BEGIN(force_gl_vendor, string, def) \
+        DRI_CONF_DESC("Allow GPU vendor to be overridden.") \
+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
+
+/**
+ * \brief Image quality-related options
+ */
+#define DRI_CONF_SECTION_QUALITY \
+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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+
+
+/**
+ * \brief Performance-related options
+ */
+#define DRI_CONF_SECTION_PERFORMANCE \
+DRI_CONF_SECTION_BEGIN \
+        DRI_CONF_DESC("Performance")
+
+#define DRI_CONF_VBLANK_NEVER 0
+#define DRI_CONF_VBLANK_DEF_INTERVAL_0 1
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+
+
+/**
+ * \brief Miscellaneous configuration options
+ */
+#define DRI_CONF_SECTION_MISCELLANEOUS \
+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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+#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
+
+/**
+ * \brief Initialization configuration options
+ */
+#define DRI_CONF_SECTION_INITIALIZATION \
+DRI_CONF_SECTION_BEGIN \
+        DRI_CONF_DESC("Initialization")
+
+#define DRI_CONF_DEVICE_ID_PATH_TAG(def) \
+DRI_CONF_OPT_BEGIN(device_id, string, def) \
+        DRI_CONF_DESC("Define the graphic device to use if possible") \
+DRI_CONF_OPT_END
+
+#define DRI_CONF_DRI_DRIVER(def) \
+DRI_CONF_OPT_BEGIN(dri_driver, string, def) \
+        DRI_CONF_DESC("Override the DRI driver to load") \
+DRI_CONF_OPT_END
+
+/**
+ * \brief Gallium-Nine specific configuration options
+ */
+
+#define DRI_CONF_SECTION_NINE \
+DRI_CONF_SECTION_BEGIN \
+        DRI_CONF_DESC("Gallium Nine")
+
+#define DRI_CONF_NINE_THROTTLE(def) \
+DRI_CONF_OPT_BEGIN(throttle_value, int, def) \
+        DRI_CONF_DESC("Define the throttling value. -1 for no throttling, -2 for default (usually 2), 0 for glfinish behaviour") \
+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
+
+#define DRI_CONF_NINE_OVERRIDEVENDOR(def) \
+DRI_CONF_OPT_BEGIN(override_vendorid, int, def) \
+        DRI_CONF_DESC("Define the vendor_id to report. This allows faking another hardware vendor.") \
+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
+
+#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
+
+#define DRI_CONF_NINE_CSMT(def) \
+DRI_CONF_OPT_BEGIN(csmt_force, int, def) \
+        DRI_CONF_DESC("If set to 1, force gallium nine CSMT. If set to 0, disable it. By default (-1) CSMT is enabled on known thread-safe drivers.") \
+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
+
+#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
+
+/**
+ * \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
+
+#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
+
+#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
+
+#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
+
+/**
+ * \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
+
+#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
+
+#define DRI_CONF_GLES_SAMPLES_PASSED_VALUE(def, minimum, maximum) \
+DRI_CONF_OPT_BEGIN_V(gles_samples_passed_value, def, minimum, maximum) \
+        DRI_CONF_DESC("GL_SAMPLES_PASSED value when emulated by GL_ANY_SAMPLES_PASSED") \
+DRI_CONF_OPT_END
+
+/**
+ * \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
+
+#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
+
+#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
+
+#endif
index 0e071e5d7bf8c2381ad55e01a20a5ac0cc65d2a9..ff993923c5802087851ed351770c0911325978ca 100644 (file)
@@ -230,7 +230,7 @@ def main(input_filenames):
 /*
 Use as:
 
-#include "xmlpool.h"
+#include "driconf.h"
 
 static const char driinfo_xml[] =
 #include "this_file"
diff --git a/src/util/xmlpool.h b/src/util/xmlpool.h
deleted file mode 100644 (file)
index 5875f46..0000000
+++ /dev/null
@@ -1,501 +0,0 @@
-/*
- * XML DRI client-side driver configuration
- * Copyright (C) 2003 Felix Kuehling
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, 
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * 
- */
-/**
- * \file xmlpool.h
- * \brief Pool of common options
- * \author Felix Kuehling
- *
- * This file defines macros that can be used to construct
- * driConfigOptions in the drivers.
- */
-
-#ifndef __XMLPOOL_H
-#define __XMLPOOL_H
-
-/*
- * generic macros
- */
-
-/** \brief Begin __driConfigOptions */
-#define DRI_CONF_BEGIN \
-"<?xml version=\"1.0\" standalone=\"yes\"?>" \
-"<!DOCTYPE driinfo [" \
-"   <!ELEMENT driinfo      (section*)>" \
-"   <!ELEMENT section      (description+, option+)>" \
-"   <!ELEMENT description  (enum*)>" \
-"   <!ATTLIST description  lang CDATA #FIXED \"en\"" \
-"                          text CDATA #REQUIRED>" \
-"   <!ELEMENT option       (description+)>" \
-"   <!ATTLIST option       name CDATA #REQUIRED" \
-"                          type (bool|enum|int|float) #REQUIRED" \
-"                          default CDATA #REQUIRED" \
-"                          valid CDATA #IMPLIED>" \
-"   <!ELEMENT enum         EMPTY>" \
-"   <!ATTLIST enum         value CDATA #REQUIRED" \
-"                          text CDATA #REQUIRED>" \
-"]>" \
-"<driinfo>\n"
-
-/** \brief End __driConfigOptions */
-#define DRI_CONF_END \
-"</driinfo>\n"
-
-/** \brief Begin a section of related options */
-#define DRI_CONF_SECTION_BEGIN \
-"<section>\n"
-
-/** \brief End a section of related options */
-#define DRI_CONF_SECTION_END \
-"</section>\n"
-
-/** \brief Begin an option definition */
-#define DRI_CONF_OPT_BEGIN(name,type,def) \
-"<option name=\""#name"\" type=\""#type"\" default=\""#def"\">\n"
-
-/**
- * \brief Begin a boolean option definition, with the default value passed in
- * as a string
- */
-#define DRI_CONF_OPT_BEGIN_B(name,def) \
-"<option name=\""#name"\" type=\"bool\" default="#def">\n"
-
-/** \brief Begin an option definition with restrictions on valid values */
-#define DRI_CONF_OPT_BEGIN_V(name,type,def,valid) \
-"<option name=\""#name"\" type=\""#type"\" default=\""#def"\" valid=\""valid"\">\n"
-
-/** \brief End an option description */
-#define DRI_CONF_OPT_END \
-"</option>\n"
-
-/** \brief A verbal description (empty version) */
-#define DRI_CONF_DESC(text) \
-"<description lang=\"en\" text=\""text"\"/>\n"
-
-/** \brief Begining of a verbal description */
-#define DRI_CONF_DESC_BEGIN(text) \
-"<description lang=\"en\" text=\""text"\">\n"
-
-/** \brief End a description */
-#define DRI_CONF_DESC_END \
-"</description>\n"
-
-/** \brief A verbal description of an enum value */
-#define DRI_CONF_ENUM(value,text) \
-"<enum value=\""#value"\" text=\""text"\"/>\n"
-
-
-/**
- * \brief Debugging options
- */
-#define DRI_CONF_SECTION_DEBUG \
-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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#define DRI_CONF_FORCE_GL_VENDOR(def) \
-DRI_CONF_OPT_BEGIN(force_gl_vendor, string, def) \
-        DRI_CONF_DESC("Allow GPU vendor to be overridden.") \
-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
-
-/**
- * \brief Image quality-related options
- */
-#define DRI_CONF_SECTION_QUALITY \
-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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-
-
-/**
- * \brief Performance-related options
- */
-#define DRI_CONF_SECTION_PERFORMANCE \
-DRI_CONF_SECTION_BEGIN \
-        DRI_CONF_DESC("Performance")
-
-#define DRI_CONF_VBLANK_NEVER 0
-#define DRI_CONF_VBLANK_DEF_INTERVAL_0 1
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-
-
-/**
- * \brief Miscellaneous configuration options
- */
-#define DRI_CONF_SECTION_MISCELLANEOUS \
-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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-#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
-
-/**
- * \brief Initialization configuration options
- */
-#define DRI_CONF_SECTION_INITIALIZATION \
-DRI_CONF_SECTION_BEGIN \
-        DRI_CONF_DESC("Initialization")
-
-#define DRI_CONF_DEVICE_ID_PATH_TAG(def) \
-DRI_CONF_OPT_BEGIN(device_id, string, def) \
-        DRI_CONF_DESC("Define the graphic device to use if possible") \
-DRI_CONF_OPT_END
-
-#define DRI_CONF_DRI_DRIVER(def) \
-DRI_CONF_OPT_BEGIN(dri_driver, string, def) \
-        DRI_CONF_DESC("Override the DRI driver to load") \
-DRI_CONF_OPT_END
-
-/**
- * \brief Gallium-Nine specific configuration options
- */
-
-#define DRI_CONF_SECTION_NINE \
-DRI_CONF_SECTION_BEGIN \
-        DRI_CONF_DESC("Gallium Nine")
-
-#define DRI_CONF_NINE_THROTTLE(def) \
-DRI_CONF_OPT_BEGIN(throttle_value, int, def) \
-        DRI_CONF_DESC("Define the throttling value. -1 for no throttling, -2 for default (usually 2), 0 for glfinish behaviour") \
-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
-
-#define DRI_CONF_NINE_OVERRIDEVENDOR(def) \
-DRI_CONF_OPT_BEGIN(override_vendorid, int, def) \
-        DRI_CONF_DESC("Define the vendor_id to report. This allows faking another hardware vendor.") \
-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
-
-#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
-
-#define DRI_CONF_NINE_CSMT(def) \
-DRI_CONF_OPT_BEGIN(csmt_force, int, def) \
-        DRI_CONF_DESC("If set to 1, force gallium nine CSMT. If set to 0, disable it. By default (-1) CSMT is enabled on known thread-safe drivers.") \
-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
-
-#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
-
-/**
- * \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
-
-#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
-
-#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
-
-#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
-
-/**
- * \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
-
-#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
-
-#define DRI_CONF_GLES_SAMPLES_PASSED_VALUE(def, minimum, maximum) \
-DRI_CONF_OPT_BEGIN_V(gles_samples_passed_value, def, minimum, maximum) \
-        DRI_CONF_DESC("GL_SAMPLES_PASSED value when emulated by GL_ANY_SAMPLES_PASSED") \
-DRI_CONF_OPT_END
-
-/**
- * \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
-
-#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
-
-#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
-
-#endif