mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-05 11:57:53 +00:00
Implement support for VK_EXT_pipeline_creation_cache_control
This commit is contained in:
6 files changed
+49
-5
No files matched your search
@@ -829,6 +829,7 @@ DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMultiviewProperties);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePCIBusInfoPropertiesEXT);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePerformanceQueryFeaturesKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePerformanceQueryPropertiesKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePointClippingProperties);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceProperties2);
|
||||
@@ -1125,6 +1126,7 @@ DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMultiviewProperties);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePCIBusInfoPropertiesEXT);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePerformanceQueryFeaturesKHR);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePerformanceQueryPropertiesKHR);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePointClippingProperties);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceProperties2);
|
||||
|
||||
@@ -849,6 +849,10 @@ static const VkExtensionProperties supportedExtensions[] = {
|
||||
{
|
||||
VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, VK_EXT_PCI_BUS_INFO_SPEC_VERSION,
|
||||
},
|
||||
{
|
||||
VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME,
|
||||
VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_SPEC_VERSION,
|
||||
},
|
||||
{
|
||||
VK_EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME,
|
||||
VK_EXT_PIPELINE_CREATION_FEEDBACK_SPEC_VERSION,
|
||||
|
||||
@@ -256,6 +256,8 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
|
||||
VkPhysicalDevicePerformanceQueryFeaturesKHR); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR, \
|
||||
VkPhysicalDevicePerformanceQueryPropertiesKHR); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT, \
|
||||
VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR, \
|
||||
VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR) \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES, \
|
||||
@@ -635,7 +637,6 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_FEATURES_KHR: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_KHR: \
|
||||
|
||||
@@ -611,6 +611,10 @@ SERIALISE_VK_HANDLES();
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT, \
|
||||
VkPhysicalDevicePCIBusInfoPropertiesEXT) \
|
||||
\
|
||||
/* VK_EXT_pipeline_creation_cache_control */ \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT, \
|
||||
VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT) \
|
||||
\
|
||||
/* VK_EXT_pipeline_creation_feedback */ \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT, \
|
||||
VkPipelineCreationFeedbackCreateInfoEXT) \
|
||||
@@ -1067,9 +1071,6 @@ SERIALISE_VK_HANDLES();
|
||||
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT) \
|
||||
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT) \
|
||||
\
|
||||
/* VK_EXT_pipeline_creation_cache_control */ \
|
||||
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT) \
|
||||
\
|
||||
/* VK_EXT_private_data */ \
|
||||
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT) \
|
||||
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT) \
|
||||
@@ -4884,6 +4885,23 @@ void Deserialise(const VkPhysicalDeviceMultiviewProperties &el)
|
||||
DeserialiseNext(el.pNext);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT &el)
|
||||
{
|
||||
RDCASSERT(ser.IsReading() ||
|
||||
el.sType ==
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT);
|
||||
SerialiseNext(ser, el.sType, el.pNext);
|
||||
|
||||
SERIALISE_MEMBER(pipelineCreationCacheControl);
|
||||
}
|
||||
|
||||
template <>
|
||||
void Deserialise(const VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT &el)
|
||||
{
|
||||
DeserialiseNext(el.pNext);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR &el)
|
||||
{
|
||||
@@ -8489,6 +8507,7 @@ INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMultiviewProperties);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePCIBusInfoPropertiesEXT);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePerformanceQueryFeaturesKHR);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePerformanceQueryPropertiesKHR);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePointClippingProperties);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceProperties2);
|
||||
|
||||
@@ -2550,6 +2550,14 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
|
||||
m_NULLDescriptorsAllowed |= (ext->nullDescriptor != VK_FALSE);
|
||||
}
|
||||
END_PHYS_EXT_CHECK();
|
||||
|
||||
BEGIN_PHYS_EXT_CHECK(
|
||||
VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT);
|
||||
{
|
||||
CHECK_PHYS_EXT_FEATURE(pipelineCreationCacheControl);
|
||||
}
|
||||
END_PHYS_EXT_CHECK();
|
||||
}
|
||||
|
||||
if(availFeatures.depthClamp)
|
||||
|
||||
@@ -505,14 +505,24 @@ VkResult WrappedVulkan::vkCreateGraphicsPipelines(VkDevice device, VkPipelineCac
|
||||
{
|
||||
VkGraphicsPipelineCreateInfo *unwrapped = UnwrapInfos(pCreateInfos, count);
|
||||
VkResult ret;
|
||||
|
||||
// to be extra sure just in case the driver doesn't, set pipelines to VK_NULL_HANDLE first.
|
||||
for(uint32_t i = 0; i < count; i++)
|
||||
pPipelines[i] = VK_NULL_HANDLE;
|
||||
|
||||
SERIALISE_TIME_CALL(
|
||||
ret = ObjDisp(device)->CreateGraphicsPipelines(Unwrap(device), Unwrap(pipelineCache), count,
|
||||
unwrapped, pAllocator, pPipelines));
|
||||
|
||||
if(ret == VK_SUCCESS)
|
||||
if(ret == VK_SUCCESS || ret == VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT)
|
||||
{
|
||||
for(uint32_t i = 0; i < count; i++)
|
||||
{
|
||||
// any pipelines that are VK_NULL_HANDLE, silently ignore as they failed but we might have
|
||||
// successfully created some before then.
|
||||
if(pPipelines[i] == VK_NULL_HANDLE)
|
||||
continue;
|
||||
|
||||
ResourceId id = GetResourceManager()->WrapResource(Unwrap(device), pPipelines[i]);
|
||||
|
||||
if(IsCaptureMode(m_State))
|
||||
|
||||
Reference in new issue
Block a user