Add support for VK_KHR_maintenance8

This commit is contained in:
baldurk committed 2025-08-25 11:36:01 +01:00
1 parent e1f3582774
commit 2cb07273cb
8 files changed
+100 -17

No files matched your search

+25 -10
View File
@@ -2345,19 +2345,34 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray<ThreadState>
}
else if(opdata.op == Op::SRem || opdata.op == Op::SMod)
{
// OpSRem:
// ... the sign of r is the same as the sign of Operand 1.
// OpSMod:
// ... the sign of r is the same as the sign of Operand 2.
//
// match signs to the appropriate operand by checking and doing -abs() or abs().
// since abs() never truncates (INT_MIN has a corresponding unsigned value) this will never
// lose precision as -abs(INT_MIN) == INT_MIN
for(uint8_t c = 0; c < var.columns; c++)
{
#undef _IMPL
#define _IMPL(I, S, U) \
if(comp<S>(b, c) != 0) \
{ \
comp<S>(var, c) %= comp<S>(b, c); \
} \
else \
{ \
comp<S>(var, c) = 0; \
if(m_State) \
m_State->flags |= ShaderEvents::GeneratedNanOrInf; \
#define _IMPL(I, S, U) \
if(comp<S>(b, c) != 0) \
{ \
S op1 = comp<S>(var, c); \
S op2 = comp<S>(b, c); \
S tmp = op1 % op2; \
if(opdata.op == Op::SRem) \
comp<S>(var, c) = op1 < 0 ? (S)-abs(tmp) : (S)abs(tmp); \
else \
comp<S>(var, c) = op2 < 0 ? (S)-abs(tmp) : (S)abs(tmp); \
} \
else \
{ \
comp<S>(var, c) = 0; \
if(m_State) \
m_State->flags |= ShaderEvents::GeneratedNanOrInf; \
}
IMPL_FOR_INT_TYPES(_IMPL);
+1 -1
View File
@@ -188,6 +188,7 @@ Maintainers can update this file by updating vk.xml in this folder and running `
* `VK_KHR_maintenance5`
* `VK_KHR_maintenance6`
* `VK_KHR_maintenance7`
* `VK_KHR_maintenance8`
* `VK_KHR_map_memory2`
* `VK_KHR_multiview`
* `VK_KHR_performance_query`
@@ -273,7 +274,6 @@ KHR extensions will definitely be implemented at some point, though KHR extensio
## KHR Extensions
* `VK_KHR_cooperative_matrix`
* `VK_KHR_maintenance8`
* `VK_KHR_maintenance9`
* `VK_KHR_pipeline_binary`
+11
View File
@@ -71,6 +71,7 @@
// set up these defines so that vulkan_core.h doesn't trash the enum names we want to define as real
// 64-bit enums
#define VkAccessFlagBits2 VkAccessFlagBits2_VkFlags64_typedef
#define VkAccessFlagBits3KHR VkAccessFlagBits3KHR_VkFlags64_typedef
#define VkPipelineStageFlagBits2 VkPipelineStageFlagBits2_VkFlags64_typedef
#define VkFormatFeatureFlagBits2 VkFormatFeatureFlagBits2_VkFlags64_typedef
#define VkBufferUsageFlagBits2 VkBufferUsageFlagBits2_VkFlags64_typedef
@@ -84,6 +85,7 @@
#include "vk_dispatchtables.h"
#undef VkAccessFlagBits2
#undef VkAccessFlagBits3KHR
#undef VkPipelineStageFlagBits2
#undef VkFormatFeatureFlagBits2
#undef VkBufferUsageFlagBits2
@@ -1625,6 +1627,7 @@ DECLARE_REFLECTION_STRUCT(VkMemoryAllocateFlagsInfo);
DECLARE_REFLECTION_STRUCT(VkMemoryAllocateInfo);
DECLARE_REFLECTION_STRUCT(VkMemoryBarrier);
DECLARE_REFLECTION_STRUCT(VkMemoryBarrier2);
DECLARE_REFLECTION_STRUCT(VkMemoryBarrierAccessFlags3KHR);
DECLARE_REFLECTION_STRUCT(VkMemoryDedicatedAllocateInfo);
DECLARE_REFLECTION_STRUCT(VkMemoryDedicatedRequirements);
DECLARE_REFLECTION_STRUCT(VkMemoryFdPropertiesKHR);
@@ -1731,6 +1734,7 @@ DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMaintenance6FeaturesKHR);
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMaintenance6PropertiesKHR);
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMaintenance7FeaturesKHR);
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMaintenance7PropertiesKHR);
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMaintenance8FeaturesKHR);
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMemoryBudgetPropertiesEXT);
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMemoryPriorityFeaturesEXT);
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMemoryProperties2);
@@ -2141,6 +2145,7 @@ DECLARE_DESERIALISE_TYPE(VkMemoryAllocateFlagsInfo);
DECLARE_DESERIALISE_TYPE(VkMemoryAllocateInfo);
DECLARE_DESERIALISE_TYPE(VkMemoryBarrier);
DECLARE_DESERIALISE_TYPE(VkMemoryBarrier2);
DECLARE_DESERIALISE_TYPE(VkMemoryBarrierAccessFlags3KHR);
DECLARE_DESERIALISE_TYPE(VkMemoryDedicatedAllocateInfo);
DECLARE_DESERIALISE_TYPE(VkMemoryDedicatedRequirements);
DECLARE_DESERIALISE_TYPE(VkMemoryFdPropertiesKHR);
@@ -2244,6 +2249,7 @@ DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMaintenance6FeaturesKHR);
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMaintenance6PropertiesKHR);
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMaintenance7FeaturesKHR);
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMaintenance7PropertiesKHR);
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMaintenance8FeaturesKHR);
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMemoryBudgetPropertiesEXT);
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMemoryPriorityFeaturesEXT);
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMemoryProperties2);
@@ -2647,6 +2653,10 @@ enum VkAccessFlagBits2 : uint64_t
{
};
enum VkAccessFlagBits3KHR : uint64_t
{
};
enum VkPipelineStageFlagBits2 : uint64_t
{
};
@@ -2671,6 +2681,7 @@ DECLARE_REFLECTION_ENUM(VkAccelerationStructureCreateFlagBitsKHR);
DECLARE_REFLECTION_ENUM(VkAccelerationStructureTypeKHR);
DECLARE_REFLECTION_ENUM(VkAccessFlagBits);
DECLARE_REFLECTION_ENUM(VkAccessFlagBits2);
DECLARE_REFLECTION_ENUM(VkAccessFlagBits3KHR);
DECLARE_REFLECTION_ENUM(VkAcquireProfilingLockFlagBitsKHR);
DECLARE_REFLECTION_ENUM(VkAttachmentDescriptionFlagBits);
DECLARE_REFLECTION_ENUM(VkAttachmentLoadOp);
+4
View File
@@ -1694,6 +1694,10 @@ static const VkExtensionProperties supportedExtensions[] = {
VK_KHR_MAINTENANCE_7_EXTENSION_NAME,
VK_KHR_MAINTENANCE_7_SPEC_VERSION,
},
{
VK_KHR_MAINTENANCE_8_EXTENSION_NAME,
VK_KHR_MAINTENANCE_8_SPEC_VERSION,
},
{
VK_KHR_MAP_MEMORY_2_EXTENSION_NAME,
VK_KHR_MAP_MEMORY_2_SPEC_VERSION,
+3 -2
View File
@@ -209,6 +209,7 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, VkMemoryAllocateInfo); \
COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_BARRIER, VkMemoryBarrier); \
COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_BARRIER_2, VkMemoryBarrier2); \
COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_BARRIER_ACCESS_FLAGS_3_KHR, VkMemoryBarrierAccessFlags3KHR); \
COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS, VkMemoryDedicatedRequirements); \
COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO, \
VkMemoryOpaqueCaptureAddressAllocateInfo); \
@@ -388,6 +389,8 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
VkPhysicalDeviceMaintenance7FeaturesKHR); \
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR, \
VkPhysicalDeviceMaintenance7PropertiesKHR); \
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_8_FEATURES_KHR, \
VkPhysicalDeviceMaintenance8FeaturesKHR); \
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT, \
VkPhysicalDeviceMemoryBudgetPropertiesEXT); \
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2, \
@@ -1097,7 +1100,6 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
case VK_STRUCTURE_TYPE_LATENCY_SURFACE_CAPABILITIES_NV: \
case VK_STRUCTURE_TYPE_LATENCY_TIMINGS_FRAME_REPORT_NV: \
case VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT: \
case VK_STRUCTURE_TYPE_MEMORY_BARRIER_ACCESS_FLAGS_3_KHR: \
case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_TENSOR_ARM: \
case VK_STRUCTURE_TYPE_MEMORY_GET_METAL_HANDLE_INFO_EXT: \
case VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV: \
@@ -1200,7 +1202,6 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT: \
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT: \
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV: \
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_8_FEATURES_KHR: \
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_9_FEATURES_KHR: \
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_9_PROPERTIES_KHR: \
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT: \
+40 -4
View File
@@ -160,6 +160,7 @@ DECL_VKFLAG(VkToolPurpose);
DECL_VKFLAG(VkSubmit);
DECL_VKFLAG_EXT(VkPipelineStage, 2);
DECL_VKFLAG_EXT(VkAccess, 2);
DECL_VKFLAG_EXT(VkAccess, 3KHR);
DECL_VKFLAG_EXT(VkFormatFeature, 2);
DECL_VKFLAG_EXT(VkGraphicsPipelineLibrary, EXT);
DECL_VKFLAG(VkRendering);
@@ -1314,6 +1315,11 @@ SERIALISE_VK_HANDLES();
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_KHR, \
VkPhysicalDeviceLayeredApiVulkanPropertiesKHR) \
\
/* VK_KHR_maintenance8 */ \
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_8_FEATURES_KHR, \
VkPhysicalDeviceMaintenance8FeaturesKHR) \
PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_BARRIER_ACCESS_FLAGS_3_KHR, VkMemoryBarrierAccessFlags3KHR) \
\
/* VK_KHR_map_memory2 */ \
PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_MAP_INFO, VkMemoryMapInfo) \
PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO, VkMemoryUnmapInfo) \
@@ -1954,10 +1960,6 @@ SERIALISE_VK_HANDLES();
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR) \
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR) \
\
/* VK_KHR_maintenance8 */ \
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_8_FEATURES_KHR) \
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_MEMORY_BARRIER_ACCESS_FLAGS_3_KHR) \
\
/* VK_KHR_maintenance9 */ \
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_9_FEATURES_KHR) \
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_9_PROPERTIES_KHR) \
@@ -13895,6 +13897,38 @@ void Deserialise(const VkPhysicalDeviceMaintenance7PropertiesKHR &el)
DeserialiseNext(el.pNext);
}
template <typename SerialiserType>
void DoSerialise(SerialiserType &ser, VkPhysicalDeviceMaintenance8FeaturesKHR &el)
{
RDCASSERT(ser.IsReading() ||
el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_8_FEATURES_KHR);
SerialiseNext(ser, el.sType, el.pNext);
SERIALISE_MEMBER(maintenance8);
}
template <>
void Deserialise(const VkPhysicalDeviceMaintenance8FeaturesKHR &el)
{
DeserialiseNext(el.pNext);
}
template <typename SerialiserType>
void DoSerialise(SerialiserType &ser, VkMemoryBarrierAccessFlags3KHR &el)
{
RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_MEMORY_BARRIER_ACCESS_FLAGS_3_KHR);
SerialiseNext(ser, el.sType, el.pNext);
SERIALISE_MEMBER_VKFLAGS(VkAccessFlags3KHR, srcAccessMask3);
SERIALISE_MEMBER_VKFLAGS(VkAccessFlags3KHR, dstAccessMask3);
}
template <>
void Deserialise(const VkMemoryBarrierAccessFlags3KHR &el)
{
DeserialiseNext(el.pNext);
}
template <typename SerialiserType>
void DoSerialise(SerialiserType &ser, VkImageCompressionControlEXT &el)
{
@@ -14414,6 +14448,7 @@ INSTANTIATE_SERIALISE_TYPE(VkMemoryAllocateFlagsInfo);
INSTANTIATE_SERIALISE_TYPE(VkMemoryAllocateInfo);
INSTANTIATE_SERIALISE_TYPE(VkMemoryBarrier);
INSTANTIATE_SERIALISE_TYPE(VkMemoryBarrier2);
INSTANTIATE_SERIALISE_TYPE(VkMemoryBarrierAccessFlags3KHR);
INSTANTIATE_SERIALISE_TYPE(VkMemoryDedicatedAllocateInfo);
INSTANTIATE_SERIALISE_TYPE(VkMemoryDedicatedRequirements);
INSTANTIATE_SERIALISE_TYPE(VkMemoryFdPropertiesKHR);
@@ -14519,6 +14554,7 @@ INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMaintenance6FeaturesKHR);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMaintenance6PropertiesKHR);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMaintenance7FeaturesKHR);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMaintenance7PropertiesKHR);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMaintenance8FeaturesKHR);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMemoryBudgetPropertiesEXT);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMemoryPriorityFeaturesEXT);
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMemoryProperties2);
+9
View File
@@ -4119,6 +4119,15 @@ rdcstr DoStringise(const VkAccessFlagBits2 &el)
END_BITFIELD_STRINGISE();
}
template <>
rdcstr DoStringise(const VkAccessFlagBits3KHR &el)
{
BEGIN_BITFIELD_STRINGISE(VkAccessFlagBits3KHR);
{
}
END_BITFIELD_STRINGISE();
}
template <>
rdcstr DoStringise(const VkFormatFeatureFlagBits2 &el)
{
@@ -3557,6 +3557,13 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
CHECK_PHYS_EXT_FEATURE(maintenance7);
}
END_PHYS_EXT_CHECK();
BEGIN_PHYS_EXT_CHECK(VkPhysicalDeviceMaintenance8FeaturesKHR,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_8_FEATURES_KHR);
{
CHECK_PHYS_EXT_FEATURE(maintenance8);
}
END_PHYS_EXT_CHECK();
}
if(availFeatures.depthClamp)