brw: Fix geometry shaders with non-constant vertex indices

Geometry shaders load from separate handles for each vertex, so they
don't incorporate the vertex index in the URB offset like tessellation
shaders do.  This means we can have a constant offset (within a vertex's
section) but not have a constant vertex index.

Prior to 41d7debcfec we were emitting non-folded ALU so we thought the
offset was non-constant at this point.  Now we can properly detect
constant offsets...but still don't want to use push inputs for
non-constant vertex indices.

Fixes: 41d7debcfec ("brw: Use nir_imul_imm in per-vertex/per-primitive offset calculation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39603>
1 file changed