panfrost: Prepare attribute for builtins at state creation time
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 5 Mar 2020 18:40:15 +0000 (19:40 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Tue, 10 Mar 2020 11:47:34 +0000 (12:47 +0100)
commit4a2ee61a22f5b408a4ac5377b735df3d9d312f50
tree24926b1ff0d2c13022eae1ee952fab92505f4462
parentb692ab076a72be97bea6bc527ea1c2e55c5f4d3c
panfrost: Prepare attribute for builtins at state creation time

The attribute meta slots reserved for gl_VertexID and gl_InstanceID
can be pre-filled at state creation time. Only the index needs to be
adjusted when attributes are generated.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
src/gallium/drivers/panfrost/pan_attributes.c
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_context.h