Handle feature structs of partially promoted extensions

dEQP-VK now passes VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT
and VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT
to vkGetPhysicalDeviceFeatures2(), but these feature structs are part of the
VK_EXT_ycbcr_2plane_444_formats and VK_EXT_extended_dynamic_state2
extensions, which we don't support. These extensions were partially
promoted to Vulkan 1.3, but not their feature structs.

This is a follow-up to https://swiftshader-review.googlesource.com/c/SwiftShader/+/67468,
which performed the same workaround, but for vkCreateDevice().

Bug: b/242264488
Change-Id: I4febb2979b9d524d6e61f5150c0523d629a07b1e
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/68169
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Commit-Queue: Alexis Hétu <sugoi@google.com>
diff --git a/src/Vulkan/VkPhysicalDevice.cpp b/src/Vulkan/VkPhysicalDevice.cpp
index 956ed7b..504ad19 100644
--- a/src/Vulkan/VkPhysicalDevice.cpp
+++ b/src/Vulkan/VkPhysicalDevice.cpp
@@ -620,6 +620,19 @@
 		case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT:
 			getPhysicalDeviceDepthClipControlFeaturesExt(reinterpret_cast<struct VkPhysicalDeviceDepthClipControlFeaturesEXT *>(curExtension));
 			break;
+		case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT:
+			// TODO(b/223499383): The format enums of VK_EXT_ycbcr_2plane_444_formats were promoted to Vulkan 1.3, but not this feature struct.
+			reinterpret_cast<struct VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *>(curExtension)->ycbcr2plane444Formats = VK_FALSE;
+			break;
+		case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT:
+			// TODO(b/204502923): VK_EXT_extended_dynamic_state2 was partially promoted to Vulkan 1.3, but not this feature struct.
+			{
+				auto features = reinterpret_cast<struct VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *>(curExtension);
+				features->extendedDynamicState2 = VK_TRUE;
+				features->extendedDynamicState2LogicOp = VK_FALSE;
+				features->extendedDynamicState2PatchControlPoints = VK_FALSE;
+			}
+			break;
 		case VK_STRUCTURE_TYPE_MAX_ENUM:  // TODO(b/176893525): This may not be legal. dEQP tests that this value is ignored.
 			break;
 		default: