anv: implement VK_KHR_maintenance9
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35381>
This commit is contained in:
committed by
Marge Bot
parent
884df891d7
commit
595889018a
@@ -198,6 +198,7 @@ get_device_extensions(const struct anv_physical_device *device,
|
|||||||
.KHR_maintenance6 = true,
|
.KHR_maintenance6 = true,
|
||||||
.KHR_maintenance7 = true,
|
.KHR_maintenance7 = true,
|
||||||
.KHR_maintenance8 = true,
|
.KHR_maintenance8 = true,
|
||||||
|
.KHR_maintenance9 = true,
|
||||||
.KHR_map_memory2 = true,
|
.KHR_map_memory2 = true,
|
||||||
.KHR_multiview = true,
|
.KHR_multiview = true,
|
||||||
.KHR_performance_query =
|
.KHR_performance_query =
|
||||||
@@ -964,6 +965,9 @@ get_features(const struct anv_physical_device *pdevice,
|
|||||||
/* VK_KHR_fragment_shader_barycentric */
|
/* VK_KHR_fragment_shader_barycentric */
|
||||||
.fragmentShaderBarycentric =
|
.fragmentShaderBarycentric =
|
||||||
pdevice->vk.supported_extensions.KHR_fragment_shader_barycentric,
|
pdevice->vk.supported_extensions.KHR_fragment_shader_barycentric,
|
||||||
|
|
||||||
|
/* VK_KHR_maintenance9 */
|
||||||
|
.maintenance9 = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The new DOOM and Wolfenstein games require depthBounds without
|
/* 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;
|
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 */
|
/* VK_KHR_performance_query */
|
||||||
{
|
{
|
||||||
props->allowCommandBufferQueryCopies = false;
|
props->allowCommandBufferQueryCopies = false;
|
||||||
@@ -2925,6 +2937,17 @@ void anv_GetPhysicalDeviceQueueFamilyProperties2(
|
|||||||
}
|
}
|
||||||
break;
|
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:
|
default:
|
||||||
vk_debug_ignored_stype(ext->sType);
|
vk_debug_ignored_stype(ext->sType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1150,6 +1150,10 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer,
|
|||||||
anv_layout_to_fast_clear_type(devinfo, image, aspect, final_layout,
|
anv_layout_to_fast_clear_type(devinfo, image, aspect, final_layout,
|
||||||
dst_queue_flags);
|
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
|
/* We must override the anv_layout_to_* functions because they are unaware
|
||||||
* of acquire/release direction.
|
* of acquire/release direction.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -51,6 +51,12 @@
|
|||||||
|
|
||||||
#include "vk_util.h"
|
#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
|
static struct anv_address
|
||||||
anv_query_address(struct anv_query_pool *pool, uint32_t query)
|
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);
|
ANV_RMV(query_pool_create, device, pool, false);
|
||||||
|
|
||||||
*pQueryPool = anv_query_pool_to_handle(pool);
|
*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
|
static bool
|
||||||
query_is_available(struct anv_query_pool *pool, uint32_t query)
|
query_is_available(struct anv_query_pool *pool, uint32_t query)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user