diff --git a/src/intel/vulkan/anv_instance.c b/src/intel/vulkan/anv_instance.c
index df07fe4c854..8e59eb379aa 100644
--- a/src/intel/vulkan/anv_instance.c
+++ b/src/intel/vulkan/anv_instance.c
@@ -86,6 +86,7 @@ static const driOptionDescription anv_dri_options[] = {
DRI_CONF_ENUM(2048, "2048 clocks")
DRI_CONF_ENUM(4096, "4096 clocks"))
DRI_CONF_ANV_UPPER_BOUND_DESCRIPTOR_POOL_SAMPLER(false)
+ DRI_CONF_ANV_ENABLE_FULLY_COVERED(false)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG
@@ -295,6 +296,8 @@ anv_init_dri_options(struct anv_instance *instance)
driQueryOptionb(&instance->dri_options, "anv_barrier_post_untyped_clear_shader");
instance->disable_push_constant_alloc =
driQueryOptionb(&instance->dri_options, "intel_disable_push_constant_alloc");
+ instance->enable_fully_covered =
+ driQueryOptionb(&instance->dri_options, "anv_enable_fully_covered");
if (instance->vk.app_info.engine_name &&
!strcmp(instance->vk.app_info.engine_name, "DXVK")) {
diff --git a/src/intel/vulkan/anv_physical_device.c b/src/intel/vulkan/anv_physical_device.c
index d03358414ff..45e053f110a 100644
--- a/src/intel/vulkan/anv_physical_device.c
+++ b/src/intel/vulkan/anv_physical_device.c
@@ -1701,8 +1701,15 @@ get_properties(const struct anv_physical_device *pdevice,
props->conservativePointAndLineRasterization = false;
props->degenerateTrianglesRasterized = true;
props->degenerateLinesRasterized = false;
- props->fullyCoveredFragmentShaderInputVariable = false;
- props->conservativeRasterizationPostDepthCoverage = true;
+
+ bool fully_covered = pdevice->instance->enable_fully_covered &&
+ pdevice->info.verx10 >= 125;
+
+ props->fullyCoveredFragmentShaderInputVariable = fully_covered;
+ /* InnerCoverage, used to implement fully covered, is mutually exclusive
+ * with PostDepthCoverage.
+ */
+ props->conservativeRasterizationPostDepthCoverage = !fully_covered;
}
/* VK_EXT_custom_border_color */
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index cd712813ee0..68a90d43c95 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -1774,6 +1774,7 @@ struct anv_instance {
bool force_guc_low_latency;
bool emulate_read_without_format;
bool promote_cbv_to_push_buffers;
+ bool enable_fully_covered;
/**
* Workarounds for game bugs.
diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf
index 614968d57b1..c5eca519f84 100644
--- a/src/util/00-mesa-defaults.conf
+++ b/src/util/00-mesa-defaults.conf
@@ -1191,6 +1191,7 @@ TODO: document the other workarounds.
+
diff --git a/src/util/driconf.h b/src/util/driconf.h
index a353839c31c..ca447061760 100644
--- a/src/util/driconf.h
+++ b/src/util/driconf.h
@@ -975,6 +975,10 @@
DRI_CONF_OPT_B(anv_enable_scratch_page, def, \
"Disables surface padding and suppresses all page faults, drops writes and returns zeros on reads.")
+#define DRI_CONF_ANV_ENABLE_FULLY_COVERED(def) \
+ DRI_CONF_OPT_B(anv_enable_fully_covered, def, \
+ "Enable fullyCoveredFragmentShaderInputVariable (Alchemist and newer only).")
+
/**
* \brief HASVK specific configuration options
*/