anv: limit vertex buffers to 31

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>
This commit is contained in:
Lionel Landwerlin
2017-01-29 02:44:32 +00:00
parent 9c45bb731c
commit 98cf60a3ce
3 changed files with 4 additions and 4 deletions

View 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,

View 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

View 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 */