-
Iago Toral authored
When we look back for a previous uniform definition we want to start looking from the current position of the cursor, not the end of the current block. The latter only works when translating from NIR, since in that case both always match, but any optimization pass may rewrite code and emit uniforms at any place in the middle of the program. Also, ntq_store_dest expects result to be written by the last instruction to handle the case where it is stored to a NIR register. That won't be the case if the result comes from an optimized uniform, so in that case we need to insert a MOV, like we do in non-uniform control flow. v2: fix ntq_store_dest for optimized uniforms. Fixes: 14af7b30 ('broadcom/compiler: don't emit redundant ldunif') Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Acked-by: Eric Anholt <eric@anholt.net> Part-of: <!9128>
e20ae149