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_FORCE_GLSL_ABS_SQRT(def) \ 200 DRI_CONF_OPT_B(force_glsl_abs_sqrt, def, \ 201 "Force computing the absolute value for sqrt() and inversesqrt()") 202 203 #define DRI_CONF_GLSL_CORRECT_DERIVATIVES_AFTER_DISCARD(def) \ 204 DRI_CONF_OPT_B(glsl_correct_derivatives_after_discard, def, \ 205 "Implicit and explicit derivatives after a discard behave as if the discard didn't happen") 206 207 #define DRI_CONF_GLSL_IGNORE_WRITE_TO_READONLY_VAR(def) \ 208 DRI_CONF_OPT_B(glsl_ignore_write_to_readonly_var, def, \ 209 "Forces the GLSL compiler to ignore writes to readonly vars rather than throwing an error") 210 211 #define DRI_CONF_ALLOW_GLSL_CROSS_STAGE_INTERPOLATION_MISMATCH(def) \ 212 DRI_CONF_OPT_B(allow_glsl_cross_stage_interpolation_mismatch, def, \ 213 "Allow interpolation qualifier mismatch across shader stages") 214 215 #define DRI_CONF_ALLOW_DRAW_OUT_OF_ORDER(def) \ 216 DRI_CONF_OPT_B(allow_draw_out_of_order, def, \ 217 "Allow out-of-order draw optimizations. Set when Z fighting doesn't have to be accurate.") 218 219 #define DRI_CONF_FORCE_GL_VENDOR() \ 220 DRI_CONF_OPT_S_NODEF(force_gl_vendor, "Override GPU vendor string.") 221 222 #define DRI_CONF_FORCE_GL_RENDERER() \ 223 DRI_CONF_OPT_S_NODEF(force_gl_renderer, "Override GPU renderer string.") 224 225 #define DRI_CONF_FORCE_COMPAT_PROFILE(def) \ 226 DRI_CONF_OPT_B(force_compat_profile, def, \ 227 "Force an OpenGL compatibility context") 228 229 #define DRI_CONF_OVERRIDE_VRAM_SIZE() \ 230 DRI_CONF_OPT_I(override_vram_size, -1, -1, 2147483647, \ 231 "Override the VRAM size advertised to the application in MiB (-1 = default)") 232 233 #define DRI_CONF_FORCE_GL_NAMES_REUSE(def) \ 234 DRI_CONF_OPT_B(force_gl_names_reuse, def, "Force GL names reuse") 235 236 #define DRI_CONF_TRANSCODE_ETC(def) \ 237 DRI_CONF_OPT_B(transcode_etc, def, "Transcode ETC formats to DXTC if unsupported") 238 239 #define DRI_CONF_TRANSCODE_ASTC(def) \ 240 DRI_CONF_OPT_B(transcode_astc, def, "Transcode ASTC formats to DXTC if unsupported") 241 242 #define DRI_CONF_GLX_EXTENSION_OVERRIDE() \ 243 DRI_CONF_OPT_S_NODEF(glx_extension_override, \ 244 "Allow enabling/disabling a list of GLX extensions") 245 246 #define DRI_CONF_INDIRECT_GL_EXTENSION_OVERRIDE() \ 247 DRI_CONF_OPT_S_NODEF(indirect_gl_extension_override, \ 248 "Allow enabling/disabling a list of indirect-GL extensions") 249 250 #define DRI_CONF_DISABLE_PROTECTED_CONTENT_CHECK(def) \ 251 DRI_CONF_OPT_B(disable_protected_content_check, def, \ 252 "Don't reject image import if protected_content attribute doesn't match") 253 254 #define DRI_CONF_IGNORE_MAP_UNSYNCHRONIZED(def) \ 255 DRI_CONF_OPT_B(ignore_map_unsynchronized, def, \ 256 "Ignore GL_MAP_UNSYNCHRONIZED_BIT, workaround for games that use it incorrectly") 257 258 /** 259 * \brief Image quality-related options 260 */ 261 #define DRI_CONF_SECTION_QUALITY DRI_CONF_SECTION("Image Quality") 262 263 #define DRI_CONF_PRECISE_TRIG(def) \ 264 DRI_CONF_OPT_B(precise_trig, def, \ 265 "Prefer accuracy over performance in trig functions") 266 267 #define DRI_CONF_PP_CELSHADE(def) \ 268 DRI_CONF_OPT_E(pp_celshade, def, 0, 1, \ 269 "A post-processing filter to cel-shade the output", \ 270 { 0 } ) 271 272 #define DRI_CONF_PP_NORED(def) \ 273 DRI_CONF_OPT_E(pp_nored, def, 0, 1, \ 274 "A post-processing filter to remove the red channel", \ 275 { 0 } ) 276 277 #define DRI_CONF_PP_NOGREEN(def) \ 278 DRI_CONF_OPT_E(pp_nogreen, def, 0, 1, \ 279 "A post-processing filter to remove the green channel", \ 280 { 0 } ) 281 282 #define DRI_CONF_PP_NOBLUE(def) \ 283 DRI_CONF_OPT_E(pp_noblue, def, 0, 1, \ 284 "A post-processing filter to remove the blue channel", \ 285 { 0 } ) 286 287 #define DRI_CONF_PP_JIMENEZMLAA(def,min,max) \ 288 DRI_CONF_OPT_I(pp_jimenezmlaa, def, min, max, \ 289 "Morphological anti-aliasing based on Jimenez' MLAA. 0 to disable, 8 for default quality") 290 291 #define DRI_CONF_PP_JIMENEZMLAA_COLOR(def,min,max) \ 292 DRI_CONF_OPT_I(pp_jimenezmlaa_color, def, min, max, \ 293 "Morphological anti-aliasing based on Jimenez' MLAA. 0 to disable, 8 for default quality. Color version, usable with 2d GL apps") 294 295 /** 296 * \brief Performance-related options 297 */ 298 #define DRI_CONF_SECTION_PERFORMANCE DRI_CONF_SECTION("Performance") 299 300 #define DRI_CONF_VBLANK_NEVER 0 301 #define DRI_CONF_VBLANK_DEF_INTERVAL_0 1 302 #define DRI_CONF_VBLANK_DEF_INTERVAL_1 2 303 #define DRI_CONF_VBLANK_ALWAYS_SYNC 3 304 #define DRI_CONF_VBLANK_MODE(def) \ 305 DRI_CONF_OPT_E(vblank_mode, def, 0, 3, \ 306 "Synchronization with vertical refresh (swap intervals)", \ 307 DRI_CONF_ENUM(0,"Never synchronize with vertical refresh, ignore application's choice") \ 308 DRI_CONF_ENUM(1,"Initial swap interval 0, obey application's choice") \ 309 DRI_CONF_ENUM(2,"Initial swap interval 1, obey application's choice") \ 310 DRI_CONF_ENUM(3,"Always synchronize with vertical refresh, application chooses the minimum swap interval")) 311 312 #define DRI_CONF_ADAPTIVE_SYNC(def) \ 313 DRI_CONF_OPT_B(adaptive_sync,def, \ 314 "Adapt the monitor sync to the application performance (when possible)") 315 316 #define DRI_CONF_VK_WSI_FORCE_BGRA8_UNORM_FIRST(def) \ 317 DRI_CONF_OPT_B(vk_wsi_force_bgra8_unorm_first, def, \ 318 "Force vkGetPhysicalDeviceSurfaceFormatsKHR to return VK_FORMAT_B8G8R8A8_UNORM as the first format") 319 320 #define DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(def) \ 321 DRI_CONF_OPT_I(vk_x11_override_min_image_count, def, 0, 999, \ 322 "Override the VkSurfaceCapabilitiesKHR::minImageCount (0 = no override)") 323 324 #define DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(def) \ 325 DRI_CONF_OPT_B(vk_x11_strict_image_count, def, \ 326 "Force the X11 WSI to create exactly the number of image specified by the application in VkSwapchainCreateInfoKHR::minImageCount") 327 328 #define DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(def) \ 329 DRI_CONF_OPT_B(vk_x11_ensure_min_image_count, def, \ 330 "Force the X11 WSI to create at least the number of image specified by the driver in VkSurfaceCapabilitiesKHR::minImageCount") 331 332 #define DRI_CONF_VK_XWAYLAND_WAIT_READY(def) \ 333 DRI_CONF_OPT_B(vk_xwayland_wait_ready, def, \ 334 "Wait for fences before submitting buffers to Xwayland") 335 336 #define DRI_CONF_MESA_GLTHREAD(def) \ 337 DRI_CONF_OPT_B(mesa_glthread, def, \ 338 "Enable offloading GL driver work to a separate thread") 339 340 #define DRI_CONF_MESA_NO_ERROR(def) \ 341 DRI_CONF_OPT_B(mesa_no_error, def, \ 342 "Disable GL driver error checking") 343 344 345 /** 346 * \brief Miscellaneous configuration options 347 */ 348 #define DRI_CONF_SECTION_MISCELLANEOUS DRI_CONF_SECTION("Miscellaneous") 349 350 #define DRI_CONF_ALWAYS_HAVE_DEPTH_BUFFER(def) \ 351 DRI_CONF_OPT_B(always_have_depth_buffer, def, \ 352 "Create all visuals with a depth buffer") 353 354 #define DRI_CONF_GLSL_ZERO_INIT(def) \ 355 DRI_CONF_OPT_B(glsl_zero_init, def, \ 356 "Force uninitialized variables to default to zero") 357 358 #define DRI_CONF_VS_POSITION_ALWAYS_INVARIANT(def) \ 359 DRI_CONF_OPT_B(vs_position_always_invariant, def, \ 360 "Force the vertex shader's gl_Position output to be considered 'invariant'") 361 362 #define DRI_CONF_VS_POSITION_ALWAYS_PRECISE(def) \ 363 DRI_CONF_OPT_B(vs_position_always_precise, def, \ 364 "Force the vertex shader's gl_Position output to be considered 'precise'") 365 366 #define DRI_CONF_ALLOW_RGB10_CONFIGS(def) \ 367 DRI_CONF_OPT_B(allow_rgb10_configs, def, \ 368 "Allow exposure of visuals and fbconfigs with rgb10a2 formats") 369 370 #define DRI_CONF_ALLOW_RGB565_CONFIGS(def) \ 371 DRI_CONF_OPT_B(allow_rgb565_configs, def, \ 372 "Allow exposure of visuals and fbconfigs with rgb565 formats") 373 374 #define DRI_CONF_FORCE_INTEGER_TEX_NEAREST(def) \ 375 DRI_CONF_OPT_B(force_integer_tex_nearest, def, \ 376 "Force integer textures to use nearest filtering") 377 378 /** 379 * \brief Initialization configuration options 380 */ 381 #define DRI_CONF_SECTION_INITIALIZATION DRI_CONF_SECTION("Initialization") 382 383 #define DRI_CONF_DEVICE_ID_PATH_TAG() \ 384 DRI_CONF_OPT_S_NODEF(device_id, "Define the graphic device to use if possible") 385 386 #define DRI_CONF_DRI_DRIVER() \ 387 DRI_CONF_OPT_S_NODEF(dri_driver, "Override the DRI driver to load") 388 389 /** 390 * \brief Gallium-Nine specific configuration options 391 */ 392 393 #define DRI_CONF_SECTION_NINE DRI_CONF_SECTION("Gallium Nine") 394 395 #define DRI_CONF_NINE_THROTTLE(def) \ 396 DRI_CONF_OPT_I(throttle_value, def, 0, 0, \ 397 "Define the throttling value. -1 for no throttling, -2 for default (usually 2), 0 for glfinish behaviour") 398 399 #define DRI_CONF_NINE_THREADSUBMIT(def) \ 400 DRI_CONF_OPT_B(thread_submit, def, \ 401 "Use an additional thread to submit buffers.") 402 403 #define DRI_CONF_NINE_OVERRIDEVENDOR(def) \ 404 DRI_CONF_OPT_I(override_vendorid, def, 0, 0, \ 405 "Define the vendor_id to report. This allows faking another hardware vendor.") 406 407 #define DRI_CONF_NINE_ALLOWDISCARDDELAYEDRELEASE(def) \ 408 DRI_CONF_OPT_B(discard_delayed_release, def, \ 409 "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).") 410 411 #define DRI_CONF_NINE_TEARFREEDISCARD(def) \ 412 DRI_CONF_OPT_B(tearfree_discard, def, \ 413 "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.") 414 415 #define DRI_CONF_NINE_CSMT(def) \ 416 DRI_CONF_OPT_I(csmt_force, def, 0, 0, \ 417 "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.") 418 419 #define DRI_CONF_NINE_DYNAMICTEXTUREWORKAROUND(def) \ 420 DRI_CONF_OPT_B(dynamic_texture_workaround, def, \ 421 "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.") 422 423 #define DRI_CONF_NINE_SHADERINLINECONSTANTS(def) \ 424 DRI_CONF_OPT_B(shader_inline_constants, def, \ 425 "If set to true, recompile shaders with integer or boolean constants when the values are known. Can cause stutter, but can increase slightly performance.") 426 427 #define DRI_CONF_NINE_SHMEM_LIMIT() \ 428 DRI_CONF_OPT_I(texture_memory_limit, 128, 0, 0, \ 429 "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.") 430 431 #define DRI_CONF_NINE_FORCESWRENDERINGONCPU(def) \ 432 DRI_CONF_OPT_B(force_sw_rendering_on_cpu, def, \ 433 "If set to false, emulates software rendering on the requested device, else uses a software renderer.") 434 435 /** 436 * \brief radeonsi specific configuration options 437 */ 438 439 #define DRI_CONF_RADEONSI_ASSUME_NO_Z_FIGHTS(def) \ 440 DRI_CONF_OPT_B(radeonsi_assume_no_z_fights, def, \ 441 "Assume no Z fights (enables aggressive out-of-order rasterization to improve performance; may cause rendering errors)") 442 443 #define DRI_CONF_RADEONSI_COMMUTATIVE_BLEND_ADD(def) \ 444 DRI_CONF_OPT_B(radeonsi_commutative_blend_add, def, \ 445 "Commutative additive blending optimizations (may cause rendering errors)") 446 447 #define DRI_CONF_RADEONSI_ZERO_ALL_VRAM_ALLOCS(def) \ 448 DRI_CONF_OPT_B(radeonsi_zerovram, def, \ 449 "Zero all vram allocations") 450 451 #define DRI_CONF_V3D_NONMSAA_TEXTURE_SIZE_LIMIT(def) \ 452 DRI_CONF_OPT_B(v3d_nonmsaa_texture_size_limit, def, \ 453 "Report the non-MSAA-only texture size limit") 454 455 /** 456 * \brief virgl specific configuration options 457 */ 458 459 #define DRI_CONF_GLES_EMULATE_BGRA(def) \ 460 DRI_CONF_OPT_B(gles_emulate_bgra, def, \ 461 "On GLES emulate BGRA formats by using a swizzled RGBA format") 462 463 #define DRI_CONF_GLES_APPLY_BGRA_DEST_SWIZZLE(def) \ 464 DRI_CONF_OPT_B(gles_apply_bgra_dest_swizzle, def, \ 465 "When the BGRA formats are emulated by using swizzled RGBA formats on GLES apply the swizzle when writing") 466 467 #define DRI_CONF_GLES_SAMPLES_PASSED_VALUE(def, minimum, maximum) \ 468 DRI_CONF_OPT_I(gles_samples_passed_value, def, minimum, maximum, \ 469 "GL_SAMPLES_PASSED value when emulated by GL_ANY_SAMPLES_PASSED") 470 471 /** 472 * \brief RADV specific configuration options 473 */ 474 475 #define DRI_CONF_RADV_REPORT_LLVM9_VERSION_STRING(def) \ 476 DRI_CONF_OPT_B(radv_report_llvm9_version_string, def, \ 477 "Report LLVM 9.0.1 for games that apply shader workarounds if missing (for ACO only)") 478 479 #define DRI_CONF_RADV_ENABLE_MRT_OUTPUT_NAN_FIXUP(def) \ 480 DRI_CONF_OPT_B(radv_enable_mrt_output_nan_fixup, def, \ 481 "Replace NaN outputs from fragment shaders with zeroes for floating point render target") 482 483 #define DRI_CONF_RADV_NO_DYNAMIC_BOUNDS(def) \ 484 DRI_CONF_OPT_B(radv_no_dynamic_bounds, def, \ 485 "Disabling bounds checking for dynamic buffer descriptors") 486 487 #define DRI_CONF_RADV_DISABLE_SHRINK_IMAGE_STORE(def) \ 488 DRI_CONF_OPT_B(radv_disable_shrink_image_store, def, \ 489 "Disabling shrinking of image stores based on the format") 490 491 #define DRI_CONF_RADV_ABSOLUTE_DEPTH_BIAS(def) \ 492 DRI_CONF_OPT_B(radv_absolute_depth_bias, def, \ 493 "Consider depthBiasConstantFactor an absolute depth bias (like D3D9)") 494 495 #define DRI_CONF_RADV_OVERRIDE_UNIFORM_OFFSET_ALIGNMENT(def) \ 496 DRI_CONF_OPT_I(radv_override_uniform_offset_alignment, def, 0, 128, \ 497 "Override the minUniformBufferOffsetAlignment exposed to the application. (0 = default)") 498 499 #define DRI_CONF_RADV_ZERO_VRAM(def) \ 500 DRI_CONF_OPT_B(radv_zero_vram, def, \ 501 "Initialize to zero all VRAM allocations") 502 503 #define DRI_CONF_RADV_LOWER_DISCARD_TO_DEMOTE(def) \ 504 DRI_CONF_OPT_B(radv_lower_discard_to_demote, def, \ 505 "Lower discard instructions to demote") 506 507 #define DRI_CONF_RADV_INVARIANT_GEOM(def) \ 508 DRI_CONF_OPT_B(radv_invariant_geom, def, \ 509 "Mark geometry-affecting outputs as invariant") 510 511 #define DRI_CONF_RADV_DISABLE_TC_COMPAT_HTILE_GENERAL(def) \ 512 DRI_CONF_OPT_B(radv_disable_tc_compat_htile_general, def, \ 513 "Disable TC-compat HTILE in GENERAL layout") 514 515 #define DRI_CONF_RADV_DISABLE_DCC(def) \ 516 DRI_CONF_OPT_B(radv_disable_dcc, def, \ 517 "Disable DCC for color images") 518 519 #define DRI_CONF_RADV_REPORT_APU_AS_DGPU(def) \ 520 DRI_CONF_OPT_B(radv_report_apu_as_dgpu, def, \ 521 "Report APUs as discrete GPUs instead of integrated GPUs") 522 523 #endif 524