On Tue, 2017-07-25 at 00:46 +0100, Lionel Landwerlin wrote: > On 21/07/17 09:26, Iago Toral Quiroga wrote: > > We were exposing 31 because the hardware allows for 33 and we need > > to reserve one vertex buffer to upload VertexIndex/InstanceIndex > > and > > another to upload DrawID when needed, however, there is another > > restriction in the hardware regarding the size of the VUE entries > > that limits this down to 30 (28 after VertexIndex and DrawID): > > Something's weird here in the description from the PRMs (sorry, not > your > fault). > EU limit of 128 GRFs should allow 32 vertex elements of 4 GRFs. > Looking at the PRMs, it seems the limits arises from the maximum > value > allowed in "Vertex URB Entry Read Length" in SIMD8, which is 15. > And 15 * 8 = 120 gives us a limit to 30 vertex elements. > > Is that a fair description?
Yeah, I copied the description from the PRMs but you are right, the limit comes from the vertex urb entry size. I'll update the commit log. Thanks! > > Than > > From 3DSTATE_VS, Vertex URB entry read length: > > > > "For SIMD8 dispatch, each vertex element requires 4 GRFs of > > payload data, therefore the number of GRFs with vertex data > > will > > be 8 times the value programmed in this field. The EU limit of > > 128 > > GRFs imposes a maximum limit of 30 elements per vertex pushed > > into > > the payload, though the pactical limit may be lower." > > > > There is an assertion in place to check that we don't exceed this > > limit > > and that is triggered when we expose more than 28 attributes and we > > have > > shaders that use more than 30 attributes in total (including > > VertexIndex/InstanceIndex and DrawID). > > --- > > src/intel/vulkan/anv_private.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/src/intel/vulkan/anv_private.h > > b/src/intel/vulkan/anv_private.h > > index 4dce360c76..f83f49b671 100644 > > --- a/src/intel/vulkan/anv_private.h > > +++ b/src/intel/vulkan/anv_private.h > > @@ -89,7 +89,7 @@ struct gen_l3_config; > > */ > > #define ANV_HZ_FC_VAL 1.0f > > > > -#define MAX_VBS 31 > > +#define MAX_VBS 28 > > #define MAX_SETS 8 > > #define MAX_RTS 8 > > #define MAX_VIEWPORTS 16 > > > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev