i965: Use 32 bit u_bit_scan for vertex attribute setup.
authorMathias Fröhlich <mathias.froehlich@web.de>
Sat, 20 Apr 2019 05:57:12 +0000 (07:57 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 10 Mar 2020 14:28:37 +0000 (14:28 +0000)
commite1f2c84282bbcce9d7e94ac99d2ff1b3489f6e67
treed3c9eafa6a0a8565504f717a17be319234614e5d
parent0ea3ca3eca4c0c7ff3b41ff09e6cb30b532c8bc5
i965: Use 32 bit u_bit_scan for vertex attribute setup.

The vertex array object contains 32 vertex arrays. By that we cannot
reference more then these in the vertex shader inputs. So, we can use
the 32 bits u_bit_scan function to iterate the vertex shader inputs
and place an assert that only these are present. Also place an other
assert that the vertex array setup in i965 does not overrun the
enabled array in brw_context::vs::enabled.

v2: Style fixes.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>
src/mesa/drivers/dri/i965/brw_draw_upload.c