Mesa (main): lavapipe: add support for null-descriptors from EXT_robustness2

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 10 21:08:02 UTC 2022


Module: Mesa
Branch: main
Commit: 8c8d08a8b811eca055b4cfda7d8d281d4adca825
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8c8d08a8b811eca055b4cfda7d8d281d4adca825

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed Apr 21 11:12:35 2021 +0200

lavapipe: add support for null-descriptors from EXT_robustness2

Mike says this should be enough for full support, so let's see ;)

Nope, no robust image or buffer access implemented yet.

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137>

---

 src/gallium/frontends/lavapipe/lvp_device.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c
index 2349fef91c9..3beb16eb4a3 100644
--- a/src/gallium/frontends/lavapipe/lvp_device.c
+++ b/src/gallium/frontends/lavapipe/lvp_device.c
@@ -174,6 +174,7 @@ static const struct vk_device_extension_table lvp_device_extensions_supported =
    .EXT_custom_border_color               = true,
    .EXT_provoking_vertex                  = true,
    .EXT_line_rasterization                = true,
+   .EXT_robustness2                       = true,
    .GOOGLE_decorate_string                = true,
    .GOOGLE_hlsl_functionality1            = true,
 };
@@ -934,6 +935,13 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceFeatures2(
          features->robustImageAccess = true;
          break;
       }
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT: {
+         VkPhysicalDeviceRobustness2FeaturesEXT *features = (VkPhysicalDeviceRobustness2FeaturesEXT *)ext;
+         features->robustBufferAccess2 = false;
+         features->robustImageAccess2 = false;
+         features->nullDescriptor = true;
+         break;
+      }
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: {
          VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *features = (VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *)ext;
          features->primitiveTopologyListRestart = true;
@@ -1266,6 +1274,13 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceProperties2(
          props->graphicsPipelineLibraryIndependentInterpolationDecoration = VK_TRUE;
          break;
       }
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT: {
+         VkPhysicalDeviceRobustness2PropertiesEXT *props =
+            (VkPhysicalDeviceRobustness2PropertiesEXT *)ext;
+         props->robustStorageBufferAccessSizeAlignment = 1;
+         props->robustUniformBufferAccessSizeAlignment = 1;
+         break;
+      }
       default:
          break;
       }



More information about the mesa-commit mailing list