• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * XML DRI client-side driver configuration
3  * Copyright (C) 2003 Felix Kuehling
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included
13  * in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18  * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
19  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21  * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  *
23  */
24 /**
25  * \file driconf.h
26  * \brief Pool of common options
27  * \author Felix Kuehling
28  *
29  * This file defines macros that can be used to construct
30  * driConfigOptions in the drivers.
31  */
32 
33 #ifndef __DRICONF_H
34 #define __DRICONF_H
35 
36 #include "xmlconfig.h"
37 
38 /*
39  * generic macros
40  */
41 
42 /** \brief Names a section of related options to follow */
43 #define DRI_CONF_SECTION(text) { .desc = text, .info = { .type = DRI_SECTION } },
44 #define DRI_CONF_SECTION_END
45 
46 /** \brief End an option description */
47 #define DRI_CONF_OPT_END },
48 
49 /** \brief A verbal description (empty version) */
50 #define DRI_CONF_DESC(text) .desc = text,
51 
52 /** \brief A verbal description of an enum value */
53 #define DRI_CONF_ENUM(_value,text) { .value = _value, .desc = text },
54 
55 #define DRI_CONF_RANGE_I(min, max)              \
56       .range = {                                \
57          .start = { ._int = min },              \
58          .end = { ._int = max },                \
59       }                                         \
60 
61 #define DRI_CONF_RANGE_F(min, max)              \
62       .range = {                                \
63          .start = { ._float = min },            \
64          .end = { ._float = max },              \
65       }                                         \
66 
67 /**
68  * \brief A boolean option definition, with the default value passed in as a
69  * string
70  */
71 
72 #define DRI_CONF_OPT_B(_name, def, _desc) {                     \
73       .desc = _desc,                                            \
74       .info = {                                                 \
75          .name = #_name,                                        \
76          .type = DRI_BOOL,                                      \
77       },                                                        \
78       .value = { ._bool = def },                                \
79    },
80 
81 #define DRI_CONF_OPT_I(_name, def, min, max, _desc) {           \
82       .desc = _desc,                                            \
83       .info = {                                                 \
84          .name = #_name,                                        \
85          .type = DRI_INT,                                       \
86          DRI_CONF_RANGE_I(min, max),                            \
87       },                                                        \
88       .value = { ._int = def },                                 \
89    },
90 
91 #define DRI_CONF_OPT_F(_name, def, min, max, _desc) {           \
92       .desc = _desc,                                            \
93       .info = {                                                 \
94          .name = #_name,                                        \
95          .type = DRI_FLOAT,                                     \
96          DRI_CONF_RANGE_F(min, max),                            \
97       },                                                        \
98       .value = { ._float = def },                               \
99    },
100 
101 #define DRI_CONF_OPT_E(_name, def, min, max, _desc, values) {   \
102       .desc = _desc,                                            \
103       .info = {                                                 \
104          .name = #_name,                                        \
105          .type = DRI_ENUM,                                      \
106          DRI_CONF_RANGE_I(min, max),                            \
107       },                                                        \
108       .value = { ._int = def },                                 \
109       .enums = { values },                                      \
110    },
111 
112 #define DRI_CONF_OPT_S(_name, def, _desc) {                     \
113       .desc = _desc,                                            \
114       .info = {                                                 \
115          .name = #_name,                                        \
116          .type = DRI_STRING,                                    \
117       },                                                        \
118       .value = { ._string = #def },                             \
119    },
120 
121 #define DRI_CONF_OPT_S_NODEF(_name, _desc) {                    \
122       .desc = _desc,                                            \
123       .info = {                                                 \
124          .name = #_name,                                        \
125          .type = DRI_STRING,                                    \
126       },                                                        \
127       .value = { ._string = "" },                               \
128    },
129 
130 /**
131  * \brief Debugging options
132  */
133 #define DRI_CONF_SECTION_DEBUG DRI_CONF_SECTION("Debugging")
134 
135 #define DRI_CONF_ALWAYS_FLUSH_BATCH(def) \
136    DRI_CONF_OPT_B(always_flush_batch, def,                              \
137                   "Enable flushing batchbuffer after each draw call")
138 
139 #define DRI_CONF_ALWAYS_FLUSH_CACHE(def) \
140    DRI_CONF_OPT_B(always_flush_cache, def, \
141                   "Enable flushing GPU caches with each draw call")
142 
143 #define DRI_CONF_DISABLE_THROTTLING(def) \
144    DRI_CONF_OPT_B(disable_throttling, def, \
145                   "Disable throttling on first batch after flush")
146 
147 #define DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(def) \
148    DRI_CONF_OPT_B(force_glsl_extensions_warn, def, \
149                   "Force GLSL extension default behavior to 'warn'")
150 
151 #define DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED(def) \
152    DRI_CONF_OPT_B(disable_blend_func_extended, def, \
153                   "Disable dual source blending")
154 
155 #define DRI_CONF_DISABLE_ARB_GPU_SHADER5(def) \
156    DRI_CONF_OPT_B(disable_arb_gpu_shader5, def, \
157                   "Disable GL_ARB_gpu_shader5")
158 
159 #define DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION(def) \
160    DRI_CONF_OPT_B(dual_color_blend_by_location, def, \
161                   "Identify dual color blending sources by location rather than index")
162 
163 #define DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(def) \
164    DRI_CONF_OPT_B(disable_glsl_line_continuations, def, \
165                   "Disable backslash-based line continuations in GLSL source")
166 
167 #define DRI_CONF_FORCE_GLSL_VERSION(def) \
168    DRI_CONF_OPT_I(force_glsl_version, def, 0, 999, \
169                   "Force a default GLSL version for shaders that lack an explicit #version line")
170 
171 #define DRI_CONF_ALLOW_EXTRA_PP_TOKENS(def) \
172    DRI_CONF_OPT_B(allow_extra_pp_tokens, def, \
173                   "Allow extra tokens at end of preprocessor directives.")
174 
175 #define DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER(def) \
176    DRI_CONF_OPT_B(allow_glsl_extension_directive_midshader, def, \
177                   "Allow GLSL #extension directives in the middle of shaders")
178 
179 #define DRI_CONF_ALLOW_GLSL_120_SUBSET_IN_110(def) \
180    DRI_CONF_OPT_B(allow_glsl_120_subset_in_110, def, \
181                   "Allow a subset of GLSL 1.20 in GLSL 1.10 as needed by SPECviewperf13")
182 
183 #define DRI_CONF_ALLOW_GLSL_BUILTIN_CONST_EXPRESSION(def) \
184    DRI_CONF_OPT_B(allow_glsl_builtin_const_expression, def, \
185                   "Allow builtins as part of constant expressions")
186 
187 #define DRI_CONF_ALLOW_GLSL_RELAXED_ES(def) \
188    DRI_CONF_OPT_B(allow_glsl_relaxed_es, def, \
189                   "Allow some relaxation of GLSL ES shader restrictions")
190 
191 #define DRI_CONF_ALLOW_GLSL_BUILTIN_VARIABLE_REDECLARATION(def) \
192    DRI_CONF_OPT_B(allow_glsl_builtin_variable_redeclaration, def, \
193                   "Allow GLSL built-in variables to be redeclared verbatim")
194 
195 #define DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION(def) \
196    DRI_CONF_OPT_B(allow_higher_compat_version, def, \
197                   "Allow a higher compat profile (version 3.1+) for apps that request it")
198 
199 #define DRI_CONF_ALLOW_GLSL_COMPAT_SHADERS(def) \
200    DRI_CONF_OPT_B(allow_glsl_compat_shaders, def, \
201                   "Allow in GLSL: #version xxx compatibility")
202 
203 #define DRI_CONF_FORCE_GLSL_ABS_SQRT(def) \
204    DRI_CONF_OPT_B(force_glsl_abs_sqrt, def,                             \
205                   "Force computing the absolute value for sqrt() and inversesqrt()")
206 
207 #define DRI_CONF_GLSL_CORRECT_DERIVATIVES_AFTER_DISCARD(def) \
208    DRI_CONF_OPT_B(glsl_correct_derivatives_after_discard, def, \
209                   "Implicit and explicit derivatives after a discard behave as if the discard didn't happen")
210 
211 #define DRI_CONF_GLSL_IGNORE_WRITE_TO_READONLY_VAR(def) \
212    DRI_CONF_OPT_B(glsl_ignore_write_to_readonly_var, def, \
213                   "Forces the GLSL compiler to ignore writes to readonly vars rather than throwing an error")
214 
215 #define DRI_CONF_ALLOW_GLSL_CROSS_STAGE_INTERPOLATION_MISMATCH(def) \
216    DRI_CONF_OPT_B(allow_glsl_cross_stage_interpolation_mismatch, def,   \
217                   "Allow interpolation qualifier mismatch across shader stages")
218 
219 #define DRI_CONF_DO_DCE_BEFORE_CLIP_CULL_ANALYSIS(def) \
220    DRI_CONF_OPT_B(do_dce_before_clip_cull_analysis, def,   \
221                   "Use dead code elimitation before checking for invalid Clip*/CullDistance variables usage.")
222 
223 #define DRI_CONF_ALLOW_DRAW_OUT_OF_ORDER(def) \
224    DRI_CONF_OPT_B(allow_draw_out_of_order, def, \
225                   "Allow out-of-order draw optimizations. Set when Z fighting doesn't have to be accurate.")
226 
227 #define DRI_CONF_GLTHREAD_NOP_CHECK_FRAMEBUFFER_STATUS(def) \
228    DRI_CONF_OPT_B(glthread_nop_check_framebuffer_status, def, \
229                   "glthread always returns GL_FRAMEBUFFER_COMPLETE to prevent synchronization.")
230 
231 #define DRI_CONF_FORCE_GL_VENDOR() \
232    DRI_CONF_OPT_S_NODEF(force_gl_vendor, "Override GPU vendor string.")
233 
234 #define DRI_CONF_FORCE_GL_RENDERER() \
235    DRI_CONF_OPT_S_NODEF(force_gl_renderer, "Override GPU renderer string.")
236 
237 #define DRI_CONF_FORCE_COMPAT_PROFILE(def) \
238    DRI_CONF_OPT_B(force_compat_profile, def, \
239                   "Force an OpenGL compatibility context")
240 
241 #define DRI_CONF_FORCE_COMPAT_SHADERS(def) \
242    DRI_CONF_OPT_B(force_compat_shaders, def, \
243                   "Force OpenGL compatibility shaders")
244 
245 #define DRI_CONF_FORCE_DIRECT_GLX_CONTEXT(def) \
246    DRI_CONF_OPT_B(force_direct_glx_context, def, \
247                   "Force direct GLX context (even if indirect is requested)")
248 
249 #define DRI_CONF_ALLOW_INVALID_GLX_DESTROY_WINDOW(def) \
250    DRI_CONF_OPT_B(allow_invalid_glx_destroy_window, def, \
251                   "Allow passing an invalid window into glXDestroyWindow")
252 
253 #define DRI_CONF_KEEP_NATIVE_WINDOW_GLX_DRAWABLE(def) \
254    DRI_CONF_OPT_B(keep_native_window_glx_drawable, def, \
255                   "Keep GLX drawable created from native window when switch context")
256 
257 #define DRI_CONF_OVERRIDE_VRAM_SIZE() \
258    DRI_CONF_OPT_I(override_vram_size, -1, -1, 2147483647, \
259                   "Override the VRAM size advertised to the application in MiB (-1 = default)")
260 
261 #define DRI_CONF_FORCE_GL_NAMES_REUSE(def) \
262    DRI_CONF_OPT_B(force_gl_names_reuse, def, "Force GL names reuse")
263 
264 #define DRI_CONF_FORCE_GL_MAP_BUFFER_SYNCHRONIZED(def) \
265    DRI_CONF_OPT_B(force_gl_map_buffer_synchronized, def, "Override GL_MAP_UNSYNCHRONIZED_BIT.")
266 
267 #define DRI_CONF_TRANSCODE_ETC(def) \
268    DRI_CONF_OPT_B(transcode_etc, def, "Transcode ETC formats to DXTC if unsupported")
269 
270 #define DRI_CONF_TRANSCODE_ASTC(def) \
271    DRI_CONF_OPT_B(transcode_astc, def, "Transcode ASTC formats to DXTC if unsupported")
272 
273 #define DRI_CONF_MESA_EXTENSION_OVERRIDE() \
274    DRI_CONF_OPT_S_NODEF(mesa_extension_override, \
275                   "Allow enabling/disabling a list of extensions")
276 
277 #define DRI_CONF_GLX_EXTENSION_OVERRIDE() \
278    DRI_CONF_OPT_S_NODEF(glx_extension_override, \
279                   "Allow enabling/disabling a list of GLX extensions")
280 
281 #define DRI_CONF_INDIRECT_GL_EXTENSION_OVERRIDE() \
282    DRI_CONF_OPT_S_NODEF(indirect_gl_extension_override, \
283                   "Allow enabling/disabling a list of indirect-GL extensions")
284 
285 #define DRI_CONF_DISABLE_PROTECTED_CONTENT_CHECK(def) \
286    DRI_CONF_OPT_B(disable_protected_content_check, def, \
287                   "Don't reject image import if protected_content attribute doesn't match")
288 
289 #define DRI_CONF_IGNORE_MAP_UNSYNCHRONIZED(def) \
290    DRI_CONF_OPT_B(ignore_map_unsynchronized, def, \
291                   "Ignore GL_MAP_UNSYNCHRONIZED_BIT, workaround for games that use it incorrectly")
292 
293 #define DRI_CONF_VK_DONT_CARE_AS_LOAD(def) \
294    DRI_CONF_OPT_B(vk_dont_care_as_load, def, \
295                   "Treat VK_ATTACHMENT_LOAD_OP_DONT_CARE as LOAD_OP_LOAD, workaround on tiler GPUs for games that confuse these two load ops")
296 
297 #define DRI_CONF_LIMIT_TRIG_INPUT_RANGE(def) \
298    DRI_CONF_OPT_B(limit_trig_input_range, def, \
299                   "Limit trig input range to [-2p : 2p] to improve sin/cos calculation precision on Intel")
300 
301 /**
302  * \brief Image quality-related options
303  */
304 #define DRI_CONF_SECTION_QUALITY DRI_CONF_SECTION("Image Quality")
305 
306 #define DRI_CONF_PRECISE_TRIG(def) \
307    DRI_CONF_OPT_B(precise_trig, def, \
308                   "Prefer accuracy over performance in trig functions")
309 
310 #define DRI_CONF_PP_CELSHADE(def) \
311    DRI_CONF_OPT_E(pp_celshade, def, 0, 1, \
312                   "A post-processing filter to cel-shade the output", \
313                   { 0 } )
314 
315 #define DRI_CONF_PP_NORED(def) \
316    DRI_CONF_OPT_E(pp_nored, def, 0, 1, \
317                   "A post-processing filter to remove the red channel", \
318                   { 0 } )
319 
320 #define DRI_CONF_PP_NOGREEN(def) \
321    DRI_CONF_OPT_E(pp_nogreen, def, 0, 1, \
322                   "A post-processing filter to remove the green channel", \
323                   { 0 } )
324 
325 #define DRI_CONF_PP_NOBLUE(def) \
326    DRI_CONF_OPT_E(pp_noblue, def, 0, 1, \
327                   "A post-processing filter to remove the blue channel", \
328                   { 0 } )
329 
330 #define DRI_CONF_PP_JIMENEZMLAA(def,min,max) \
331    DRI_CONF_OPT_I(pp_jimenezmlaa, def, min, max, \
332                   "Morphological anti-aliasing based on Jimenez' MLAA. 0 to disable, 8 for default quality")
333 
334 #define DRI_CONF_PP_JIMENEZMLAA_COLOR(def,min,max) \
335    DRI_CONF_OPT_I(pp_jimenezmlaa_color, def, min, max, \
336                   "Morphological anti-aliasing based on Jimenez' MLAA. 0 to disable, 8 for default quality. Color version, usable with 2d GL apps")
337 
338 /**
339  * \brief Performance-related options
340  */
341 #define DRI_CONF_SECTION_PERFORMANCE DRI_CONF_SECTION("Performance")
342 
343 #define DRI_CONF_VBLANK_NEVER 0
344 #define DRI_CONF_VBLANK_DEF_INTERVAL_0 1
345 #define DRI_CONF_VBLANK_DEF_INTERVAL_1 2
346 #define DRI_CONF_VBLANK_ALWAYS_SYNC 3
347 #define DRI_CONF_VBLANK_MODE(def) \
348    DRI_CONF_OPT_E(vblank_mode, def, 0, 3, \
349                   "Synchronization with vertical refresh (swap intervals)", \
350                   DRI_CONF_ENUM(0,"Never synchronize with vertical refresh, ignore application's choice") \
351                   DRI_CONF_ENUM(1,"Initial swap interval 0, obey application's choice") \
352                   DRI_CONF_ENUM(2,"Initial swap interval 1, obey application's choice") \
353                   DRI_CONF_ENUM(3,"Always synchronize with vertical refresh, application chooses the minimum swap interval"))
354 
355 #define DRI_CONF_ADAPTIVE_SYNC(def) \
356    DRI_CONF_OPT_B(adaptive_sync,def, \
357                   "Adapt the monitor sync to the application performance (when possible)")
358 
359 #define DRI_CONF_VK_WSI_FORCE_BGRA8_UNORM_FIRST(def) \
360    DRI_CONF_OPT_B(vk_wsi_force_bgra8_unorm_first, def, \
361                   "Force vkGetPhysicalDeviceSurfaceFormatsKHR to return VK_FORMAT_B8G8R8A8_UNORM as the first format")
362 
363 #define DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(def) \
364    DRI_CONF_OPT_I(vk_x11_override_min_image_count, def, 0, 999, \
365                   "Override the VkSurfaceCapabilitiesKHR::minImageCount (0 = no override)")
366 
367 #define DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(def) \
368    DRI_CONF_OPT_B(vk_x11_strict_image_count, def, \
369                   "Force the X11 WSI to create exactly the number of image specified by the application in VkSwapchainCreateInfoKHR::minImageCount")
370 
371 #define DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(def) \
372    DRI_CONF_OPT_B(vk_x11_ensure_min_image_count, def, \
373                   "Force the X11 WSI to create at least the number of image specified by the driver in VkSurfaceCapabilitiesKHR::minImageCount")
374 
375 #define DRI_CONF_VK_XWAYLAND_WAIT_READY(def) \
376    DRI_CONF_OPT_B(vk_xwayland_wait_ready, def, \
377                   "Wait for fences before submitting buffers to Xwayland")
378 
379 #define DRI_CONF_MESA_GLTHREAD(def) \
380    DRI_CONF_OPT_B(mesa_glthread, def, \
381                   "Enable offloading GL driver work to a separate thread")
382 
383 #define DRI_CONF_MESA_NO_ERROR(def) \
384    DRI_CONF_OPT_B(mesa_no_error, def, \
385                   "Disable GL driver error checking")
386 
387 
388 /**
389  * \brief Miscellaneous configuration options
390  */
391 #define DRI_CONF_SECTION_MISCELLANEOUS DRI_CONF_SECTION("Miscellaneous")
392 
393 #define DRI_CONF_ALWAYS_HAVE_DEPTH_BUFFER(def) \
394    DRI_CONF_OPT_B(always_have_depth_buffer, def, \
395                   "Create all visuals with a depth buffer")
396 
397 #define DRI_CONF_GLSL_ZERO_INIT(def) \
398    DRI_CONF_OPT_B(glsl_zero_init, def, \
399                   "Force uninitialized variables to default to zero")
400 
401 #define DRI_CONF_VS_POSITION_ALWAYS_INVARIANT(def) \
402    DRI_CONF_OPT_B(vs_position_always_invariant, def, \
403                   "Force the vertex shader's gl_Position output to be considered 'invariant'")
404 
405 #define DRI_CONF_VS_POSITION_ALWAYS_PRECISE(def) \
406    DRI_CONF_OPT_B(vs_position_always_precise, def, \
407                   "Force the vertex shader's gl_Position output to be considered 'precise'")
408 
409 #define DRI_CONF_ALLOW_RGB10_CONFIGS(def) \
410    DRI_CONF_OPT_B(allow_rgb10_configs, def, \
411                   "Allow exposure of visuals and fbconfigs with rgb10a2 formats")
412 
413 #define DRI_CONF_ALLOW_RGB565_CONFIGS(def) \
414    DRI_CONF_OPT_B(allow_rgb565_configs, def, \
415                   "Allow exposure of visuals and fbconfigs with rgb565 formats")
416 
417 #define DRI_CONF_FORCE_INTEGER_TEX_NEAREST(def) \
418    DRI_CONF_OPT_B(force_integer_tex_nearest, def, \
419                   "Force integer textures to use nearest filtering")
420 
421 /**
422  * \brief Initialization configuration options
423  */
424 #define DRI_CONF_SECTION_INITIALIZATION DRI_CONF_SECTION("Initialization")
425 
426 #define DRI_CONF_DEVICE_ID_PATH_TAG() \
427    DRI_CONF_OPT_S_NODEF(device_id, "Define the graphic device to use if possible")
428 
429 #define DRI_CONF_DRI_DRIVER() \
430    DRI_CONF_OPT_S_NODEF(dri_driver, "Override the DRI driver to load")
431 
432 /**
433  * \brief Gallium-Nine specific configuration options
434  */
435 
436 #define DRI_CONF_SECTION_NINE DRI_CONF_SECTION("Gallium Nine")
437 
438 #define DRI_CONF_NINE_THROTTLE(def) \
439    DRI_CONF_OPT_I(throttle_value, def, 0, 0, \
440                   "Define the throttling value. -1 for no throttling, -2 for default (usually 2), 0 for glfinish behaviour")
441 
442 #define DRI_CONF_NINE_THREADSUBMIT(def) \
443    DRI_CONF_OPT_B(thread_submit, def, \
444                   "Use an additional thread to submit buffers.")
445 
446 #define DRI_CONF_NINE_OVERRIDEVENDOR(def) \
447    DRI_CONF_OPT_I(override_vendorid, def, 0, 0, \
448                   "Define the vendor_id to report. This allows faking another hardware vendor.")
449 
450 #define DRI_CONF_NINE_ALLOWDISCARDDELAYEDRELEASE(def) \
451    DRI_CONF_OPT_B(discard_delayed_release, def, \
452                   "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).")
453 
454 #define DRI_CONF_NINE_TEARFREEDISCARD(def) \
455    DRI_CONF_OPT_B(tearfree_discard, def, \
456                   "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. true by default.")
457 
458 #define DRI_CONF_NINE_CSMT(def) \
459    DRI_CONF_OPT_I(csmt_force, def, 0, 0, \
460                   "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.")
461 
462 #define DRI_CONF_NINE_DYNAMICTEXTUREWORKAROUND(def) \
463    DRI_CONF_OPT_B(dynamic_texture_workaround, def, \
464                   "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.")
465 
466 #define DRI_CONF_NINE_SHADERINLINECONSTANTS(def) \
467    DRI_CONF_OPT_B(shader_inline_constants, def, \
468                   "If set to true, recompile shaders with integer or boolean constants when the values are known. Can cause stutter, but can increase slightly performance.")
469 
470 #define DRI_CONF_NINE_SHMEM_LIMIT() \
471    DRI_CONF_OPT_I(texture_memory_limit, 128, 0, 0, \
472                   "In MB the limit of virtual memory used for textures until shmem files are unmapped (default 128MB, 32bits only). If negative disables shmem. Set to a low amount to reduce virtual memory usage, but can incur a small perf hit if too low.")
473 
474 #define DRI_CONF_NINE_FORCESWRENDERINGONCPU(def) \
475    DRI_CONF_OPT_B(force_sw_rendering_on_cpu, def, \
476                   "If set to false, emulates software rendering on the requested device, else uses a software renderer.")
477 
478 /**
479  * \brief radeonsi specific configuration options
480  */
481 
482 #define DRI_CONF_RADEONSI_ZERO_ALL_VRAM_ALLOCS(def) \
483    DRI_CONF_OPT_B(radeonsi_zerovram, def, \
484                   "Zero all vram allocations")
485 
486 #define DRI_CONF_V3D_NONMSAA_TEXTURE_SIZE_LIMIT(def) \
487    DRI_CONF_OPT_B(v3d_nonmsaa_texture_size_limit, def, \
488                   "Report the non-MSAA-only texture size limit")
489 
490 /**
491  * \brief virgl specific configuration options
492  */
493 
494 #define DRI_CONF_GLES_EMULATE_BGRA(def) \
495    DRI_CONF_OPT_B(gles_emulate_bgra, def, \
496                   "On GLES emulate BGRA formats by using a swizzled RGBA format")
497 
498 #define DRI_CONF_GLES_APPLY_BGRA_DEST_SWIZZLE(def) \
499    DRI_CONF_OPT_B(gles_apply_bgra_dest_swizzle, def, \
500                   "When the BGRA formats are emulated by using swizzled RGBA formats on GLES apply the swizzle when writing")
501 
502 #define DRI_CONF_GLES_SAMPLES_PASSED_VALUE(def, minimum, maximum) \
503    DRI_CONF_OPT_I(gles_samples_passed_value, def, minimum, maximum, \
504                   "GL_SAMPLES_PASSED value when emulated by GL_ANY_SAMPLES_PASSED")
505 
506 #define DRI_CONF_FORMAT_L8_SRGB_ENABLE_READBACK(def) \
507    DRI_CONF_OPT_B(format_l8_srgb_enable_readback, def, \
508                   "Force-enable reading back L8_SRGB textures")
509 
510 /**
511  * \brief venus specific configuration options
512  */
513 #define DRI_CONF_VENUS_IMPLICIT_FENCING(def) \
514    DRI_CONF_OPT_B(venus_implicit_fencing, def, \
515                   "Assume the virtio-gpu kernel driver supports implicit fencing")
516 
517 /**
518  * \brief RADV specific configuration options
519  */
520 
521 #define DRI_CONF_RADV_REPORT_LLVM9_VERSION_STRING(def) \
522    DRI_CONF_OPT_B(radv_report_llvm9_version_string, def, \
523                   "Report LLVM 9.0.1 for games that apply shader workarounds if missing (for ACO only)")
524 
525 #define DRI_CONF_RADV_ENABLE_MRT_OUTPUT_NAN_FIXUP(def) \
526    DRI_CONF_OPT_B(radv_enable_mrt_output_nan_fixup, def, \
527                   "Replace NaN outputs from fragment shaders with zeroes for floating point render target")
528 
529 #define DRI_CONF_RADV_NO_DYNAMIC_BOUNDS(def) \
530    DRI_CONF_OPT_B(radv_no_dynamic_bounds, def, \
531                   "Disabling bounds checking for dynamic buffer descriptors")
532 
533 #define DRI_CONF_RADV_DISABLE_SHRINK_IMAGE_STORE(def) \
534    DRI_CONF_OPT_B(radv_disable_shrink_image_store, def, \
535                   "Disabling shrinking of image stores based on the format")
536 
537 #define DRI_CONF_RADV_ABSOLUTE_DEPTH_BIAS(def) \
538    DRI_CONF_OPT_B(radv_absolute_depth_bias, def, \
539                   "Consider depthBiasConstantFactor an absolute depth bias (like D3D9)")
540 
541 #define DRI_CONF_RADV_OVERRIDE_UNIFORM_OFFSET_ALIGNMENT(def) \
542    DRI_CONF_OPT_I(radv_override_uniform_offset_alignment, def, 0, 128, \
543                   "Override the minUniformBufferOffsetAlignment exposed to the application. (0 = default)")
544 
545 #define DRI_CONF_RADV_ZERO_VRAM(def) \
546    DRI_CONF_OPT_B(radv_zero_vram, def, \
547                   "Initialize to zero all VRAM allocations")
548 
549 #define DRI_CONF_RADV_LOWER_DISCARD_TO_DEMOTE(def) \
550    DRI_CONF_OPT_B(radv_lower_discard_to_demote, def, \
551                   "Lower discard instructions to demote")
552 
553 #define DRI_CONF_RADV_INVARIANT_GEOM(def) \
554    DRI_CONF_OPT_B(radv_invariant_geom, def, \
555                   "Mark geometry-affecting outputs as invariant")
556 
557 #define DRI_CONF_RADV_SPLIT_FMA(def) \
558    DRI_CONF_OPT_B(radv_split_fma, def, \
559                   "Split application-provided fused multiply-add in geometry stages")
560 
561 #define DRI_CONF_RADV_DISABLE_TC_COMPAT_HTILE_GENERAL(def) \
562    DRI_CONF_OPT_B(radv_disable_tc_compat_htile_general, def, \
563                   "Disable TC-compat HTILE in GENERAL layout")
564 
565 #define DRI_CONF_RADV_DISABLE_DCC(def) \
566    DRI_CONF_OPT_B(radv_disable_dcc, def, \
567                   "Disable DCC for color images")
568 
569 #define DRI_CONF_RADV_REQUIRE_ETC2(def)                                        \
570   DRI_CONF_OPT_B(radv_require_etc2, def,                                       \
571                  "Implement emulated ETC2 on HW that does not support it")
572 
573 #define DRI_CONF_RADV_DISABLE_ANISO_SINGLE_LEVEL(def) \
574   DRI_CONF_OPT_B(radv_disable_aniso_single_level, def, \
575                  "Disable anisotropic filtering for single level images")
576 
577 #define DRI_CONF_RADV_DISABLE_SINKING_LOAD_INPUT_FS(def) \
578    DRI_CONF_OPT_B(radv_disable_sinking_load_input_fs, def, \
579                   "Disable sinking load inputs for fragment shaders")
580 
581 #define DRI_CONF_RADV_DGC(def) \
582    DRI_CONF_OPT_B(radv_dgc, def, \
583                   "Expose an experimental implementation of VK_NV_device_generated_commands")
584 
585 #define DRI_CONF_RADV_FLUSH_BEFORE_QUERY_COPY(def) \
586   DRI_CONF_OPT_B( \
587       radv_flush_before_query_copy, def, \
588       "Wait for timestamps to be written before a query copy command")
589 
590 /**
591  * \brief ANV specific configuration options
592  */
593 
594 #define DRI_CONF_ANV_ASSUME_FULL_SUBGROUPS(def) \
595    DRI_CONF_OPT_B(anv_assume_full_subgroups, def, \
596                   "Allow assuming full subgroups requirement even when it's not specified explicitly")
597 
598 #define DRI_CONF_ANV_SAMPLE_MASK_OUT_OPENGL_BEHAVIOUR(def) \
599    DRI_CONF_OPT_B(anv_sample_mask_out_opengl_behaviour, def, \
600                   "Ignore sample mask out when having single sampled target")
601 
602 #endif
603