lavapipe: EXT_pipeline_creation_cache_control

again, technically passing is still passing

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15379>
This commit is contained in:
Mike Blumenkrantz
2022-03-14 12:26:15 -04:00
committed by Marge Bot
parent 9bce878490
commit b7fbaf924d
3 changed files with 32 additions and 11 deletions

View File

@@ -145,6 +145,7 @@ static const struct vk_device_extension_table lvp_device_extensions_supported =
.EXT_index_type_uint8 = true,
.EXT_multi_draw = true,
.EXT_pipeline_creation_feedback = true,
.EXT_pipeline_creation_cache_control = true,
.EXT_post_depth_coverage = true,
.EXT_private_data = true,
.EXT_primitive_topology_list_restart = true,
@@ -694,6 +695,12 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceFeatures2(
features->privateData = true;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: {
VkPhysicalDevicePipelineCreationCacheControlFeatures *features =
(VkPhysicalDevicePipelineCreationCacheControlFeatures *)ext;
features->pipelineCreationCacheControl = true;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT: {
VkPhysicalDeviceLineRasterizationFeaturesEXT *features =
(VkPhysicalDeviceLineRasterizationFeaturesEXT *)ext;

View File

@@ -1118,7 +1118,8 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateGraphicsPipelines(
unsigned i = 0;
for (; i < count; i++) {
VkResult r;
VkResult r = VK_PIPELINE_COMPILE_REQUIRED;
if (!(pCreateInfos[i].flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT))
r = lvp_graphics_pipeline_create(_device,
pipelineCache,
&pCreateInfos[i],
@@ -1126,8 +1127,14 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateGraphicsPipelines(
if (r != VK_SUCCESS) {
result = r;
pPipelines[i] = VK_NULL_HANDLE;
if (pCreateInfos[i].flags & VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT)
break;
}
}
if (result != VK_SUCCESS) {
for (; i < count; i++)
pPipelines[i] = VK_NULL_HANDLE;
}
return result;
}
@@ -1217,7 +1224,8 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateComputePipelines(
unsigned i = 0;
for (; i < count; i++) {
VkResult r;
VkResult r = VK_PIPELINE_COMPILE_REQUIRED;
if (!(pCreateInfos[i].flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT))
r = lvp_compute_pipeline_create(_device,
pipelineCache,
&pCreateInfos[i],
@@ -1225,8 +1233,15 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateComputePipelines(
if (r != VK_SUCCESS) {
result = r;
pPipelines[i] = VK_NULL_HANDLE;
if (pCreateInfos[i].flags & VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT)
break;
}
}
if (result != VK_SUCCESS) {
for (; i < count; i++)
pPipelines[i] = VK_NULL_HANDLE;
}
return result;
}

View File

@@ -33,7 +33,6 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreatePipelineCache(
struct lvp_pipeline_cache *cache;
assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO);
assert(pCreateInfo->flags == 0);
cache = vk_alloc2(&device->vk.alloc, pAllocator,
sizeof(*cache), 8,