Add support for VK_EXT_pipeline_robustness

This commit is contained in:
baldurk
2025-08-25 11:36:01 +01:00
parent 215557a570
commit d78e44688c
10 changed files with 219 additions and 10 deletions
+1 -1
View File
@@ -87,6 +87,7 @@ Maintainers can update this file by updating vk.xml in this folder and running `
* `VK_EXT_pci_bus_info`
* `VK_EXT_pipeline_creation_cache_control`
* `VK_EXT_pipeline_creation_feedback`
* `VK_EXT_pipeline_robustness`
* `VK_EXT_post_depth_coverage`
* `VK_EXT_present_mode_fifo_latest_ready`
* `VK_EXT_primitive_topology_list_restart`
@@ -309,7 +310,6 @@ The portability subset is only relevant on mac, which is not a supported platfor
* `VK_EXT_physical_device_drm`
* `VK_EXT_pipeline_library_group_handles`
* `VK_EXT_pipeline_protected_access`
* `VK_EXT_pipeline_robustness`
* `VK_EXT_shader_float8`
* `VK_EXT_shader_module_identifier`
* `VK_EXT_shader_replicated_composites`
+8
View File
@@ -1755,6 +1755,8 @@ DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePerformanceQueryFeaturesKHR);
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePerformanceQueryPropertiesKHR);
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePipelineCreationCacheControlFeatures);
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR);
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePipelineRobustnessFeaturesEXT);
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePipelineRobustnessPropertiesEXT);
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePointClippingProperties);
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePresentId2FeaturesKHR);
DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePresentIdFeaturesKHR);
@@ -1866,6 +1868,7 @@ DECLARE_REFLECTION_STRUCT(VkPipelineRasterizationProvokingVertexStateCreateInfoE
DECLARE_REFLECTION_STRUCT(VkPipelineRasterizationStateCreateInfo);
DECLARE_REFLECTION_STRUCT(VkPipelineRasterizationStateStreamCreateInfoEXT);
DECLARE_REFLECTION_STRUCT(VkPipelineRenderingCreateInfo);
DECLARE_REFLECTION_STRUCT(VkPipelineRobustnessCreateInfo);
DECLARE_REFLECTION_STRUCT(VkPipelineSampleLocationsStateCreateInfoEXT);
DECLARE_REFLECTION_STRUCT(VkPipelineShaderStageCreateInfo);
DECLARE_REFLECTION_STRUCT(VkPipelineShaderStageRequiredSubgroupSizeCreateInfo);
@@ -2273,6 +2276,8 @@ DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePerformanceQueryFeaturesKHR);
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePerformanceQueryPropertiesKHR);
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePipelineCreationCacheControlFeatures);
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR);
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePipelineRobustnessFeaturesEXT);
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePipelineRobustnessPropertiesEXT);
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePointClippingProperties);
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePresentId2FeaturesKHR);
DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePresentIdFeaturesKHR);
@@ -2384,6 +2389,7 @@ DECLARE_DESERIALISE_TYPE(VkPipelineRasterizationProvokingVertexStateCreateInfoEX
DECLARE_DESERIALISE_TYPE(VkPipelineRasterizationStateCreateInfo);
DECLARE_DESERIALISE_TYPE(VkPipelineRasterizationStateStreamCreateInfoEXT);
DECLARE_DESERIALISE_TYPE(VkPipelineRenderingCreateInfo);
DECLARE_DESERIALISE_TYPE(VkPipelineRobustnessCreateInfo);
DECLARE_DESERIALISE_TYPE(VkPipelineSampleLocationsStateCreateInfoEXT);
DECLARE_DESERIALISE_TYPE(VkPipelineShaderStageCreateInfo);
DECLARE_DESERIALISE_TYPE(VkPipelineShaderStageRequiredSubgroupSizeCreateInfo);
@@ -2791,6 +2797,8 @@ DECLARE_REFLECTION_ENUM(VkPipelineCreationFeedbackFlagBits);
DECLARE_REFLECTION_ENUM(VkPipelineDepthStencilStateCreateFlagBits);
DECLARE_REFLECTION_ENUM(VkPipelineExecutableStatisticFormatKHR);
DECLARE_REFLECTION_ENUM(VkPipelineLayoutCreateFlagBits);
DECLARE_REFLECTION_ENUM(VkPipelineRobustnessBufferBehavior);
DECLARE_REFLECTION_ENUM(VkPipelineRobustnessImageBehavior);
DECLARE_REFLECTION_ENUM(VkPipelineShaderStageCreateFlagBits);
DECLARE_REFLECTION_ENUM(VkPipelineStageFlagBits);
DECLARE_REFLECTION_ENUM(VkPipelineStageFlagBits2);
+4
View File
@@ -1278,6 +1278,10 @@ static const VkExtensionProperties supportedExtensions[] = {
VK_EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME,
VK_EXT_PIPELINE_CREATION_FEEDBACK_SPEC_VERSION,
},
{
VK_EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME,
VK_EXT_PIPELINE_ROBUSTNESS_SPEC_VERSION,
},
{
VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME,
VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION,
+47
View File
@@ -1262,6 +1262,13 @@ void VulkanCreationInfo::Pipeline::Init(VulkanResourceManager *resourceMan,
dynamicStates[VkDynamicScissor] = false;
}
vertexInputRobustness = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT;
const VkPipelineRobustnessCreateInfo *robustness =
(const VkPipelineRobustnessCreateInfo *)FindNextStruct(
pCreateInfo, VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO);
if(robustness)
vertexInputRobustness = robustness->vertexInputs;
// VkPipelineShaderStageCreateInfo
for(uint32_t i = 0; i < pCreateInfo->stageCount; i++)
{
@@ -1272,6 +1279,26 @@ void VulkanCreationInfo::Pipeline::Init(VulkanResourceManager *resourceMan,
ShaderEntry &shad = shaders[stageIndex];
shad.storageBufferRobustness = shad.uniformBufferRobustness =
VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT;
shad.imageRobustness = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT;
const VkPipelineRobustnessCreateInfo *shaderRobustness =
(const VkPipelineRobustnessCreateInfo *)FindNextStruct(
&pCreateInfo->pStages[i], VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO);
// If VkPipelineRobustnessCreateInfo is specified for both a pipeline and a pipeline stage, the
// VkPipelineRobustnessCreateInfo specified for the pipeline stage will take precedence.
if(shaderRobustness == NULL)
shaderRobustness = robustness;
if(shaderRobustness)
{
shad.storageBufferRobustness = shaderRobustness->storageBuffers;
shad.uniformBufferRobustness = shaderRobustness->uniformBuffers;
shad.imageRobustness = shaderRobustness->images;
}
const VkPipelineShaderStageRequiredSubgroupSizeCreateInfo *subgroupSize =
(const VkPipelineShaderStageRequiredSubgroupSizeCreateInfo *)FindNextStruct(
&pCreateInfo->pStages[i],
@@ -1903,11 +1930,31 @@ void VulkanCreationInfo::Pipeline::Init(VulkanResourceManager *resourceMan, Vulk
// need to figure out which states are valid to be NULL
// If VkPipelineRobustnessCreateInfo is specified for both a pipeline and a pipeline stage, the
// VkPipelineRobustnessCreateInfo specified for the pipeline stage will take precedence.
const VkPipelineRobustnessCreateInfo *shaderRobustness =
(const VkPipelineRobustnessCreateInfo *)FindNextStruct(
&pCreateInfo->stage, VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO);
if(shaderRobustness == NULL)
shaderRobustness = (const VkPipelineRobustnessCreateInfo *)FindNextStruct(
pCreateInfo, VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO);
// VkPipelineShaderStageCreateInfo
{
ResourceId shadid = GetResID(pCreateInfo->stage.module);
ShaderEntry &shad = shaders[5]; // 5 is the compute shader's index (VS, TCS, TES, GS, FS, CS)
shad.storageBufferRobustness = shad.uniformBufferRobustness =
VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT;
shad.imageRobustness = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT;
if(shaderRobustness)
{
shad.storageBufferRobustness = shaderRobustness->storageBuffers;
shad.uniformBufferRobustness = shaderRobustness->uniformBuffers;
shad.imageRobustness = shaderRobustness->images;
}
const VkPipelineShaderStageRequiredSubgroupSizeCreateInfo *subgroupSize =
(const VkPipelineShaderStageRequiredSubgroupSizeCreateInfo *)FindNextStruct(
&pCreateInfo->stage,
+15
View File
@@ -251,6 +251,18 @@ struct VulkanCreationInfo
// VkPipelineShaderStageRequiredSubgroupSizeCreateInfo
uint32_t requiredSubgroupSize = 0;
// VkPipelineRobustnessCreateInfo
VkPipelineRobustnessBufferBehavior storageBufferRobustness;
VkPipelineRobustnessBufferBehavior uniformBufferRobustness;
VkPipelineRobustnessImageBehavior imageRobustness;
bool HasRobustness() const
{
return storageBufferRobustness != VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT ||
uniformBufferRobustness != VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT ||
imageRobustness != VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT;
}
};
struct Pipeline
@@ -446,6 +458,9 @@ struct VulkanCreationInfo
// VkPipelineRasterizationProvokingVertexStateCreateInfoEXT
VkProvokingVertexModeEXT provokingVertex;
// VkPipelineRobustnessCreateInfo
VkPipelineRobustnessBufferBehavior vertexInputRobustness;
};
std::unordered_map<ResourceId, Pipeline> m_Pipeline;
+5 -3
View File
@@ -443,6 +443,10 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
VkPhysicalDevicePipelineCreationCacheControlFeatures); \
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR, \
VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR) \
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES, \
VkPhysicalDevicePipelineRobustnessFeatures) \
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES, \
VkPhysicalDevicePipelineRobustnessProperties) \
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES, \
VkPhysicalDevicePointClippingProperties); \
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR, \
@@ -649,6 +653,7 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
VkPipelineRasterizationStateCreateInfo); \
COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT, \
VkPipelineRasterizationStateStreamCreateInfoEXT); \
COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO, VkPipelineRobustnessCreateInfo); \
COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT, \
VkPipelineSampleLocationsStateCreateInfoEXT); \
COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, VkPipelineShaderStageCreateInfo); \
@@ -1233,8 +1238,6 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_OPACITY_MICROMAP_FEATURES_ARM: \
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT: \
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES: \
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES: \
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES: \
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV: \
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_QUEUE_FAMILY_DATA_GRAPH_PROCESSING_ENGINE_INFO_ARM: \
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAW_ACCESS_CHAINS_FEATURES_NV: \
@@ -1307,7 +1310,6 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
case VK_STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT: \
case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD: \
case VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV: \
case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO: \
case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT: \
case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV: \
case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT: \
+63 -5
View File
@@ -853,6 +853,13 @@ SERIALISE_VK_HANDLES();
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO, \
VkPipelineCreationFeedbackCreateInfo) \
\
/* VK_EXT_pipeline_robustness */ \
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO, VkPipelineRobustnessCreateInfo) \
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES, \
VkPhysicalDevicePipelineRobustnessFeatures) \
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES, \
VkPhysicalDevicePipelineRobustnessProperties) \
\
/* VK_EXT_primitive_topology_list_restart */ \
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT, \
VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT) \
@@ -1899,11 +1906,6 @@ SERIALISE_VK_HANDLES();
/* VK_EXT_pipeline_protected_access */ \
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES) \
\
/* VK_EXT_pipeline_robustness */ \
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO) \
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES) \
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES) \
\
/* VK_EXT_shader_float8 */ \
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT) \
\
@@ -10590,6 +10592,59 @@ void Deserialise(const VkPipelineCreationFeedbackCreateInfo &el)
delete[] el.pPipelineStageCreationFeedbacks;
}
template <typename SerialiserType>
void DoSerialise(SerialiserType &ser, VkPipelineRobustnessCreateInfo &el)
{
RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO);
SerialiseNext(ser, el.sType, el.pNext);
SERIALISE_MEMBER(storageBuffers);
SERIALISE_MEMBER(uniformBuffers);
SERIALISE_MEMBER(vertexInputs);
SERIALISE_MEMBER(images);
}
template <>
void Deserialise(const VkPipelineRobustnessCreateInfo &el)
{
DeserialiseNext(el.pNext);
}
template <typename SerialiserType>
void DoSerialise(SerialiserType &ser, VkPhysicalDevicePipelineRobustnessProperties &el)
{
RDCASSERT(ser.IsReading() ||
el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES);
SerialiseNext(ser, el.sType, el.pNext);
SERIALISE_MEMBER(defaultRobustnessStorageBuffers);
SERIALISE_MEMBER(defaultRobustnessUniformBuffers);
SERIALISE_MEMBER(defaultRobustnessVertexInputs);
SERIALISE_MEMBER(defaultRobustnessImages);
}
template <>
void Deserialise(const VkPhysicalDevicePipelineRobustnessProperties &el)
{
DeserialiseNext(el.pNext);
}
template <typename SerialiserType>
void DoSerialise(SerialiserType &ser, VkPhysicalDevicePipelineRobustnessFeatures &el)
{
RDCASSERT(ser.IsReading() ||
el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES);
SerialiseNext(ser, el.sType, el.pNext);
SERIALISE_MEMBER(pipelineRobustness);
}
template <>
void Deserialise(const VkPhysicalDevicePipelineRobustnessFeatures &el)
{
DeserialiseNext(el.pNext);
}
template <typename SerialiserType>
void DoSerialise(SerialiserType &ser, VkDisplayPowerInfoEXT &el)
{
@@ -14627,6 +14682,8 @@ INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePerformanceQueryFeaturesKHR);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePerformanceQueryPropertiesKHR);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePipelineCreationCacheControlFeatures);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePipelineRobustnessFeatures);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePipelineRobustnessProperties);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePointClippingProperties);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePresentId2FeaturesKHR);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePresentIdFeaturesKHR);
@@ -14737,6 +14794,7 @@ INSTANTIATE_SERIALISE_TYPE(VkPipelineRasterizationProvokingVertexStateCreateInfo
INSTANTIATE_SERIALISE_TYPE(VkPipelineRasterizationStateCreateInfo);
INSTANTIATE_SERIALISE_TYPE(VkPipelineRasterizationStateStreamCreateInfoEXT);
INSTANTIATE_SERIALISE_TYPE(VkPipelineRenderingCreateInfo);
INSTANTIATE_SERIALISE_TYPE(VkPipelineRobustnessCreateInfo);
INSTANTIATE_SERIALISE_TYPE(VkPipelineSampleLocationsStateCreateInfoEXT);
INSTANTIATE_SERIALISE_TYPE(VkPipelineShaderStageCreateInfo);
INSTANTIATE_SERIALISE_TYPE(VkPipelineShaderStageRequiredSubgroupSizeCreateInfo);
+43 -1
View File
@@ -608,6 +608,7 @@ void VulkanShaderCache::MakeGraphicsPipelineInfo(VkGraphicsPipelineCreateInfo &p
uint32_t dataOffset = 0;
static VkPipelineShaderStageRequiredSubgroupSizeCreateInfo reqSubgroupSize[NumShaderStages] = {};
static VkPipelineRobustnessCreateInfo shaderRobustness[NumShaderStages] = {};
// reserve space for spec constants
for(uint32_t i = 0; i < NumShaderStages; i++)
@@ -624,12 +625,25 @@ void VulkanShaderCache::MakeGraphicsPipelineInfo(VkGraphicsPipelineCreateInfo &p
if(pipeInfo.shaders[i].requiredSubgroupSize != 0)
{
reqSubgroupSize[i].requiredSubgroupSize = pipeInfo.shaders[i].requiredSubgroupSize;
reqSubgroupSize[i].sType =
VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO;
reqSubgroupSize[i].requiredSubgroupSize = pipeInfo.shaders[i].requiredSubgroupSize;
reqSubgroupSize[i].pNext = (void *)stages[stageCount].pNext;
stages[stageCount].pNext = &reqSubgroupSize[i];
}
if(pipeInfo.shaders[i].HasRobustness())
{
shaderRobustness[i].images = pipeInfo.shaders[i].imageRobustness;
shaderRobustness[i].uniformBuffers = pipeInfo.shaders[i].uniformBufferRobustness;
shaderRobustness[i].storageBuffers = pipeInfo.shaders[i].storageBufferRobustness;
shaderRobustness[i].sType = VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO;
shaderRobustness[i].pNext = stages[stageCount].pNext;
stages[stageCount].pNext = &shaderRobustness;
}
if(!pipeInfo.shaders[i].specialization.empty())
{
stages[stageCount].pSpecializationInfo = &specInfo[i];
@@ -1082,6 +1096,20 @@ void VulkanShaderCache::MakeGraphicsPipelineInfo(VkGraphicsPipelineCreateInfo &p
ret.flags = (uint32_t)flags;
}
static VkPipelineRobustnessCreateInfo VkPipelineRobustnessCreateInfo = {
VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO,
};
// we only need to specify vertex input robustness, all per-shader robustness is handled via
// pNexts on the stages above
if(pipeInfo.vertexInputRobustness != VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT)
{
VkPipelineRobustnessCreateInfo.vertexInputs = pipeInfo.vertexInputRobustness;
VkPipelineRobustnessCreateInfo.pNext = ret.pNext;
ret.pNext = &VkPipelineRobustnessCreateInfo;
}
pipeCreateInfo = ret;
}
@@ -1146,9 +1174,23 @@ void VulkanShaderCache::MakeComputePipelineInfo(VkComputePipelineCreateInfo &pip
if(pipeInfo.shaders[i].requiredSubgroupSize != 0)
{
reqSubgroupSize.requiredSubgroupSize = pipeInfo.shaders[i].requiredSubgroupSize;
reqSubgroupSize.pNext = (void *)stage.pNext;
stage.pNext = &reqSubgroupSize;
}
static VkPipelineRobustnessCreateInfo robustness = {
VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO,
};
if(pipeInfo.shaders[i].HasRobustness())
{
robustness.images = pipeInfo.shaders[i].imageRobustness;
robustness.uniformBuffers = pipeInfo.shaders[i].uniformBufferRobustness;
robustness.storageBuffers = pipeInfo.shaders[i].storageBufferRobustness;
robustness.pNext = stage.pNext;
stage.pNext = &robustness;
}
VkComputePipelineCreateInfo ret = {
VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO,
NULL,
+26
View File
@@ -3976,6 +3976,32 @@ rdcstr DoStringise(const VkDefaultVertexAttributeValueKHR &el)
END_ENUM_STRINGISE();
}
template <>
rdcstr DoStringise(const VkPipelineRobustnessImageBehavior &el)
{
BEGIN_ENUM_STRINGISE(VkPipelineRobustnessImageBehavior);
{
STRINGISE_ENUM(VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT);
STRINGISE_ENUM(VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED);
STRINGISE_ENUM(VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2);
STRINGISE_ENUM(VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS);
}
END_ENUM_STRINGISE();
}
template <>
rdcstr DoStringise(const VkPipelineRobustnessBufferBehavior &el)
{
BEGIN_ENUM_STRINGISE(VkPipelineRobustnessBufferBehavior);
{
STRINGISE_ENUM(VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT);
STRINGISE_ENUM(VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED);
STRINGISE_ENUM(VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2);
STRINGISE_ENUM(VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS);
}
END_ENUM_STRINGISE();
}
template <>
rdcstr DoStringise(const VkSemaphoreWaitFlagBits &el)
{
@@ -3571,6 +3571,13 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
CHECK_PHYS_EXT_FEATURE(maintenance9);
}
END_PHYS_EXT_CHECK();
BEGIN_PHYS_EXT_CHECK(VkPhysicalDevicePipelineRobustnessFeatures,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES);
{
CHECK_PHYS_EXT_FEATURE(pipelineRobustness);
}
END_PHYS_EXT_CHECK();
}
if(availFeatures.depthClamp)