Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / util / driconf.h
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 /*
37 * generic macros
38 */
39
40 /** \brief Begin __driConfigOptions */
41 #define DRI_CONF_BEGIN \
42 "<?xml version=\"1.0\" standalone=\"yes\"?>" \
43 "<!DOCTYPE driinfo [" \
44 " <!ELEMENT driinfo (section*)>" \
45 " <!ELEMENT section (description+, option+)>" \
46 " <!ELEMENT description (enum*)>" \
47 " <!ATTLIST description lang CDATA #FIXED \"en\"" \
48 " text CDATA #REQUIRED>" \
49 " <!ELEMENT option (description+)>" \
50 " <!ATTLIST option name CDATA #REQUIRED" \
51 " type (bool|enum|int|float) #REQUIRED" \
52 " default CDATA #REQUIRED" \
53 " valid CDATA #IMPLIED>" \
54 " <!ELEMENT enum EMPTY>" \
55 " <!ATTLIST enum value CDATA #REQUIRED" \
56 " text CDATA #REQUIRED>" \
57 "]>" \
58 "<driinfo>\n"
59
60 /** \brief End __driConfigOptions */
61 #define DRI_CONF_END \
62 "</driinfo>\n"
63
64 /** \brief Begin a section of related options */
65 #define DRI_CONF_SECTION_BEGIN \
66 "<section>\n"
67
68 /** \brief End a section of related options */
69 #define DRI_CONF_SECTION_END \
70 "</section>\n"
71
72 /** \brief Begin an option definition */
73 #define DRI_CONF_OPT_BEGIN(name,type,def) \
74 "<option name=\""#name"\" type=\""#type"\" default=\""#def"\">\n"
75
76 /**
77 * \brief Begin a boolean option definition, with the default value passed in
78 * as a string
79 */
80 #define DRI_CONF_OPT_BEGIN_B(name,def) \
81 "<option name=\""#name"\" type=\"bool\" default="#def">\n"
82
83 /** \brief Begin an option definition with restrictions on valid values */
84 #define DRI_CONF_OPT_BEGIN_V(name,type,def,valid) \
85 "<option name=\""#name"\" type=\""#type"\" default=\""#def"\" valid=\""valid"\">\n"
86
87 /** \brief End an option description */
88 #define DRI_CONF_OPT_END \
89 "</option>\n"
90
91 /** \brief A verbal description (empty version) */
92 #define DRI_CONF_DESC(text) \
93 "<description lang=\"en\" text=\""text"\"/>\n"
94
95 /** \brief Begining of a verbal description */
96 #define DRI_CONF_DESC_BEGIN(text) \
97 "<description lang=\"en\" text=\""text"\">\n"
98
99 /** \brief End a description */
100 #define DRI_CONF_DESC_END \
101 "</description>\n"
102
103 /** \brief A verbal description of an enum value */
104 #define DRI_CONF_ENUM(value,text) \
105 "<enum value=\""#value"\" text=\""text"\"/>\n"
106
107
108 /**
109 * \brief Debugging options
110 */
111 #define DRI_CONF_SECTION_DEBUG \
112 DRI_CONF_SECTION_BEGIN \
113 DRI_CONF_DESC("Debugging")
114
115 #define DRI_CONF_ALWAYS_FLUSH_BATCH(def) \
116 DRI_CONF_OPT_BEGIN_B(always_flush_batch, def) \
117 DRI_CONF_DESC("Enable flushing batchbuffer after each draw call") \
118 DRI_CONF_OPT_END
119
120 #define DRI_CONF_ALWAYS_FLUSH_CACHE(def) \
121 DRI_CONF_OPT_BEGIN_B(always_flush_cache, def) \
122 DRI_CONF_DESC("Enable flushing GPU caches with each draw call") \
123 DRI_CONF_OPT_END
124
125 #define DRI_CONF_DISABLE_THROTTLING(def) \
126 DRI_CONF_OPT_BEGIN_B(disable_throttling, def) \
127 DRI_CONF_DESC("Disable throttling on first batch after flush") \
128 DRI_CONF_OPT_END
129
130 #define DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(def) \
131 DRI_CONF_OPT_BEGIN_B(force_glsl_extensions_warn, def) \
132 DRI_CONF_DESC("Force GLSL extension default behavior to 'warn'") \
133 DRI_CONF_OPT_END
134
135 #define DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED(def) \
136 DRI_CONF_OPT_BEGIN_B(disable_blend_func_extended, def) \
137 DRI_CONF_DESC("Disable dual source blending") \
138 DRI_CONF_OPT_END
139
140 #define DRI_CONF_DISABLE_ARB_GPU_SHADER5(def) \
141 DRI_CONF_OPT_BEGIN_B(disable_arb_gpu_shader5, def) \
142 DRI_CONF_DESC("Disable GL_ARB_gpu_shader5") \
143 DRI_CONF_OPT_END
144
145 #define DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION(def) \
146 DRI_CONF_OPT_BEGIN_B(dual_color_blend_by_location, def) \
147 DRI_CONF_DESC("Identify dual color blending sources by location rather than index") \
148 DRI_CONF_OPT_END
149
150 #define DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(def) \
151 DRI_CONF_OPT_BEGIN_B(disable_glsl_line_continuations, def) \
152 DRI_CONF_DESC("Disable backslash-based line continuations in GLSL source") \
153 DRI_CONF_OPT_END
154
155 #define DRI_CONF_FORCE_GLSL_VERSION(def) \
156 DRI_CONF_OPT_BEGIN_V(force_glsl_version, int, def, "0:999") \
157 DRI_CONF_DESC("Force a default GLSL version for shaders that lack an explicit #version line") \
158 DRI_CONF_OPT_END
159
160 #define DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER(def) \
161 DRI_CONF_OPT_BEGIN_B(allow_glsl_extension_directive_midshader, def) \
162 DRI_CONF_DESC("Allow GLSL #extension directives in the middle of shaders") \
163 DRI_CONF_OPT_END
164
165 #define DRI_CONF_ALLOW_GLSL_120_SUBSET_IN_110(def) \
166 DRI_CONF_OPT_BEGIN_B(allow_glsl_120_subset_in_110, def) \
167 DRI_CONF_DESC("Allow a subset of GLSL 1.20 in GLSL 1.10 as needed by SPECviewperf13") \
168 DRI_CONF_OPT_END
169
170 #define DRI_CONF_ALLOW_GLSL_BUILTIN_CONST_EXPRESSION(def) \
171 DRI_CONF_OPT_BEGIN_B(allow_glsl_builtin_const_expression, def) \
172 DRI_CONF_DESC("Allow builtins as part of constant expressions") \
173 DRI_CONF_OPT_END
174
175 #define DRI_CONF_ALLOW_GLSL_RELAXED_ES(def) \
176 DRI_CONF_OPT_BEGIN_B(allow_glsl_relaxed_es, def) \
177 DRI_CONF_DESC("Allow some relaxation of GLSL ES shader restrictions") \
178 DRI_CONF_OPT_END
179
180 #define DRI_CONF_ALLOW_GLSL_BUILTIN_VARIABLE_REDECLARATION(def) \
181 DRI_CONF_OPT_BEGIN_B(allow_glsl_builtin_variable_redeclaration, def) \
182 DRI_CONF_DESC("Allow GLSL built-in variables to be redeclared verbatim") \
183 DRI_CONF_OPT_END
184
185 #define DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION(def) \
186 DRI_CONF_OPT_BEGIN_B(allow_higher_compat_version, def) \
187 DRI_CONF_DESC("Allow a higher compat profile (version 3.1+) for apps that request it") \
188 DRI_CONF_OPT_END
189
190 #define DRI_CONF_FORCE_GLSL_ABS_SQRT(def) \
191 DRI_CONF_OPT_BEGIN_B(force_glsl_abs_sqrt, def) \
192 DRI_CONF_DESC("Force computing the absolute value for sqrt() and inversesqrt()") \
193 DRI_CONF_OPT_END
194
195 #define DRI_CONF_GLSL_CORRECT_DERIVATIVES_AFTER_DISCARD(def) \
196 DRI_CONF_OPT_BEGIN_B(glsl_correct_derivatives_after_discard, def) \
197 DRI_CONF_DESC("Implicit and explicit derivatives after a discard behave as if the discard didn't happen") \
198 DRI_CONF_OPT_END
199
200 #define DRI_CONF_ALLOW_GLSL_CROSS_STAGE_INTERPOLATION_MISMATCH(def) \
201 DRI_CONF_OPT_BEGIN_B(allow_glsl_cross_stage_interpolation_mismatch, def) \
202 DRI_CONF_DESC("Allow interpolation qualifier mismatch across shader stages") \
203 DRI_CONF_OPT_END
204
205 #define DRI_CONF_ALLOW_GLSL_LAYOUT_QUALIFIER_ON_FUNCTION_PARAMETERS(def) \
206 DRI_CONF_OPT_BEGIN_B(allow_glsl_layout_qualifier_on_function_parameters, def) \
207 DRI_CONF_DESC("Allow layout qualifiers on function parameters.") \
208 DRI_CONF_OPT_END
209
210 #define DRI_CONF_ALLOW_DRAW_OUT_OF_ORDER(def) \
211 DRI_CONF_OPT_BEGIN_B(allow_draw_out_of_order, def) \
212 DRI_CONF_DESC("Allow out-of-order draw optimizations. Set when Z fighting doesn't have to be accurate.") \
213 DRI_CONF_OPT_END
214
215 #define DRI_CONF_FORCE_GL_VENDOR(def) \
216 DRI_CONF_OPT_BEGIN(force_gl_vendor, string, def) \
217 DRI_CONF_DESC("Override GPU vendor string.") \
218 DRI_CONF_OPT_END
219
220 #define DRI_CONF_FORCE_COMPAT_PROFILE(def) \
221 DRI_CONF_OPT_BEGIN_B(force_compat_profile, def) \
222 DRI_CONF_DESC("Force an OpenGL compatibility context") \
223 DRI_CONF_OPT_END
224
225 /**
226 * \brief Image quality-related options
227 */
228 #define DRI_CONF_SECTION_QUALITY \
229 DRI_CONF_SECTION_BEGIN \
230 DRI_CONF_DESC("Image Quality")
231
232 #define DRI_CONF_PRECISE_TRIG(def) \
233 DRI_CONF_OPT_BEGIN_B(precise_trig, def) \
234 DRI_CONF_DESC("Prefer accuracy over performance in trig functions") \
235 DRI_CONF_OPT_END
236
237 #define DRI_CONF_PP_CELSHADE(def) \
238 DRI_CONF_OPT_BEGIN_V(pp_celshade,enum,def,"0:1") \
239 DRI_CONF_DESC("A post-processing filter to cel-shade the output") \
240 DRI_CONF_OPT_END
241
242 #define DRI_CONF_PP_NORED(def) \
243 DRI_CONF_OPT_BEGIN_V(pp_nored,enum,def,"0:1") \
244 DRI_CONF_DESC("A post-processing filter to remove the red channel") \
245 DRI_CONF_OPT_END
246
247 #define DRI_CONF_PP_NOGREEN(def) \
248 DRI_CONF_OPT_BEGIN_V(pp_nogreen,enum,def,"0:1") \
249 DRI_CONF_DESC("A post-processing filter to remove the green channel") \
250 DRI_CONF_OPT_END
251
252 #define DRI_CONF_PP_NOBLUE(def) \
253 DRI_CONF_OPT_BEGIN_V(pp_noblue,enum,def,"0:1") \
254 DRI_CONF_DESC("A post-processing filter to remove the blue channel") \
255 DRI_CONF_OPT_END
256
257 #define DRI_CONF_PP_JIMENEZMLAA(def,min,max) \
258 DRI_CONF_OPT_BEGIN_V(pp_jimenezmlaa,int,def, # min ":" # max ) \
259 DRI_CONF_DESC("Morphological anti-aliasing based on Jimenez\\\' MLAA. 0 to disable, 8 for default quality") \
260 DRI_CONF_OPT_END
261
262 #define DRI_CONF_PP_JIMENEZMLAA_COLOR(def,min,max) \
263 DRI_CONF_OPT_BEGIN_V(pp_jimenezmlaa_color,int,def, # min ":" # max ) \
264 DRI_CONF_DESC("Morphological anti-aliasing based on Jimenez\\\' MLAA. 0 to disable, 8 for default quality. Color version, usable with 2d GL apps") \
265 DRI_CONF_OPT_END
266
267
268
269 /**
270 * \brief Performance-related options
271 */
272 #define DRI_CONF_SECTION_PERFORMANCE \
273 DRI_CONF_SECTION_BEGIN \
274 DRI_CONF_DESC("Performance")
275
276 #define DRI_CONF_VBLANK_NEVER 0
277 #define DRI_CONF_VBLANK_DEF_INTERVAL_0 1
278 #define DRI_CONF_VBLANK_DEF_INTERVAL_1 2
279 #define DRI_CONF_VBLANK_ALWAYS_SYNC 3
280 #define DRI_CONF_VBLANK_MODE(def) \
281 DRI_CONF_OPT_BEGIN_V(vblank_mode,enum,def,"0:3") \
282 DRI_CONF_DESC_BEGIN("Synchronization with vertical refresh (swap intervals)") \
283 DRI_CONF_ENUM(0,"Never synchronize with vertical refresh, ignore application's choice") \
284 DRI_CONF_ENUM(1,"Initial swap interval 0, obey application's choice") \
285 DRI_CONF_ENUM(2,"Initial swap interval 1, obey application's choice") \
286 DRI_CONF_ENUM(3,"Always synchronize with vertical refresh, application chooses the minimum swap interval") \
287 DRI_CONF_DESC_END \
288 DRI_CONF_OPT_END
289
290 #define DRI_CONF_ADAPTIVE_SYNC(def) \
291 DRI_CONF_OPT_BEGIN_B(adaptive_sync,def) \
292 DRI_CONF_DESC("Adapt the monitor sync to the application performance (when possible)") \
293 DRI_CONF_OPT_END
294
295 #define DRI_CONF_VK_WSI_FORCE_BGRA8_UNORM_FIRST(def) \
296 DRI_CONF_OPT_BEGIN_B(vk_wsi_force_bgra8_unorm_first, def) \
297 DRI_CONF_DESC("Force vkGetPhysicalDeviceSurfaceFormatsKHR to return VK_FORMAT_B8G8R8A8_UNORM as the first format") \
298 DRI_CONF_OPT_END
299
300 #define DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(def) \
301 DRI_CONF_OPT_BEGIN_V(vk_x11_override_min_image_count, int, def, "0:999") \
302 DRI_CONF_DESC("Override the VkSurfaceCapabilitiesKHR::minImageCount (0 = no override)") \
303 DRI_CONF_OPT_END
304
305 #define DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(def) \
306 DRI_CONF_OPT_BEGIN_B(vk_x11_strict_image_count, def) \
307 DRI_CONF_DESC("Force the X11 WSI to create exactly the number of image specified by the application in VkSwapchainCreateInfoKHR::minImageCount") \
308 DRI_CONF_OPT_END
309
310 #define DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(def) \
311 DRI_CONF_OPT_BEGIN_B(vk_x11_ensure_min_image_count, def) \
312 DRI_CONF_DESC("Force the X11 WSI to create at least the number of image specified by the driver in VkSurfaceCapabilitiesKHR::minImageCount") \
313 DRI_CONF_OPT_END
314
315 #define DRI_CONF_MESA_GLTHREAD(def) \
316 DRI_CONF_OPT_BEGIN_B(mesa_glthread, def) \
317 DRI_CONF_DESC("Enable offloading GL driver work to a separate thread") \
318 DRI_CONF_OPT_END
319
320 #define DRI_CONF_MESA_NO_ERROR(def) \
321 DRI_CONF_OPT_BEGIN_B(mesa_no_error, def) \
322 DRI_CONF_DESC("Disable GL driver error checking") \
323 DRI_CONF_OPT_END
324
325 #define DRI_CONF_DISABLE_EXT_BUFFER_AGE(def) \
326 DRI_CONF_OPT_BEGIN_B(glx_disable_ext_buffer_age, def) \
327 DRI_CONF_DESC("Disable the GLX_EXT_buffer_age extension") \
328 DRI_CONF_OPT_END
329
330 #define DRI_CONF_DISABLE_OML_SYNC_CONTROL(def) \
331 DRI_CONF_OPT_BEGIN_B(glx_disable_oml_sync_control, def) \
332 DRI_CONF_DESC("Disable the GLX_OML_sync_control extension") \
333 DRI_CONF_OPT_END
334
335 #define DRI_CONF_DISABLE_SGI_VIDEO_SYNC(def) \
336 DRI_CONF_OPT_BEGIN_B(glx_disable_sgi_video_sync, def) \
337 DRI_CONF_DESC("Disable the GLX_SGI_video_sync extension") \
338 DRI_CONF_OPT_END
339
340
341
342 /**
343 * \brief Miscellaneous configuration options
344 */
345 #define DRI_CONF_SECTION_MISCELLANEOUS \
346 DRI_CONF_SECTION_BEGIN \
347 DRI_CONF_DESC("Miscellaneous")
348
349 #define DRI_CONF_ALWAYS_HAVE_DEPTH_BUFFER(def) \
350 DRI_CONF_OPT_BEGIN_B(always_have_depth_buffer, def) \
351 DRI_CONF_DESC("Create all visuals with a depth buffer") \
352 DRI_CONF_OPT_END
353
354 #define DRI_CONF_GLSL_ZERO_INIT(def) \
355 DRI_CONF_OPT_BEGIN_B(glsl_zero_init, def) \
356 DRI_CONF_DESC("Force uninitialized variables to default to zero") \
357 DRI_CONF_OPT_END
358
359 #define DRI_CONF_VS_POSITION_ALWAYS_INVARIANT(def) \
360 DRI_CONF_OPT_BEGIN_B(vs_position_always_invariant, def) \
361 DRI_CONF_DESC("Force the vertex shader's gl_Position output to be considered 'invariant'") \
362 DRI_CONF_OPT_END
363
364 #define DRI_CONF_ALLOW_RGB10_CONFIGS(def) \
365 DRI_CONF_OPT_BEGIN_B(allow_rgb10_configs, def) \
366 DRI_CONF_DESC("Allow exposure of visuals and fbconfigs with rgb10a2 formats") \
367 DRI_CONF_OPT_END
368
369 #define DRI_CONF_ALLOW_RGB565_CONFIGS(def) \
370 DRI_CONF_OPT_BEGIN_B(allow_rgb565_configs, def) \
371 DRI_CONF_DESC("Allow exposure of visuals and fbconfigs with rgb565 formats") \
372 DRI_CONF_OPT_END
373
374 #define DRI_CONF_ALLOW_FP16_CONFIGS(def) \
375 DRI_CONF_OPT_BEGIN_B(allow_fp16_configs, def) \
376 DRI_CONF_DESC("Allow exposure of visuals and fbconfigs with fp16 formats") \
377 DRI_CONF_OPT_END
378
379 #define DRI_CONF_FORCE_INTEGER_TEX_NEAREST(def) \
380 DRI_CONF_OPT_BEGIN_B(force_integer_tex_nearest, def) \
381 DRI_CONF_DESC("Force integer textures to use nearest filtering") \
382 DRI_CONF_OPT_END
383
384 /**
385 * \brief Initialization configuration options
386 */
387 #define DRI_CONF_SECTION_INITIALIZATION \
388 DRI_CONF_SECTION_BEGIN \
389 DRI_CONF_DESC("Initialization")
390
391 #define DRI_CONF_DEVICE_ID_PATH_TAG(def) \
392 DRI_CONF_OPT_BEGIN(device_id, string, def) \
393 DRI_CONF_DESC("Define the graphic device to use if possible") \
394 DRI_CONF_OPT_END
395
396 #define DRI_CONF_DRI_DRIVER(def) \
397 DRI_CONF_OPT_BEGIN(dri_driver, string, def) \
398 DRI_CONF_DESC("Override the DRI driver to load") \
399 DRI_CONF_OPT_END
400
401 /**
402 * \brief Gallium-Nine specific configuration options
403 */
404
405 #define DRI_CONF_SECTION_NINE \
406 DRI_CONF_SECTION_BEGIN \
407 DRI_CONF_DESC("Gallium Nine")
408
409 #define DRI_CONF_NINE_THROTTLE(def) \
410 DRI_CONF_OPT_BEGIN(throttle_value, int, def) \
411 DRI_CONF_DESC("Define the throttling value. -1 for no throttling, -2 for default (usually 2), 0 for glfinish behaviour") \
412 DRI_CONF_OPT_END
413
414 #define DRI_CONF_NINE_THREADSUBMIT(def) \
415 DRI_CONF_OPT_BEGIN_B(thread_submit, def) \
416 DRI_CONF_DESC("Use an additional thread to submit buffers.") \
417 DRI_CONF_OPT_END
418
419 #define DRI_CONF_NINE_OVERRIDEVENDOR(def) \
420 DRI_CONF_OPT_BEGIN(override_vendorid, int, def) \
421 DRI_CONF_DESC("Define the vendor_id to report. This allows faking another hardware vendor.") \
422 DRI_CONF_OPT_END
423
424 #define DRI_CONF_NINE_ALLOWDISCARDDELAYEDRELEASE(def) \
425 DRI_CONF_OPT_BEGIN_B(discard_delayed_release, def) \
426 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).") \
427 DRI_CONF_OPT_END
428
429 #define DRI_CONF_NINE_TEARFREEDISCARD(def) \
430 DRI_CONF_OPT_BEGIN_B(tearfree_discard, def) \
431 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.") \
432 DRI_CONF_OPT_END
433
434 #define DRI_CONF_NINE_CSMT(def) \
435 DRI_CONF_OPT_BEGIN(csmt_force, int, def) \
436 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.") \
437 DRI_CONF_OPT_END
438
439 #define DRI_CONF_NINE_DYNAMICTEXTUREWORKAROUND(def) \
440 DRI_CONF_OPT_BEGIN_B(dynamic_texture_workaround, def) \
441 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.") \
442 DRI_CONF_OPT_END
443
444 #define DRI_CONF_NINE_SHADERINLINECONSTANTS(def) \
445 DRI_CONF_OPT_BEGIN_B(shader_inline_constants, def) \
446 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.") \
447 DRI_CONF_OPT_END
448
449 /**
450 * \brief radeonsi specific configuration options
451 */
452
453 #define DRI_CONF_RADEONSI_ASSUME_NO_Z_FIGHTS(def) \
454 DRI_CONF_OPT_BEGIN_B(radeonsi_assume_no_z_fights, def) \
455 DRI_CONF_DESC("Assume no Z fights (enables aggressive out-of-order rasterization to improve performance; may cause rendering errors)") \
456 DRI_CONF_OPT_END
457
458 #define DRI_CONF_RADEONSI_COMMUTATIVE_BLEND_ADD(def) \
459 DRI_CONF_OPT_BEGIN_B(radeonsi_commutative_blend_add, def) \
460 DRI_CONF_DESC("Commutative additive blending optimizations (may cause rendering errors)") \
461 DRI_CONF_OPT_END
462
463 #define DRI_CONF_RADEONSI_ZERO_ALL_VRAM_ALLOCS(def) \
464 DRI_CONF_OPT_BEGIN_B(radeonsi_zerovram, def) \
465 DRI_CONF_DESC("Zero all vram allocations") \
466 DRI_CONF_OPT_END
467
468 #define DRI_CONF_V3D_NONMSAA_TEXTURE_SIZE_LIMIT(def) \
469 DRI_CONF_OPT_BEGIN_B(v3d_nonmsaa_texture_size_limit, def) \
470 DRI_CONF_DESC("Report the non-MSAA-only texture size limit") \
471 DRI_CONF_OPT_END
472
473 /**
474 * \brief virgl specific configuration options
475 */
476
477 #define DRI_CONF_GLES_EMULATE_BGRA(def) \
478 DRI_CONF_OPT_BEGIN_B(gles_emulate_bgra, def) \
479 DRI_CONF_DESC("On GLES emulate BGRA formats by using a swizzled RGBA format") \
480 DRI_CONF_OPT_END
481
482 #define DRI_CONF_GLES_APPLY_BGRA_DEST_SWIZZLE(def) \
483 DRI_CONF_OPT_BEGIN_B(gles_apply_bgra_dest_swizzle, def) \
484 DRI_CONF_DESC("When the BGRA formats are emulated by using swizzled RGBA formats on GLES apply the swizzle when writing") \
485 DRI_CONF_OPT_END
486
487 #define DRI_CONF_GLES_SAMPLES_PASSED_VALUE(def, minimum, maximum) \
488 DRI_CONF_OPT_BEGIN_V(gles_samples_passed_value, def, minimum, maximum) \
489 DRI_CONF_DESC("GL_SAMPLES_PASSED value when emulated by GL_ANY_SAMPLES_PASSED") \
490 DRI_CONF_OPT_END
491
492 /**
493 * \brief RADV specific configuration options
494 */
495
496 #define DRI_CONF_RADV_REPORT_LLVM9_VERSION_STRING(def) \
497 DRI_CONF_OPT_BEGIN_B(radv_report_llvm9_version_string, def) \
498 DRI_CONF_DESC("Report LLVM 9.0.1 for games that apply shader workarounds if missing (for ACO only)") \
499 DRI_CONF_OPT_END
500
501 #define DRI_CONF_RADV_ENABLE_MRT_OUTPUT_NAN_FIXUP(def) \
502 DRI_CONF_OPT_BEGIN_B(radv_enable_mrt_output_nan_fixup, def) \
503 DRI_CONF_DESC("Replace NaN outputs from fragment shaders with zeroes for floating point render target") \
504 DRI_CONF_OPT_END
505
506 #define DRI_CONF_RADV_NO_DYNAMIC_BOUNDS(def) \
507 DRI_CONF_OPT_BEGIN_B(radv_no_dynamic_bounds, def) \
508 DRI_CONF_DESC("Disabling bounds checking for dynamic buffer descriptors") \
509 DRI_CONF_OPT_END
510
511 #define DRI_CONF_RADV_OVERRIDE_UNIFORM_OFFSET_ALIGNMENT(def) \
512 DRI_CONF_OPT_BEGIN_V(radv_override_uniform_offset_alignment, int, def, "0:128") \
513 DRI_CONF_DESC("Override the minUniformBufferOffsetAlignment exposed to the application. (0 = default)") \
514 DRI_CONF_OPT_END
515 #endif