diff --git a/docs/envvars.rst b/docs/envvars.rst index 98913f83396..a670a1abe8a 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -936,6 +936,8 @@ Anvil(ANV) driver environment variables Forces all descriptor sets to use the internal :ref:`Bindless model` ``desc-dirty`` Print out what dirties descriptors + ``experimental`` + Enable experimental features ``no-gpl`` Disables `VK_KHR_graphics_pipeline_library` support ``no-secondary-call`` diff --git a/src/intel/vulkan/anv_instance.c b/src/intel/vulkan/anv_instance.c index 719e7b9f587..ead9b4247d9 100644 --- a/src/intel/vulkan/anv_instance.c +++ b/src/intel/vulkan/anv_instance.c @@ -119,6 +119,7 @@ static const driOptionDescription anv_dri_options[] = { static const struct debug_control debug_control[] = { { "bindless", ANV_DEBUG_BINDLESS}, { "desc-dirty", ANV_DEBUG_DESCRIPTOR_DIRTY}, + { "experimental", ANV_DEBUG_EXPERIMENTAL}, { "no-gpl", ANV_DEBUG_NO_GPL}, { "no-slab", ANV_DEBUG_NO_SLAB}, { "no-sparse", ANV_DEBUG_NO_SPARSE}, diff --git a/src/intel/vulkan/anv_physical_device.c b/src/intel/vulkan/anv_physical_device.c index 2e6d68e9661..adff0dd0c2e 100644 --- a/src/intel/vulkan/anv_physical_device.c +++ b/src/intel/vulkan/anv_physical_device.c @@ -291,6 +291,7 @@ get_device_extensions(const struct anv_physical_device *device, .EXT_depth_clip_enable = true, .EXT_depth_range_unrestricted = device->info.ver >= 20, .EXT_descriptor_buffer = true, + .EXT_descriptor_heap = ANV_DEBUG(EXPERIMENTAL), .EXT_descriptor_indexing = true, .EXT_device_address_binding_report = true, .EXT_device_memory_report = true, @@ -1027,6 +1028,10 @@ get_features(const struct anv_physical_device *pdevice, /* VK_KHR_shader_constant_data */ .shaderConstantData = true, + + /* VK_EXT_descriptor_heap */ + .descriptorHeap = true, + .descriptorHeapCaptureReplay = true, }; /* The new DOOM and Wolfenstein games require depthBounds without @@ -1747,6 +1752,30 @@ get_properties(const struct anv_physical_device *pdevice, props->samplerDescriptorBufferAddressSpaceSize = pdevice->va.dynamic_visible_pool.size; } + /* VK_EXT_descriptor_heap */ + { + props->samplerHeapAlignment = 64; + props->resourceHeapAlignment = 64; + props->maxSamplerHeapSize = pdevice->va.dynamic_visible_pool.size; + props->maxResourceHeapSize = anv_physical_device_bindless_heap_size(pdevice, + true); + props->minSamplerHeapReservedRange = 0; + props->minSamplerHeapReservedRangeWithEmbedded = 0; + props->minResourceHeapReservedRange = 0; + props->samplerDescriptorSize = ANV_SAMPLER_STATE_SIZE; + props->imageDescriptorSize = ANV_SURFACE_STATE_SIZE; + props->bufferDescriptorSize = ANV_SURFACE_STATE_SIZE; + props->samplerDescriptorAlignment = ANV_SAMPLER_STATE_SIZE; + props->imageDescriptorAlignment = ANV_SURFACE_STATE_SIZE; + props->bufferDescriptorAlignment = ANV_SURFACE_STATE_SIZE; + props->maxPushDataSize = MAX_PUSH_CONSTANTS_SIZE; + props->imageCaptureReplayOpaqueDataSize = 8; + props->maxDescriptorHeapEmbeddedSamplers = MAX_EMBEDDED_SAMPLERS; + props->samplerYcbcrConversionCount = 3; + props->sparseDescriptorHeaps = pdevice->info.kmd_type == INTEL_KMD_TYPE_XE; + props->protectedDescriptorHeaps = false; + } + /* VK_EXT_extended_dynamic_state3 */ { props->dynamicPrimitiveTopologyUnrestricted = true; diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 7e50c68d859..d474b65d458 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1816,6 +1816,7 @@ enum anv_debug { ANV_DEBUG_DESCRIPTOR_DIRTY = BITFIELD_BIT(9), ANV_DEBUG_SHADER_PRINT = BITFIELD_BIT(10), ANV_DEBUG_SHADER_DUMP = BITFIELD_BIT(11), + ANV_DEBUG_EXPERIMENTAL = BITFIELD_BIT(12), }; extern enum anv_debug anv_debug;