mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Add support for VK_EXT_image_2d_view_of_3d
This commit is contained in:
@@ -692,6 +692,21 @@ bool VulkanPipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const bin
|
||||
|
||||
viewdetails = true;
|
||||
}
|
||||
|
||||
if(tex->depth > 1 && ((tex->depth != view.numSlices && view.numSlices > 0) || view.firstSlice > 0))
|
||||
{
|
||||
if(view.numSlices == 1)
|
||||
text += tr("The texture has %1 3D slices, the view covers slice %2.\n")
|
||||
.arg(tex->depth)
|
||||
.arg(view.firstSlice);
|
||||
else
|
||||
text += tr("The texture has %1 3D slices, the view covers slices %2-%3.\n")
|
||||
.arg(tex->depth)
|
||||
.arg(view.firstSlice)
|
||||
.arg(view.firstSlice + view.numSlices);
|
||||
|
||||
viewdetails = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(minLOD(view) != 0.0f)
|
||||
|
||||
@@ -1180,6 +1180,7 @@ DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceGroupProperties);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceHostQueryResetFeatures);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceIDProperties);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceImage2DViewOf3DFeaturesEXT);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceImageFormatInfo2);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceImagelessFramebufferFeatures);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceImageRobustnessFeatures);
|
||||
@@ -1587,6 +1588,7 @@ DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceGroupProperties);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceHostQueryResetFeatures);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceIDProperties);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceImage2DViewOf3DFeaturesEXT);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceImageFormatInfo2);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceImagelessFramebufferFeatures);
|
||||
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceImageRobustnessFeatures);
|
||||
|
||||
@@ -1005,6 +1005,9 @@ static const VkExtensionProperties supportedExtensions[] = {
|
||||
{
|
||||
VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME, VK_EXT_HOST_QUERY_RESET_SPEC_VERSION,
|
||||
},
|
||||
{
|
||||
VK_EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME, VK_EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION,
|
||||
},
|
||||
{
|
||||
VK_EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME, VK_EXT_IMAGE_ROBUSTNESS_SPEC_VERSION,
|
||||
},
|
||||
|
||||
@@ -305,6 +305,8 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES, \
|
||||
VkPhysicalDeviceHostQueryResetFeatures); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES, VkPhysicalDeviceIDProperties); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT, \
|
||||
VkPhysicalDeviceImage2DViewOf3DFeaturesEXT); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, \
|
||||
VkPhysicalDeviceImageFormatInfo2); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT, \
|
||||
@@ -915,7 +917,6 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT: \
|
||||
|
||||
@@ -2159,6 +2159,9 @@ void VulkanReplay::SavePipelineState(uint32_t eventId)
|
||||
destSlots.binds[a].numMips = c.m_ImageView[viewid].range.levelCount;
|
||||
destSlots.binds[a].numSlices = c.m_ImageView[viewid].range.layerCount;
|
||||
|
||||
if(c.m_ImageView[viewid].viewType == VK_IMAGE_VIEW_TYPE_3D)
|
||||
destSlots.binds[a].firstSlice = destSlots.binds[a].numSlices = 0;
|
||||
|
||||
// temporary hack, store image layout enum in byteOffset as it's not used for images
|
||||
destSlots.binds[a].byteOffset = convert(srcel.imageLayout);
|
||||
|
||||
|
||||
@@ -724,6 +724,10 @@ SERIALISE_VK_HANDLES();
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES, \
|
||||
VkPhysicalDeviceHostQueryResetFeatures) \
|
||||
\
|
||||
/* VK_EXT_image_2d_view_of_3d */ \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT, \
|
||||
VkPhysicalDeviceImage2DViewOf3DFeaturesEXT) \
|
||||
\
|
||||
/* VK_EXT_image_robustness */ \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES, \
|
||||
VkPhysicalDeviceImageRobustnessFeatures) \
|
||||
@@ -1476,9 +1480,6 @@ SERIALISE_VK_HANDLES();
|
||||
/* VK_EXT_headless_surface */ \
|
||||
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT) \
|
||||
\
|
||||
/* VK_EXT_image_2d_view_of_3d */ \
|
||||
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT) \
|
||||
\
|
||||
/* VK_EXT_image_sliced_view_of_3d */ \
|
||||
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT) \
|
||||
PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT) \
|
||||
@@ -6835,6 +6836,23 @@ void Deserialise(const VkImageFormatListCreateInfo &el)
|
||||
delete[] el.pViewFormats;
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, VkPhysicalDeviceImage2DViewOf3DFeaturesEXT &el)
|
||||
{
|
||||
RDCASSERT(ser.IsReading() ||
|
||||
el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT);
|
||||
SerialiseNext(ser, el.sType, el.pNext);
|
||||
|
||||
SERIALISE_MEMBER(image2DViewOf3D);
|
||||
SERIALISE_MEMBER(sampler2DViewOf3D);
|
||||
}
|
||||
|
||||
template <>
|
||||
void Deserialise(const VkPhysicalDeviceImage2DViewOf3DFeaturesEXT &el)
|
||||
{
|
||||
DeserialiseNext(el.pNext);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, VkPhysicalDeviceImageRobustnessFeatures &el)
|
||||
{
|
||||
@@ -11462,6 +11480,7 @@ INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT)
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceGroupProperties);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceHostQueryResetFeatures);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceIDProperties);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceImage2DViewOf3DFeaturesEXT);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceImageFormatInfo2);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceImagelessFramebufferFeatures);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceImageRobustnessFeatures);
|
||||
|
||||
@@ -3104,6 +3104,14 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
|
||||
m_DynAttachmentLoop = ext->attachmentFeedbackLoopDynamicState != VK_FALSE;
|
||||
}
|
||||
END_PHYS_EXT_CHECK();
|
||||
|
||||
BEGIN_PHYS_EXT_CHECK(VkPhysicalDeviceImage2DViewOf3DFeaturesEXT,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT);
|
||||
{
|
||||
CHECK_PHYS_EXT_FEATURE(image2DViewOf3D);
|
||||
CHECK_PHYS_EXT_FEATURE(sampler2DViewOf3D);
|
||||
}
|
||||
END_PHYS_EXT_CHECK();
|
||||
}
|
||||
|
||||
if(availFeatures.depthClamp)
|
||||
|
||||
Reference in New Issue
Block a user