diff --git a/src/intel/vulkan/anv_buffer.c b/src/intel/vulkan/anv_buffer.c index 89e14d947ef..e2a101be8cf 100644 --- a/src/intel/vulkan/anv_buffer.c +++ b/src/intel/vulkan/anv_buffer.c @@ -72,6 +72,9 @@ anv_get_buffer_memory_requirements(struct anv_device *device, else if (usage & (VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT | VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT)) memory_types = device->physical->memory.dynamic_visible_mem_types; + else if (device->physical->instance->enable_buffer_comp) + memory_types = device->physical->memory.default_buffer_mem_types | + device->physical->memory.compressed_mem_types; else memory_types = device->physical->memory.default_buffer_mem_types; diff --git a/src/intel/vulkan/anv_instance.c b/src/intel/vulkan/anv_instance.c index e63aa9e873f..99dcad7db19 100644 --- a/src/intel/vulkan/anv_instance.c +++ b/src/intel/vulkan/anv_instance.c @@ -17,7 +17,7 @@ static const driOptionDescription anv_dri_options[] = { DRI_CONF_ANV_ASSUME_FULL_SUBGROUPS(0) DRI_CONF_ANV_ASSUME_FULL_SUBGROUPS_WITH_BARRIER(false) DRI_CONF_ANV_DISABLE_FCV(false) - DRI_CONF_ANV_DISABLE_XE2_CCS(false) + DRI_CONF_ANV_ENABLE_BUFFER_COMP(false) DRI_CONF_ANV_EXTERNAL_MEMORY_IMPLICIT_SYNC(true) DRI_CONF_ANV_FORCE_GUC_LOW_LATENCY(false) DRI_CONF_ANV_SAMPLE_MASK_OUT_OPENGL_BEHAVIOUR(false) @@ -171,8 +171,8 @@ anv_init_dri_options(struct anv_instance *instance) instance->enable_tbimr = driQueryOptionb(&instance->dri_options, "intel_tbimr"); instance->disable_fcv = driQueryOptionb(&instance->dri_options, "anv_disable_fcv"); - instance->disable_xe2_ccs = - driQueryOptionb(&instance->dri_options, "anv_disable_xe2_ccs"); + instance->enable_buffer_comp = + driQueryOptionb(&instance->dri_options, "anv_enable_buffer_comp"); instance->external_memory_implicit_sync = driQueryOptionb(&instance->dri_options, "anv_external_memory_implicit_sync"); instance->compression_control_enabled = diff --git a/src/intel/vulkan/anv_physical_device.c b/src/intel/vulkan/anv_physical_device.c index fa2f7f78100..82a128fc587 100644 --- a/src/intel/vulkan/anv_physical_device.c +++ b/src/intel/vulkan/anv_physical_device.c @@ -2440,9 +2440,6 @@ anv_physical_device_try_create(struct vk_instance *vk_instance, goto fail_fd; } - if (devinfo.ver == 20 && instance->disable_xe2_ccs) - intel_debug |= DEBUG_NO_CCS; - /* Disable Wa_16013994831 on Gfx12.0 because we found other cases where we * need to always disable preemption : * - https://gitlab.freedesktop.org/mesa/mesa/-/issues/5963 diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index db68a67675c..5142443a186 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1137,7 +1137,10 @@ struct anv_physical_device { uint32_t dynamic_visible_mem_types; /** Mask of memory types of protected buffers/images */ uint32_t protected_mem_types; - /** Mask of memory types of compressed buffers/images */ + /** + * Mask of memory types of compressed buffers/images. This is generally + * a win for images, but a loss for buffers. + */ uint32_t compressed_mem_types; } memory; @@ -1304,7 +1307,7 @@ struct anv_instance { unsigned force_vk_vendor; bool has_fake_sparse; bool disable_fcv; - bool disable_xe2_ccs; + bool enable_buffer_comp; bool compression_control_enabled; bool anv_fake_nonlocal_memory; bool anv_upper_bound_descriptor_pool_sampler; diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf index 635b2193bc1..4a3daf49663 100644 --- a/src/util/00-mesa-defaults.conf +++ b/src/util/00-mesa-defaults.conf @@ -1201,6 +1201,10 @@ TODO: document the other workarounds. +