dzn: Fix vertex input handling
authorBoris Brezillon <boris.brezillon@collabora.com>
Wed, 8 Jun 2022 10:42:16 +0000 (03:42 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 8 Jun 2022 15:17:05 +0000 (15:17 +0000)
commit77c81357f478f953ac019fde862629cf1746663d
treef4fdf45295290e41941d40546fd748d55ad26cb9
parent4f1cb63bf38fec52356b59731a97d1282a924591
dzn: Fix vertex input handling

Vertex shaders are allowed to define input variables pointing to the
same location but a different, or even variables that overlap other
variables, as long as only one of them is used in a shader invocation.

One way to support that case would be to merge overlapping variables,
but we can also declare one input element per variable, and make those
point to the same input slot/offset. The only limitation with the
second approach is the maximum number of VS input registers, meaning
that only (32 - num_sysvals) input variables can be defined.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16221>
src/microsoft/vulkan/dzn_pipeline.c