radv: add few new drirc options
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 25 May 2021 12:09:15 +0000 (14:09 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 26 May 2021 18:48:04 +0000 (18:48 +0000)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10978>

src/amd/vulkan/radv_device.c
src/util/driconf.h

index 0f36f06..83a2e5d 100644 (file)
@@ -885,8 +885,20 @@ radv_handle_per_app_options(struct radv_instance *instance, const VkApplicationI
    instance->absolute_depth_bias =
       driQueryOptionb(&instance->dri_options, "radv_absolute_depth_bias");
 
+   instance->disable_tc_compat_htile_in_general =
+      driQueryOptionb(&instance->dri_options, "radv_disable_tc_compat_htile_general");
+
    if (driQueryOptionb(&instance->dri_options, "radv_no_dynamic_bounds"))
       instance->debug_flags |= RADV_DEBUG_NO_DYNAMIC_BOUNDS;
+
+   if (driQueryOptionb(&instance->dri_options, "radv_zero_vram"))
+      instance->debug_flags |= RADV_DEBUG_ZERO_VRAM;
+
+   if (driQueryOptionb(&instance->dri_options, "radv_lower_discard_to_demote"))
+      instance->debug_flags |= RADV_DEBUG_DISCARD_TO_DEMOTE;
+
+   if (driQueryOptionb(&instance->dri_options, "radv_invariant_geom"))
+      instance->debug_flags |= RADV_DEBUG_INVARIANT_GEOM;
 }
 
 // clang-format off
@@ -907,6 +919,10 @@ static const driOptionDescription radv_dri_options[] = {
    DRI_CONF_SECTION_DEBUG
       DRI_CONF_OVERRIDE_VRAM_SIZE()
       DRI_CONF_VK_WSI_FORCE_BGRA8_UNORM_FIRST(false)
+      DRI_CONF_RADV_ZERO_VRAM(false)
+      DRI_CONF_RADV_LOWER_DISCARD_TO_DEMOTE(false)
+      DRI_CONF_RADV_INVARIANT_GEOM(false)
+      DRI_CONF_RADV_DISABLE_TC_COMPAT_HTILE_GENERAL(false)
    DRI_CONF_SECTION_END
 };
 // clang-format on
index 66a6116..248ab2d 100644 (file)
    DRI_CONF_OPT_I(radv_override_uniform_offset_alignment, def, 0, 128, \
                   "Override the minUniformBufferOffsetAlignment exposed to the application. (0 = default)")
 
+#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")
+
+#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")
+
 #endif