r600g/sb: fix value::is_fixed()
authorVadim Girlin <vadimgirlin@gmail.com>
Tue, 29 Oct 2013 01:49:21 +0000 (05:49 +0400)
committerVadim Girlin <vadimgirlin@gmail.com>
Tue, 29 Oct 2013 01:49:21 +0000 (05:49 +0400)
This prevents unnecessary (and wrong) register allocation in the
scheduler for preloaded values in fixed registers.

Fixes interpolation-mixed.shader_test on rv770
(and probably on all other pre-evergreen chips).

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
src/gallium/drivers/r600/sb/sb_valtable.cpp

index 00aee66f25b82288e8991899864812b632eca6d9..0d39e9c3f0302caa25f59277fe3d62c5ae1b9171 100644 (file)
@@ -255,8 +255,8 @@ void value::set_prealloc() {
 bool value::is_fixed() {
        if (array && array->gpr)
                return true;
-       if (chunk)
-               return chunk->is_fixed();
+       if (chunk && chunk->is_fixed())
+               return true;
        return flags & VLF_FIXED;
 }