nouveau: codegen: combineLd/St do not combine indirect loads
authorHans de Goede <hdegoede@redhat.com>
Thu, 21 Apr 2016 13:43:51 +0000 (15:43 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 25 Apr 2016 09:45:07 +0000 (11:45 +0200)
commit787a53988cc6bb7a0f2b43c216837d683336b33f
treed686b44932ed464e6865a4cb231bec98588ba482
parent0831eb94b9adde3f1542ca75a1f80dbe165b8f31
nouveau: codegen: combineLd/St do not combine indirect loads

combineLd/St would combine, i.e. :

st  u32 # g[$r2+0x0] $r2
st  u32 # g[$r2+0x4] $r3

into:

st  u64 # g[$r2+0x0] $r2d

But this is only valid if r2 contains an 8 byte aligned address,
which is not guaranteed for compute shaders

This commit checks for src0 dim 0 not being indirect when combining
loads / stores as combining indirect loads / stores may break alignment
rules.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp