tu: VK_EXT_extended_dynamic_state3 boilerplate
authorConnor Abbott <cwabbott0@gmail.com>
Thu, 29 Sep 2022 10:51:40 +0000 (12:51 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 3 Nov 2022 21:59:42 +0000 (21:59 +0000)
Enable the extension but don't enable anything yet.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18912>

src/freedreno/vulkan/tu_device.c

index 83f782635b4d334b09a9af3556026f849d2fee05..8d4702b3fb1287066c814c1f9fad2c07b3dd44d9 100644 (file)
@@ -190,6 +190,7 @@ get_device_extensions(const struct tu_physical_device *device,
       .EXT_descriptor_indexing = true,
       .EXT_extended_dynamic_state = true,
       .EXT_extended_dynamic_state2 = true,
+      .EXT_extended_dynamic_state3 = true,
       .EXT_filter_cubic = device->info->a6xx.has_tex_filter_cubic,
       .EXT_global_priority = true,
       .EXT_global_priority_query = true,
@@ -757,6 +758,42 @@ tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
          features->extendedDynamicState2PatchControlPoints = true;
          break;
       }
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT: {
+         VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *features =
+            (VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *)ext;
+         features->extendedDynamicState3PolygonMode = false;
+         features->extendedDynamicState3TessellationDomainOrigin = false;
+         features->extendedDynamicState3DepthClampEnable = false;
+         features->extendedDynamicState3DepthClipEnable = false;
+         features->extendedDynamicState3LogicOpEnable = false;
+         features->extendedDynamicState3SampleMask = false;
+         features->extendedDynamicState3RasterizationSamples = false;
+         features->extendedDynamicState3AlphaToCoverageEnable = false;
+         features->extendedDynamicState3AlphaToOneEnable = false;
+         features->extendedDynamicState3DepthClipNegativeOneToOne = false;
+         features->extendedDynamicState3RasterizationStream = false;
+         features->extendedDynamicState3ConservativeRasterizationMode = false;
+         features->extendedDynamicState3ExtraPrimitiveOverestimationSize = false;
+         features->extendedDynamicState3LineRasterizationMode = false;
+         features->extendedDynamicState3LineStippleEnable = false;
+         features->extendedDynamicState3ProvokingVertexMode = false;
+         features->extendedDynamicState3SampleLocationsEnable = false;
+         features->extendedDynamicState3ColorBlendEnable = false;
+         features->extendedDynamicState3ColorBlendEquation = false;
+         features->extendedDynamicState3ColorWriteMask = false;
+         features->extendedDynamicState3ViewportWScalingEnable = false;
+         features->extendedDynamicState3ViewportSwizzle = false;
+         features->extendedDynamicState3ShadingRateImageEnable = false;
+         features->extendedDynamicState3CoverageToColorEnable = false;
+         features->extendedDynamicState3CoverageToColorLocation = false;
+         features->extendedDynamicState3CoverageModulationMode = false;
+         features->extendedDynamicState3CoverageModulationTableEnable = false;
+         features->extendedDynamicState3CoverageModulationTable = false;
+         features->extendedDynamicState3CoverageReductionMode = false;
+         features->extendedDynamicState3RepresentativeFragmentTestEnable = false;
+         features->extendedDynamicState3ColorBlendAdvanced = false;
+         break;
+      }
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR: {
          VkPhysicalDevicePerformanceQueryFeaturesKHR *feature =
             (VkPhysicalDevicePerformanceQueryFeaturesKHR *)ext;
@@ -1387,6 +1424,12 @@ tu_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
          props->graphicsPipelineLibraryIndependentInterpolationDecoration = true;
          break;
       }
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT: {
+         VkPhysicalDeviceExtendedDynamicState3PropertiesEXT *properties =
+            (VkPhysicalDeviceExtendedDynamicState3PropertiesEXT *)ext;
+         properties->dynamicPrimitiveTopologyUnrestricted = true;
+         break;
+      }
       default:
          break;
       }