Mesa (main): anv: update limit for maxVertexInputBindingStride

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 10 10:46:56 UTC 2022


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

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Wed Feb  9 23:11:50 2022 +0200

anv: update limit for maxVertexInputBindingStride

Before:
	maxVertexInputBindingStride                     = 2048 (gen7+)

After:
	maxVertexInputBindingStride                     = 2048 (gen7/gen8)
	maxVertexInputBindingStride                     = 4095 (gen9+)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14958>

---

 src/intel/vulkan/anv_device.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 99fa3242ca5..32f1e1c070c 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1858,8 +1858,20 @@ void anv_GetPhysicalDeviceProperties(
       .maxDescriptorSetInputAttachments         = MAX_DESCRIPTOR_SET_INPUT_ATTACHMENTS,
       .maxVertexInputAttributes                 = MAX_VBS,
       .maxVertexInputBindings                   = MAX_VBS,
+      /* Broadwell PRMs: Volume 2d: Command Reference: Structures:
+       *
+       * VERTEX_ELEMENT_STATE::Source Element Offset: [0,2047]
+       */
       .maxVertexInputAttributeOffset            = 2047,
-      .maxVertexInputBindingStride              = 2048,
+      /* Broadwell PRMs: Volume 2d: Command Reference: Structures:
+       *
+       * VERTEX_BUFFER_STATE::Buffer Pitch: [0,2048]
+       *
+       * Skylake PRMs: Volume 2d: Command Reference: Structures:
+       *
+       * VERTEX_BUFFER_STATE::Buffer Pitch: [0,4095]
+       */
+      .maxVertexInputBindingStride              = devinfo->ver < 9 ? 2048 : 4095,
       .maxVertexOutputComponents                = 128,
       .maxTessellationGenerationLevel           = 64,
       .maxTessellationPatchSize                 = 32,



More information about the mesa-commit mailing list