anv: limit vertex buffers to 31
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sun, 29 Jan 2017 02:44:32 +0000 (02:44 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 2 Feb 2017 01:32:39 +0000 (01:32 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_pipeline.c

index 27f06ac02c6795ae56b912806581015d61172e78..3403dc126aa5441bdf1be765a31d15fc6837f138 100644 (file)
@@ -562,8 +562,8 @@ void anv_GetPhysicalDeviceProperties(
       .maxDescriptorSetSampledImages            = 256,
       .maxDescriptorSetStorageImages            = 256,
       .maxDescriptorSetInputAttachments         = 256,
-      .maxVertexInputAttributes                 = 32,
-      .maxVertexInputBindings                   = 32,
+      .maxVertexInputAttributes                 = MAX_VBS,
+      .maxVertexInputBindings                   = MAX_VBS,
       .maxVertexInputAttributeOffset            = 2047,
       .maxVertexInputBindingStride              = 2048,
       .maxVertexOutputComponents                = 128,
index a0cb35ccccb26faab15dcdd2f7ed017ecc94af47..1cf33b76c64a8fde1b6e0d6907244c2899c043a3 100644 (file)
@@ -87,7 +87,7 @@ extern "C" {
  */
 #define ANV_HZ_FC_VAL 1.0f
 
-#define MAX_VBS         32
+#define MAX_VBS         31
 #define MAX_SETS         8
 #define MAX_RTS          8
 #define MAX_VIEWPORTS   16
index 9d28466f796ff9687913fce99b674d05d44b42e8..d3a9d4302e54f38f05920e12b31723e3a81c4176 100644 (file)
@@ -133,7 +133,7 @@ emit_vertex_input(struct anv_pipeline *pipeline,
                                                   VK_IMAGE_ASPECT_COLOR_BIT,
                                                   VK_IMAGE_TILING_LINEAR);
 
-      assert(desc->binding < 32);
+      assert(desc->binding < MAX_VBS);
 
       if ((elements & (1 << desc->location)) == 0)
          continue; /* Binding unused */