driconf: Use DRI_CONF_OPT_I for remaining int options
authorEric Anholt <eric@anholt.net>
Tue, 29 Sep 2020 17:23:52 +0000 (10:23 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 2 Oct 2020 23:59:52 +0000 (23:59 +0000)
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 <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6916>

src/mesa/drivers/dri/i965/intel_screen.c
src/util/driconf.h

index c585fa0..8e91f53 100644 (file)
@@ -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
index 35d8fe1..9bdb289 100644 (file)
@@ -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, \