2003-10-21 07:05:39 +01:00
/*
* 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
2022-03-18 05:14:55 +00:00
* 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
2003-10-21 07:05:39 +01:00
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE .
2022-03-18 05:14:55 +00:00
*
2003-10-21 07:05:39 +01:00
*/
/**
2020-06-12 10:42:32 +01:00
* \ file driconf . h
2003-10-21 07:05:39 +01:00
* \ brief Pool of common options
* \ author Felix Kuehling
*
2005-04-11 22:41:40 +01:00
* This file defines macros that can be used to construct
2020-06-12 10:22:42 +01:00
* driConfigOptions in the drivers .
2003-10-21 07:05:39 +01:00
*/
2020-06-12 10:42:32 +01:00
# ifndef __DRICONF_H
# define __DRICONF_H
2003-10-21 07:05:39 +01:00
2020-09-25 20:56:22 +01:00
# include "xmlconfig.h"
2003-10-21 07:05:39 +01:00
/*
* generic macros
*/
2020-09-25 20:56:22 +01:00
/** \brief Names a section of related options to follow */
# define DRI_CONF_SECTION(text) { .desc = text, .info = { .type = DRI_SECTION } },
# define DRI_CONF_SECTION_END
2003-10-21 07:05:39 +01:00
/** \brief End an option description */
2020-09-25 20:56:22 +01:00
# define DRI_CONF_OPT_END },
2003-10-21 07:05:39 +01:00
2020-06-12 10:22:42 +01:00
/** \brief A verbal description (empty version) */
2020-09-25 20:56:22 +01:00
# define DRI_CONF_DESC(text) .desc = text,
2003-10-21 07:05:39 +01:00
/** \brief A verbal description of an enum value */
2020-09-25 20:56:22 +01:00
# define DRI_CONF_ENUM(_value,text) { .value = _value, .desc = text },
2003-10-21 07:05:39 +01:00
2020-09-25 20:56:22 +01:00
# define DRI_CONF_RANGE_I(min, max) \
. range = { \
. start = { . _int = min } , \
. end = { . _int = max } , \
} \
2020-09-16 20:44:14 +01:00
2020-09-25 20:56:22 +01:00
# define DRI_CONF_RANGE_F(min, max) \
. range = { \
. start = { . _float = min } , \
. end = { . _float = max } , \
} \
2020-09-16 20:44:14 +01:00
2020-09-25 23:06:11 +01:00
/**
* \ brief A boolean option definition , with the default value passed in as a
* string
*/
2020-09-25 20:56:22 +01:00
# define DRI_CONF_OPT_B(_name, def, _desc) { \
. desc = _desc , \
. info = { \
. name = # _name , \
. type = DRI_BOOL , \
} , \
2020-09-29 17:28:18 +01:00
. value = { . _bool = def } , \
2020-09-25 20:56:22 +01:00
} ,
# define DRI_CONF_OPT_I(_name, def, min, max, _desc) { \
. desc = _desc , \
. info = { \
. name = # _name , \
. type = DRI_INT , \
DRI_CONF_RANGE_I ( min , max ) , \
} , \
. value = { . _int = def } , \
} ,
# define DRI_CONF_OPT_F(_name, def, min, max, _desc) { \
. desc = _desc , \
. info = { \
. name = # _name , \
. type = DRI_FLOAT , \
DRI_CONF_RANGE_F ( min , max ) , \
} , \
. value = { . _float = def } , \
} ,
# define DRI_CONF_OPT_E(_name, def, min, max, _desc, values) { \
. desc = _desc , \
. info = { \
. name = # _name , \
. type = DRI_ENUM , \
DRI_CONF_RANGE_I ( min , max ) , \
} , \
. value = { . _int = def } , \
. enums = { values } , \
} ,
# define DRI_CONF_OPT_S(_name, def, _desc) { \
. desc = _desc , \
. info = { \
. name = # _name , \
. type = DRI_STRING , \
} , \
. value = { . _string = # def } , \
} ,
2005-04-11 22:41:40 +01:00
2021-04-10 20:24:05 +01:00
# define DRI_CONF_OPT_S_NODEF(_name, _desc) { \
. desc = _desc , \
. info = { \
. name = # _name , \
. type = DRI_STRING , \
} , \
. value = { . _string = " " } , \
} ,
2020-06-12 10:22:42 +01:00
/**
* \ brief Debugging options
*/
2020-09-25 20:56:22 +01:00
# define DRI_CONF_SECTION_DEBUG DRI_CONF_SECTION("Debugging")
2020-06-12 10:22:42 +01:00
# define DRI_CONF_ALWAYS_FLUSH_BATCH(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( always_flush_batch , def , \
" Enable flushing batchbuffer after each draw call " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_ALWAYS_FLUSH_CACHE(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( always_flush_cache , def , \
" Enable flushing GPU caches with each draw call " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_DISABLE_THROTTLING(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( disable_throttling , def , \
" Disable throttling on first batch after flush " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( force_glsl_extensions_warn , def , \
" Force GLSL extension default behavior to 'warn' " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( disable_blend_func_extended , def , \
" Disable dual source blending " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_DISABLE_ARB_GPU_SHADER5(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( disable_arb_gpu_shader5 , def , \
" Disable GL_ARB_gpu_shader5 " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( dual_color_blend_by_location , def , \
" Identify dual color blending sources by location rather than index " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( disable_glsl_line_continuations , def , \
" Disable backslash-based line continuations in GLSL source " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_FORCE_GLSL_VERSION(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_I ( force_glsl_version , def , 0 , 999 , \
" Force a default GLSL version for shaders that lack an explicit #version line " )
2020-06-12 10:22:42 +01:00
2020-10-29 03:19:01 +00:00
# define DRI_CONF_ALLOW_EXTRA_PP_TOKENS(def) \
DRI_CONF_OPT_B ( allow_extra_pp_tokens , def , \
" Allow extra tokens at end of preprocessor directives. " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( allow_glsl_extension_directive_midshader , def , \
" Allow GLSL #extension directives in the middle of shaders " )
2020-06-12 10:22:42 +01:00
2020-06-13 22:18:34 +01:00
# define DRI_CONF_ALLOW_GLSL_120_SUBSET_IN_110(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( allow_glsl_120_subset_in_110 , def , \
" Allow a subset of GLSL 1.20 in GLSL 1.10 as needed by SPECviewperf13 " )
2020-06-13 22:18:34 +01:00
2020-06-12 10:22:42 +01:00
# define DRI_CONF_ALLOW_GLSL_BUILTIN_CONST_EXPRESSION(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( allow_glsl_builtin_const_expression , def , \
" Allow builtins as part of constant expressions " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_ALLOW_GLSL_RELAXED_ES(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( allow_glsl_relaxed_es , def , \
" Allow some relaxation of GLSL ES shader restrictions " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_ALLOW_GLSL_BUILTIN_VARIABLE_REDECLARATION(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( allow_glsl_builtin_variable_redeclaration , def , \
" Allow GLSL built-in variables to be redeclared verbatim " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( allow_higher_compat_version , def , \
" Allow a higher compat profile (version 3.1+) for apps that request it " )
2020-06-12 10:22:42 +01:00
2021-11-19 04:14:01 +00:00
# define DRI_CONF_ALLOW_GLSL_COMPAT_SHADERS(def) \
DRI_CONF_OPT_B ( allow_glsl_compat_shaders , def , \
" Allow in GLSL: #version xxx compatibility " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_FORCE_GLSL_ABS_SQRT(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( force_glsl_abs_sqrt , def , \
" Force computing the absolute value for sqrt() and inversesqrt() " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_GLSL_CORRECT_DERIVATIVES_AFTER_DISCARD(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( glsl_correct_derivatives_after_discard , def , \
" Implicit and explicit derivatives after a discard behave as if the discard didn't happen " )
2020-06-12 10:22:42 +01:00
2021-06-25 12:29:31 +01:00
# define DRI_CONF_GLSL_IGNORE_WRITE_TO_READONLY_VAR(def) \
DRI_CONF_OPT_B ( glsl_ignore_write_to_readonly_var , def , \
" Forces the GLSL compiler to ignore writes to readonly vars rather than throwing an error " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_ALLOW_GLSL_CROSS_STAGE_INTERPOLATION_MISMATCH(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( allow_glsl_cross_stage_interpolation_mismatch , def , \
" Allow interpolation qualifier mismatch across shader stages " )
2020-06-12 10:22:42 +01:00
2021-09-16 12:11:30 +01:00
# define DRI_CONF_DO_DCE_BEFORE_CLIP_CULL_ANALYSIS(def) \
DRI_CONF_OPT_B ( do_dce_before_clip_cull_analysis , def , \
" Use dead code elimitation before checking for invalid Clip*/CullDistance variables usage. " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_ALLOW_DRAW_OUT_OF_ORDER(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( allow_draw_out_of_order , def , \
" Allow out-of-order draw optimizations. Set when Z fighting doesn't have to be accurate. " )
2020-06-12 10:22:42 +01:00
2021-10-18 13:16:23 +01:00
# define DRI_CONF_GLTHREAD_NOP_CHECK_FRAMEBUFFER_STATUS(def) \
DRI_CONF_OPT_B ( glthread_nop_check_framebuffer_status , def , \
" glthread always returns GL_FRAMEBUFFER_COMPLETE to prevent synchronization. " )
2021-04-10 20:24:05 +01:00
# define DRI_CONF_FORCE_GL_VENDOR() \
DRI_CONF_OPT_S_NODEF ( force_gl_vendor , " Override GPU vendor string. " )
2020-06-12 10:22:42 +01:00
2021-07-29 02:41:01 +01:00
# define DRI_CONF_FORCE_GL_RENDERER() \
DRI_CONF_OPT_S_NODEF ( force_gl_renderer , " Override GPU renderer string. " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_FORCE_COMPAT_PROFILE(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( force_compat_profile , def , \
" Force an OpenGL compatibility context " )
2020-06-12 10:22:42 +01:00
2021-12-03 09:53:46 +00:00
# define DRI_CONF_FORCE_COMPAT_SHADERS(def) \
DRI_CONF_OPT_B ( force_compat_shaders , def , \
" Force OpenGL compatibility shaders " )
2021-10-07 11:14:44 +01:00
# define DRI_CONF_FORCE_DIRECT_GLX_CONTEXT(def) \
DRI_CONF_OPT_B ( force_direct_glx_context , def , \
" Force direct GLX context (even if indirect is requested) " )
2021-10-31 05:02:02 +00:00
# define DRI_CONF_ALLOW_INVALID_GLX_DESTROY_WINDOW(def) \
DRI_CONF_OPT_B ( allow_invalid_glx_destroy_window , def , \
" Allow passing an invalid window into glXDestroyWindow " )
2022-02-07 09:54:57 +00:00
# define DRI_CONF_KEEP_NATIVE_WINDOW_GLX_DRAWABLE(def) \
DRI_CONF_OPT_B ( keep_native_window_glx_drawable , def , \
" Keep GLX drawable created from native window when switch context " )
2020-09-08 01:02:09 +01:00
# define DRI_CONF_OVERRIDE_VRAM_SIZE() \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_I ( override_vram_size , - 1 , - 1 , 2147483647 , \
" Override the VRAM size advertised to the application in MiB (-1 = default) " )
2020-09-08 01:02:09 +01:00
2020-08-17 15:20:17 +01:00
# define DRI_CONF_FORCE_GL_NAMES_REUSE(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( force_gl_names_reuse , def , " Force GL names reuse " )
2020-08-17 15:20:17 +01:00
2022-06-23 02:27:32 +01:00
# define DRI_CONF_FORCE_GL_MAP_BUFFER_SYNCHRONIZED(def) \
DRI_CONF_OPT_B ( force_gl_map_buffer_synchronized , def , " Override GL_MAP_UNSYNCHRONIZED_BIT. " )
2021-02-24 18:11:07 +00:00
# define DRI_CONF_TRANSCODE_ETC(def) \
DRI_CONF_OPT_B ( transcode_etc , def , " Transcode ETC formats to DXTC if unsupported " )
2021-04-27 00:01:16 +01:00
# define DRI_CONF_TRANSCODE_ASTC(def) \
DRI_CONF_OPT_B ( transcode_astc , def , " Transcode ASTC formats to DXTC if unsupported " )
2021-10-12 10:53:28 +01:00
# define DRI_CONF_MESA_EXTENSION_OVERRIDE() \
DRI_CONF_OPT_S_NODEF ( mesa_extension_override , \
" Allow enabling/disabling a list of extensions " )
2021-04-10 20:24:05 +01:00
# define DRI_CONF_GLX_EXTENSION_OVERRIDE() \
DRI_CONF_OPT_S_NODEF ( glx_extension_override , \
2020-10-15 16:29:45 +01:00
" Allow enabling/disabling a list of GLX extensions " )
2021-04-10 20:24:05 +01:00
# define DRI_CONF_INDIRECT_GL_EXTENSION_OVERRIDE() \
DRI_CONF_OPT_S_NODEF ( indirect_gl_extension_override , \
2020-10-20 14:20:20 +01:00
" Allow enabling/disabling a list of indirect-GL extensions " )
2020-10-15 16:29:45 +01:00
2020-10-06 15:00:55 +01:00
# define DRI_CONF_DISABLE_PROTECTED_CONTENT_CHECK(def) \
DRI_CONF_OPT_B ( disable_protected_content_check , def , \
" Don't reject image import if protected_content attribute doesn't match " )
2020-10-15 16:29:45 +01:00
2021-02-21 18:36:50 +00:00
# define DRI_CONF_IGNORE_MAP_UNSYNCHRONIZED(def) \
DRI_CONF_OPT_B ( ignore_map_unsynchronized , def , \
" Ignore GL_MAP_UNSYNCHRONIZED_BIT, workaround for games that use it incorrectly " )
2021-10-18 11:45:52 +01:00
# define DRI_CONF_VK_DONT_CARE_AS_LOAD(def) \
DRI_CONF_OPT_B ( vk_dont_care_as_load , def , \
" Treat VK_ATTACHMENT_LOAD_OP_DONT_CARE as LOAD_OP_LOAD, workaround on tiler GPUs for games that confuse these two load ops " )
2022-05-06 16:52:47 +01:00
# define DRI_CONF_LIMIT_TRIG_INPUT_RANGE(def) \
DRI_CONF_OPT_B ( limit_trig_input_range , def , \
" Limit trig input range to [-2p : 2p] to improve sin/cos calculation precision on Intel " )
2020-06-12 10:22:42 +01:00
/**
* \ brief Image quality - related options
*/
2020-09-25 20:56:22 +01:00
# define DRI_CONF_SECTION_QUALITY DRI_CONF_SECTION("Image Quality")
2020-06-12 10:22:42 +01:00
# define DRI_CONF_PRECISE_TRIG(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( precise_trig , def , \
" Prefer accuracy over performance in trig functions " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_PP_CELSHADE(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_E ( pp_celshade , def , 0 , 1 , \
" A post-processing filter to cel-shade the output " , \
2020-11-19 02:16:10 +00:00
{ 0 } )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_PP_NORED(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_E ( pp_nored , def , 0 , 1 , \
" A post-processing filter to remove the red channel " , \
2020-11-19 02:16:10 +00:00
{ 0 } )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_PP_NOGREEN(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_E ( pp_nogreen , def , 0 , 1 , \
" A post-processing filter to remove the green channel " , \
2020-11-19 02:16:10 +00:00
{ 0 } )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_PP_NOBLUE(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_E ( pp_noblue , def , 0 , 1 , \
" A post-processing filter to remove the blue channel " , \
2020-11-19 02:16:10 +00:00
{ 0 } )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_PP_JIMENEZMLAA(def,min,max) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_I ( pp_jimenezmlaa , def , min , max , \
2020-09-28 23:44:21 +01:00
" Morphological anti-aliasing based on Jimenez' MLAA. 0 to disable, 8 for default quality " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_PP_JIMENEZMLAA_COLOR(def,min,max) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_I ( pp_jimenezmlaa_color , def , min , max , \
2020-09-28 23:44:21 +01:00
" Morphological anti-aliasing based on Jimenez' MLAA. 0 to disable, 8 for default quality. Color version, usable with 2d GL apps " )
2020-06-12 10:22:42 +01:00
/**
* \ brief Performance - related options
*/
2020-09-25 20:56:22 +01:00
# define DRI_CONF_SECTION_PERFORMANCE DRI_CONF_SECTION("Performance")
2020-06-12 10:22:42 +01:00
# 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) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_E ( vblank_mode , def , 0 , 3 , \
" Synchronization with vertical refresh (swap intervals) " , \
DRI_CONF_ENUM ( 0 , " Never synchronize with vertical refresh, ignore application's choice " ) \
DRI_CONF_ENUM ( 1 , " Initial swap interval 0, obey application's choice " ) \
DRI_CONF_ENUM ( 2 , " Initial swap interval 1, obey application's choice " ) \
DRI_CONF_ENUM ( 3 , " Always synchronize with vertical refresh, application chooses the minimum swap interval " ) )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_ADAPTIVE_SYNC(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( adaptive_sync , def , \
" Adapt the monitor sync to the application performance (when possible) " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_VK_WSI_FORCE_BGRA8_UNORM_FIRST(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( vk_wsi_force_bgra8_unorm_first , def , \
" Force vkGetPhysicalDeviceSurfaceFormatsKHR to return VK_FORMAT_B8G8R8A8_UNORM as the first format " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_I ( vk_x11_override_min_image_count , def , 0 , 999 , \
" Override the VkSurfaceCapabilitiesKHR::minImageCount (0 = no override) " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( vk_x11_strict_image_count , def , \
" Force the X11 WSI to create exactly the number of image specified by the application in VkSwapchainCreateInfoKHR::minImageCount " )
2020-06-12 10:22:42 +01:00
2020-07-01 07:06:09 +01:00
# define DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( vk_x11_ensure_min_image_count , def , \
" Force the X11 WSI to create at least the number of image specified by the driver in VkSurfaceCapabilitiesKHR::minImageCount " )
2020-07-01 07:06:09 +01:00
2021-09-07 14:06:46 +01:00
# define DRI_CONF_VK_XWAYLAND_WAIT_READY(def) \
DRI_CONF_OPT_B ( vk_xwayland_wait_ready , def , \
" Wait for fences before submitting buffers to Xwayland " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_MESA_GLTHREAD(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( mesa_glthread , def , \
" Enable offloading GL driver work to a separate thread " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_MESA_NO_ERROR(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( mesa_no_error , def , \
" Disable GL driver error checking " )
2020-06-12 10:22:42 +01:00
/**
* \ brief Miscellaneous configuration options
*/
2020-09-25 20:56:22 +01:00
# define DRI_CONF_SECTION_MISCELLANEOUS DRI_CONF_SECTION("Miscellaneous")
2020-06-12 10:22:42 +01:00
# define DRI_CONF_ALWAYS_HAVE_DEPTH_BUFFER(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( always_have_depth_buffer , def , \
" Create all visuals with a depth buffer " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_GLSL_ZERO_INIT(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( glsl_zero_init , def , \
" Force uninitialized variables to default to zero " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_VS_POSITION_ALWAYS_INVARIANT(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( vs_position_always_invariant , def , \
" Force the vertex shader's gl_Position output to be considered 'invariant' " )
2020-06-12 10:22:42 +01:00
2021-09-24 09:46:10 +01:00
# define DRI_CONF_VS_POSITION_ALWAYS_PRECISE(def) \
DRI_CONF_OPT_B ( vs_position_always_precise , def , \
" Force the vertex shader's gl_Position output to be considered 'precise' " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_ALLOW_RGB10_CONFIGS(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( allow_rgb10_configs , def , \
" Allow exposure of visuals and fbconfigs with rgb10a2 formats " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_ALLOW_RGB565_CONFIGS(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( allow_rgb565_configs , def , \
" Allow exposure of visuals and fbconfigs with rgb565 formats " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_FORCE_INTEGER_TEX_NEAREST(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( force_integer_tex_nearest , def , \
" Force integer textures to use nearest filtering " )
2020-06-12 10:22:42 +01:00
/**
* \ brief Initialization configuration options
*/
2020-09-25 20:56:22 +01:00
# define DRI_CONF_SECTION_INITIALIZATION DRI_CONF_SECTION("Initialization")
2020-06-12 10:22:42 +01:00
2021-04-10 20:24:05 +01:00
# define DRI_CONF_DEVICE_ID_PATH_TAG() \
DRI_CONF_OPT_S_NODEF ( device_id , " Define the graphic device to use if possible " )
2020-06-12 10:22:42 +01:00
2021-04-10 20:24:05 +01:00
# define DRI_CONF_DRI_DRIVER() \
DRI_CONF_OPT_S_NODEF ( dri_driver , " Override the DRI driver to load " )
2020-06-12 10:22:42 +01:00
/**
* \ brief Gallium - Nine specific configuration options
*/
2020-09-25 20:56:22 +01:00
# define DRI_CONF_SECTION_NINE DRI_CONF_SECTION("Gallium Nine")
2020-06-12 10:22:42 +01:00
# define DRI_CONF_NINE_THROTTLE(def) \
2020-09-29 18:23:52 +01:00
DRI_CONF_OPT_I ( throttle_value , def , 0 , 0 , \
" Define the throttling value. -1 for no throttling, -2 for default (usually 2), 0 for glfinish behaviour " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_NINE_THREADSUBMIT(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( thread_submit , def , \
" Use an additional thread to submit buffers. " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_NINE_OVERRIDEVENDOR(def) \
2020-09-29 18:23:52 +01:00
DRI_CONF_OPT_I ( override_vendorid , def , 0 , 0 , \
" Define the vendor_id to report. This allows faking another hardware vendor. " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_NINE_ALLOWDISCARDDELAYEDRELEASE(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( discard_delayed_release , def , \
" Whether to allow the display server to release buffers with a delay when using d3d's presentation mode DISCARD. Default to true. Set to false if suffering from lag (thread_submit=true can also help in this situation). " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_NINE_TEARFREEDISCARD(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( tearfree_discard , def , \
2021-04-10 22:53:07 +01:00
" 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. " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_NINE_CSMT(def) \
2021-02-07 19:01:57 +00:00
DRI_CONF_OPT_I ( csmt_force , def , 0 , 0 , \
2020-09-29 18:23:52 +01:00
" 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. " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_NINE_DYNAMICTEXTUREWORKAROUND(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( dynamic_texture_workaround , def , \
" If set to true, use a ram intermediate buffer for dynamic textures. Increases ram usage, which can cause out of memory issues, but can fix glitches for some games. " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_NINE_SHADERINLINECONSTANTS(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( shader_inline_constants , def , \
" If set to true, recompile shaders with integer or boolean constants when the values are known. Can cause stutter, but can increase slightly performance. " )
2020-06-12 10:22:42 +01:00
2021-02-06 22:30:56 +00:00
# define DRI_CONF_NINE_SHMEM_LIMIT() \
2021-04-10 22:01:16 +01:00
DRI_CONF_OPT_I ( texture_memory_limit , 128 , 0 , 0 , \
" 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. " )
2021-02-06 22:30:56 +00:00
2021-04-10 21:52:47 +01:00
# define DRI_CONF_NINE_FORCESWRENDERINGONCPU(def) \
DRI_CONF_OPT_B ( force_sw_rendering_on_cpu , def , \
" If set to false, emulates software rendering on the requested device, else uses a software renderer. " )
2020-06-12 10:22:42 +01:00
/**
* \ brief radeonsi specific configuration options
*/
# define DRI_CONF_RADEONSI_ZERO_ALL_VRAM_ALLOCS(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( radeonsi_zerovram , def , \
" Zero all vram allocations " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_V3D_NONMSAA_TEXTURE_SIZE_LIMIT(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( v3d_nonmsaa_texture_size_limit , def , \
" Report the non-MSAA-only texture size limit " )
2020-06-12 10:22:42 +01:00
/**
* \ brief virgl specific configuration options
*/
# define DRI_CONF_GLES_EMULATE_BGRA(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( gles_emulate_bgra , def , \
" On GLES emulate BGRA formats by using a swizzled RGBA format " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_GLES_APPLY_BGRA_DEST_SWIZZLE(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( gles_apply_bgra_dest_swizzle , def , \
" When the BGRA formats are emulated by using swizzled RGBA formats on GLES apply the swizzle when writing " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_GLES_SAMPLES_PASSED_VALUE(def, minimum, maximum) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_I ( gles_samples_passed_value , def , minimum , maximum , \
" GL_SAMPLES_PASSED value when emulated by GL_ANY_SAMPLES_PASSED " )
2020-06-12 10:22:42 +01:00
2021-10-27 11:12:30 +01:00
# define DRI_CONF_FORMAT_L8_SRGB_ENABLE_READBACK(def) \
DRI_CONF_OPT_B ( format_l8_srgb_enable_readback , def , \
" Force-enable reading back L8_SRGB textures " )
2022-05-27 02:22:16 +01:00
/**
* \ brief venus specific configuration options
*/
# define DRI_CONF_VENUS_IMPLICIT_FENCING(def) \
DRI_CONF_OPT_B ( venus_implicit_fencing , def , \
" Assume the virtio-gpu kernel driver supports implicit fencing " )
2020-06-12 10:22:42 +01:00
/**
* \ brief RADV specific configuration options
2003-10-21 07:05:39 +01:00
*/
2020-06-12 10:22:42 +01:00
# define DRI_CONF_RADV_REPORT_LLVM9_VERSION_STRING(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( radv_report_llvm9_version_string , def , \
" Report LLVM 9.0.1 for games that apply shader workarounds if missing (for ACO only) " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_RADV_ENABLE_MRT_OUTPUT_NAN_FIXUP(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( radv_enable_mrt_output_nan_fixup , def , \
" Replace NaN outputs from fragment shaders with zeroes for floating point render target " )
2020-06-12 10:22:42 +01:00
# define DRI_CONF_RADV_NO_DYNAMIC_BOUNDS(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_B ( radv_no_dynamic_bounds , def , \
" Disabling bounds checking for dynamic buffer descriptors " )
2005-02-26 05:24:04 +00:00
2021-02-23 19:33:02 +00:00
# define DRI_CONF_RADV_DISABLE_SHRINK_IMAGE_STORE(def) \
DRI_CONF_OPT_B ( radv_disable_shrink_image_store , def , \
" Disabling shrinking of image stores based on the format " )
2021-05-24 16:23:59 +01:00
# define DRI_CONF_RADV_ABSOLUTE_DEPTH_BIAS(def) \
DRI_CONF_OPT_B ( radv_absolute_depth_bias , def , \
" Consider depthBiasConstantFactor an absolute depth bias (like D3D9) " )
2020-07-30 01:49:33 +01:00
# define DRI_CONF_RADV_OVERRIDE_UNIFORM_OFFSET_ALIGNMENT(def) \
2020-09-16 20:44:14 +01:00
DRI_CONF_OPT_I ( radv_override_uniform_offset_alignment , def , 0 , 128 , \
" Override the minUniformBufferOffsetAlignment exposed to the application. (0 = default) " )
2021-05-25 13:09:15 +01:00
# define DRI_CONF_RADV_ZERO_VRAM(def) \
DRI_CONF_OPT_B ( radv_zero_vram , def , \
" Initialize to zero all VRAM allocations " )
# define DRI_CONF_RADV_LOWER_DISCARD_TO_DEMOTE(def) \
DRI_CONF_OPT_B ( radv_lower_discard_to_demote , def , \
" Lower discard instructions to demote " )
# define DRI_CONF_RADV_INVARIANT_GEOM(def) \
DRI_CONF_OPT_B ( radv_invariant_geom , def , \
" Mark geometry-affecting outputs as invariant " )
2022-01-07 14:27:29 +00:00
# define DRI_CONF_RADV_SPLIT_FMA(def) \
DRI_CONF_OPT_B ( radv_split_fma , def , \
" Split application-provided fused multiply-add in geometry stages " )
2021-05-25 13:09:15 +01:00
# define DRI_CONF_RADV_DISABLE_TC_COMPAT_HTILE_GENERAL(def) \
DRI_CONF_OPT_B ( radv_disable_tc_compat_htile_general , def , \
" Disable TC-compat HTILE in GENERAL layout " )
2021-06-30 16:32:25 +01:00
# define DRI_CONF_RADV_DISABLE_DCC(def) \
DRI_CONF_OPT_B ( radv_disable_dcc , def , \
" Disable DCC for color images " )
2021-12-06 02:39:01 +00:00
# define DRI_CONF_RADV_REQUIRE_ETC2(def) \
DRI_CONF_OPT_B ( radv_require_etc2 , def , \
" Implement emulated ETC2 on HW that does not support it " )
2021-12-27 13:18:59 +00:00
# define DRI_CONF_RADV_DISABLE_ANISO_SINGLE_LEVEL(def) \
DRI_CONF_OPT_B ( radv_disable_aniso_single_level , def , \
" Disable anisotropic filtering for single level images " )
2022-04-26 13:20:56 +01:00
# define DRI_CONF_RADV_DISABLE_SINKING_LOAD_INPUT_FS(def) \
DRI_CONF_OPT_B ( radv_disable_sinking_load_input_fs , def , \
" Disable sinking load inputs for fragment shaders " )
2022-01-07 11:02:11 +00:00
# define DRI_CONF_RADV_DGC(def) \
DRI_CONF_OPT_B ( radv_dgc , def , \
" Expose an experimental implementation of VK_NV_device_generated_commands " )
2022-03-31 14:44:15 +01:00
/**
* \ brief ANV specific configuration options
*/
# define DRI_CONF_ANV_ASSUME_FULL_SUBGROUPS(def) \
DRI_CONF_OPT_B ( anv_assume_full_subgroups , def , \
" Allow assuming full subgroups requirement even when it's not specified explicitly " )
2022-05-17 07:36:26 +01:00
# define DRI_CONF_ANV_SAMPLE_MASK_OUT_OPENGL_BEHAVIOUR(def) \
DRI_CONF_OPT_B ( anv_sample_mask_out_opengl_behaviour , def , \
" Ignore sample mask out when having single sampled target " )
2003-10-21 07:05:39 +01:00
# endif