summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIván Briano <ivan.briano@intel.com>2023-05-08 14:22:15 -0700
committerMarge Bot <emma+marge@anholt.net>2023-05-10 01:23:16 +0000
commitc97b1eb08a971f72e8b1319c39379832616f9733 (patch)
treee4ea855ad9a4e3786fb04f5a4b53b9a98ae783ab
parente9f18f64b9ec56ed0e89a5baa41b4536585a8a90 (diff)
anv: put EXT_mesh_shader behind an environment variable
We are seeing frequent hangs in other workloads when something using mesh shaders runs at the same time, so gate the feature behind an environment variable until we figure out what's going on. v2: (Sagar) - Give the mesh enabled variable a more descriptive name Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22910>
-rw-r--r--src/intel/vulkan/anv_device.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 634914880e5c..8e3bf180f952 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -192,6 +192,12 @@ get_device_extensions(const struct anv_physical_device *device,
(device->sync_syncobj_type.features & VK_SYNC_FEATURE_CPU_WAIT) != 0;
const bool rt_enabled = ANV_SUPPORT_RT && device->info.has_ray_tracing;
+
+ /* We are seeing hangs on other workloads when something using mesh
+ * shaders runs at the same time, so it's disabled by default.
+ */
+ const bool mesh_shader_enabled = device->info.has_mesh_shading &&
+ debug_get_bool_option("ANV_MESH_SHADER", false);
const bool nv_mesh_shading_enabled =
debug_get_bool_option("ANV_EXPERIMENTAL_NV_MESH_SHADER", false);
@@ -326,7 +332,7 @@ get_device_extensions(const struct anv_physical_device *device,
.EXT_memory_budget = (!device->info.has_local_mem ||
device->vram_mappable.available > 0) &&
device->sys.available,
- .EXT_mesh_shader = device->info.has_mesh_shading,
+ .EXT_mesh_shader = mesh_shader_enabled,
.EXT_mutable_descriptor_type = true,
.EXT_non_seamless_cube_map = true,
.EXT_pci_bus_info = true,
@@ -372,7 +378,7 @@ get_device_extensions(const struct anv_physical_device *device,
.INTEL_shader_integer_functions2 = true,
.EXT_multi_draw = true,
.NV_compute_shader_derivatives = true,
- .NV_mesh_shader = device->info.has_mesh_shading &&
+ .NV_mesh_shader = mesh_shader_enabled &&
nv_mesh_shading_enabled,
.VALVE_mutable_descriptor_type = true,
};