diff --git a/src/intel/vulkan/anv_physical_device.c b/src/intel/vulkan/anv_physical_device.c index b84f5c999b0..1dd34e00f04 100644 --- a/src/intel/vulkan/anv_physical_device.c +++ b/src/intel/vulkan/anv_physical_device.c @@ -198,6 +198,7 @@ get_device_extensions(const struct anv_physical_device *device, .KHR_maintenance6 = true, .KHR_maintenance7 = true, .KHR_maintenance8 = true, + .KHR_maintenance9 = true, .KHR_map_memory2 = true, .KHR_multiview = true, .KHR_performance_query = @@ -964,6 +965,9 @@ get_features(const struct anv_physical_device *pdevice, /* VK_KHR_fragment_shader_barycentric */ .fragmentShaderBarycentric = pdevice->vk.supported_extensions.KHR_fragment_shader_barycentric, + + /* VK_KHR_maintenance9 */ + .maintenance9 = true, }; /* The new DOOM and Wolfenstein games require depthBounds without @@ -1517,6 +1521,14 @@ get_properties(const struct anv_physical_device *pdevice, props->maxDescriptorSetUpdateAfterBindTotalBuffersDynamic = MAX_DYNAMIC_BUFFERS; } + /* VK_KHR_maintenance9 */ + { + /* Swizzling of Tile64 images is different in 2D/3D */ + props->image2DViewOf3DSparse = false; + props->defaultVertexAttributeValue = + VK_DEFAULT_VERTEX_ATTRIBUTE_VALUE_ZERO_ZERO_ZERO_ZERO_KHR; + } + /* VK_KHR_performance_query */ { props->allowCommandBufferQueryCopies = false; @@ -2925,6 +2937,17 @@ void anv_GetPhysicalDeviceQueueFamilyProperties2( } break; } + + case VK_STRUCTURE_TYPE_QUEUE_FAMILY_OWNERSHIP_TRANSFER_PROPERTIES_KHR: { + VkQueueFamilyOwnershipTransferPropertiesKHR *prop = + (VkQueueFamilyOwnershipTransferPropertiesKHR *)ext; + if (pdevice->info.ver >= 20) + prop->optimalImageTransferToQueueFamilies = BITSET_MASK(pdevice->queue.family_count); + else + prop->optimalImageTransferToQueueFamilies = 0; + break; + } + default: vk_debug_ignored_stype(ext->sType); } diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 3d8343007e9..02bdb3db3e1 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -1150,6 +1150,10 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer, anv_layout_to_fast_clear_type(devinfo, image, aspect, final_layout, dst_queue_flags); + /* We make this guarantee with optimalImageTransferToQueueFamilies */ + if (devinfo->ver >= 20 && (src_queue_external || dst_queue_external)) + assert(initial_aux_usage == final_aux_usage); + /* We must override the anv_layout_to_* functions because they are unaware * of acquire/release direction. */ diff --git a/src/intel/vulkan/genX_query.c b/src/intel/vulkan/genX_query.c index a90481adc88..8458213d078 100644 --- a/src/intel/vulkan/genX_query.c +++ b/src/intel/vulkan/genX_query.c @@ -51,6 +51,12 @@ #include "vk_util.h" +static void * +query_slot(struct anv_query_pool *pool, uint32_t query) +{ + return pool->bo->map + query * pool->stride; +} + static struct anv_address anv_query_address(struct anv_query_pool *pool, uint32_t query) { @@ -321,6 +327,13 @@ VkResult genX(CreateQueryPool)( } } + if (pCreateInfo->flags & VK_QUERY_POOL_CREATE_RESET_BIT_KHR) { + for (uint32_t q = 0; q < pool->vk.query_count; q++) { + uint64_t *slot = query_slot(pool, q); + *slot = 0; + } + } + ANV_RMV(query_pool_create, device, pool, false); *pQueryPool = anv_query_pool_to_handle(pool); @@ -477,12 +490,6 @@ cpu_write_query_result(void *dst_slot, VkQueryResultFlags flags, } } -static void * -query_slot(struct anv_query_pool *pool, uint32_t query) -{ - return pool->bo->map + query * pool->stride; -} - static bool query_is_available(struct anv_query_pool *pool, uint32_t query) {