From 9fbf206a1371b86f6d70eef2bbc4540c6a46a68b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 29 Sep 2020 10:23:52 -0700 Subject: [PATCH] driconf: Use DRI_CONF_OPT_I for remaining int options Now that we have a single range in the option and start==end means "no range", we can switch over these non-ranged int options. This will ease later refactors. Reviewed-by: Eric Engestrom Part-of: --- src/mesa/drivers/dri/i965/intel_screen.c | 7 +++---- src/util/driconf.h | 15 ++++++--------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index c585fa0e871..8e91f5340d6 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -68,10 +68,9 @@ DRI_CONF_BEGIN DRI_CONF_SECTION_QUALITY DRI_CONF_PRECISE_TRIG("false") - DRI_CONF_OPT_BEGIN(clamp_max_samples, int, -1) - DRI_CONF_DESC("Clamp the value of GL_MAX_SAMPLES to the " - "given integer. If negative, then do not clamp.") - DRI_CONF_OPT_END + DRI_CONF_OPT_I(clamp_max_samples, -1, 0, 0, + "Clamp the value of GL_MAX_SAMPLES to the " + "given integer. If negative, then do not clamp.") DRI_CONF_SECTION_END DRI_CONF_SECTION_DEBUG diff --git a/src/util/driconf.h b/src/util/driconf.h index 35d8fe1fa48..9bdb2894ab8 100644 --- a/src/util/driconf.h +++ b/src/util/driconf.h @@ -398,18 +398,16 @@ DRI_CONF_SECTION_BEGIN \ DRI_CONF_DESC("Gallium Nine") #define DRI_CONF_NINE_THROTTLE(def) \ -DRI_CONF_OPT_BEGIN(throttle_value, int, def) \ - DRI_CONF_DESC("Define the throttling value. -1 for no throttling, -2 for default (usually 2), 0 for glfinish behaviour") \ -DRI_CONF_OPT_END + 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") #define DRI_CONF_NINE_THREADSUBMIT(def) \ DRI_CONF_OPT_B(thread_submit, def, \ "Use an additional thread to submit buffers.") #define DRI_CONF_NINE_OVERRIDEVENDOR(def) \ -DRI_CONF_OPT_BEGIN(override_vendorid, int, def) \ - DRI_CONF_DESC("Define the vendor_id to report. This allows faking another hardware vendor.") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_I(override_vendorid, def, 0, 0, \ + "Define the vendor_id to report. This allows faking another hardware vendor.") #define DRI_CONF_NINE_ALLOWDISCARDDELAYEDRELEASE(def) \ DRI_CONF_OPT_B(discard_delayed_release, def, \ @@ -420,9 +418,8 @@ DRI_CONF_OPT_END "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.") #define DRI_CONF_NINE_CSMT(def) \ -DRI_CONF_OPT_BEGIN(csmt_force, int, def) \ - DRI_CONF_DESC("If set to 1, force gallium nine CSMT. If set to 0, disable it. By default (-1) CSMT is enabled on known thread-safe drivers.") \ -DRI_CONF_OPT_END + DRI_CONF_OPT_I(csmt_int, def, 0, 0, \ + "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.") #define DRI_CONF_NINE_DYNAMICTEXTUREWORKAROUND(def) \ DRI_CONF_OPT_B(dynamic_texture_workaround, def, \