freedreno/ir3: fix setup_input for sparse vertex inputs
authorJonathan Marek <jonathan@marek.ca>
Sat, 4 Jul 2020 15:46:02 +0000 (11:46 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 9 Jul 2020 23:30:33 +0000 (23:30 +0000)
commit9c23afebbe42ccef94bf0a5a9ec305de850fb098
treeb156302c18396d55b98732b1f13765edf9c2c9e9
parent8dfa072ed82df2224cbe9170728665a9b507a859
freedreno/ir3: fix setup_input for sparse vertex inputs

With turnip we can have sparse input variables like:

decl_var shader_in INTERP_MODE_NONE float @1 (VERT_ATTRIB_GENERIC1.x, 1, 0)
decl_var shader_in INTERP_MODE_NONE float @2 (VERT_ATTRIB_GENERIC1.y, 1, 0)
decl_var shader_in INTERP_MODE_NONE float @3 (VERT_ATTRIB_GENERIC1.w, 1, 0)

Example of a test fixed:

dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec2.as_float_float_unused

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5818>
src/freedreno/ir3/ir3_compiler_nir.c