nouveau: codegen: gk110: Make emitSTORE offset handling identical to emitLOAD
authorHans de Goede <hdegoede@redhat.com>
Tue, 15 Mar 2016 13:37:27 +0000 (14:37 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 21 Mar 2016 11:20:38 +0000 (12:20 +0100)
Make the store offset handling in CodeEmitterGK110::emitSTORE identical
to the one in CodeEmitterGK110::emitLOAD handling.

This is just a cleanup, it does not cause any functional changes.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp

index 0d7d95e3105f7a65be39f391877075876e8d580e..70f3c3f69fff9532dec49d357e31660b94340bf8 100644 (file)
@@ -1655,10 +1655,8 @@ CodeEmitterGK110::emitSTORE(const Instruction *i)
       break;
    }
 
-   if (i->src(0).getFile() != FILE_MEMORY_GLOBAL)
-      offset &= 0xffffff;
-
    if (code[0] & 0x2) {
+      offset &= 0xffffff;
       emitLoadStoreType(i->dType, 0x33);
       if (i->src(0).getFile() == FILE_MEMORY_LOCAL)
          emitCachingMode(i->cache, 0x2f);