Previously, we weren't handling reladdr at all. However, this was ok, because we had already marked everything that's ever touched indirectly as push so that was ignored. As soon as we start using indirect push constants, this will no longer be true so the liveness calculations will need to be correct. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index b4003e0..d321684 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1827,9 +1827,18 @@ fs_visitor::assign_constant_locations() if (inst->src[i].file != UNIFORM) continue; - int constant_nr = inst->src[i].reg + inst->src[i].reg_offset; - if (constant_nr >= 0 && constant_nr < (int) uniforms) - is_live[constant_nr] = true; + if (inst->src[i].reladdr) { + int uniform = inst->src[i].reg; + + for (int j = uniform; j < uniform + param_size[uniform]; j++) { + if (j >= 0 && j < (int) uniforms) + is_live[j] = true; + } + } else { + int constant_nr = inst->src[i].reg + inst->src[i].reg_offset; + if (constant_nr >= 0 && constant_nr < (int) uniforms) + is_live[constant_nr] = true; + } } } -- 2.4.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev