Commit aabd085d by Alexis Hetu Committed by Alexis Hétu

Support for VK_KHR_separate_depth_stencil_layouts

This cl adds support for the VK_KHR_separate_depth_stencil_layouts. It doesn't add any new functionality, since SwiftShader has historically supported quad layout stencil and non quad layout depth. Bug: b/148881874 Change-Id: I6ed77ee1261bfda1468595474cf0840564f2553d Tests: dEQP-VK.* Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/41068 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
parent 9f8337e6
......@@ -158,6 +158,11 @@ void PhysicalDevice::getFeatures(VkPhysicalDeviceShaderDrawParameterFeatures *fe
features->shaderDrawParameters = VK_FALSE;
}
void PhysicalDevice::getFeatures(VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR* features) const
{
features->separateDepthStencilLayouts = VK_TRUE;
}
void PhysicalDevice::getFeatures(VkPhysicalDeviceLineRasterizationFeaturesEXT *features) const
{
features->rectangularLines = VK_TRUE;
......
......@@ -43,6 +43,7 @@ public:
void getFeatures(VkPhysicalDeviceProtectedMemoryFeatures *features) const;
void getFeatures(VkPhysicalDeviceShaderDrawParameterFeatures *features) const;
void getFeatures(VkPhysicalDeviceLineRasterizationFeaturesEXT *features) const;
void getFeatures(VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR* features) const;
void getFeatures(VkPhysicalDeviceProvokingVertexFeaturesEXT *features) const;
bool hasFeatures(const VkPhysicalDeviceFeatures &requestedFeatures) const;
......
......@@ -312,6 +312,7 @@ static const VkExtensionProperties deviceExtensionProperties[] = {
{ VK_KHR_MULTIVIEW_EXTENSION_NAME, VK_KHR_MULTIVIEW_SPEC_VERSION },
{ VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME, VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION },
{ VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME, VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION },
{ VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME, VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_SPEC_VERSION },
// Only 1.1 core version of this is supported. The extension has additional requirements
//{ VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION },
{ VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME, VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION },
......@@ -713,6 +714,14 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, c
}
}
break;
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR:
{
const VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR* shaderDrawParametersFeatures = reinterpret_cast<const VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR*>(extensionCreateInfo);
// Separate depth and stencil layouts is already supported
(void)(shaderDrawParametersFeatures->separateDepthStencilLayouts);
}
break;
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT:
{
const VkPhysicalDeviceLineRasterizationFeaturesEXT *lineRasterizationFeatures = reinterpret_cast<const VkPhysicalDeviceLineRasterizationFeaturesEXT *>(extensionCreateInfo);
......@@ -2746,6 +2755,12 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2(VkPhysicalDevice physica
vk::Cast(physicalDevice)->getFeatures(features);
}
break;
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR:
{
auto features = reinterpret_cast<VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR*>(extensionFeatures);
vk::Cast(physicalDevice)->getFeatures(features);
}
break;
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT:
{
auto features = reinterpret_cast<VkPhysicalDeviceLineRasterizationFeaturesEXT *>(extensionFeatures);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment