On 10/08/2012 09:32 AM, Eric Anholt wrote:
Kenneth Graunke <kenn...@whitecape.org> writes:

On 10/04/2012 04:07 PM, Eric Anholt wrote:
This should improve our ability to register allocate without spilling.
Unfortuantely, due to the live variable analysis being ignorant of loops, we
still have register allocation failures on some programs.
---
   src/mesa/drivers/dri/i965/brw_vec4.cpp      |   54 
+++++++++++++++++++++++++++
   src/mesa/drivers/dri/i965/brw_vec4.h        |    1 +
   src/mesa/drivers/dri/i965/brw_vec4_emit.cpp |    1 +
   3 files changed, 56 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp 
b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 2941729..fbd49ca 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -865,4 +865,58 @@ vec4_visitor::opt_compute_to_mrf()
      return progress;
   }

+/**
+ * Splits virtual GRFs requesting more than one contiguous physical register.
+ *
+ * Unlike in the FS visitor, we have no SEND messages that return more than 1
+ * register.  We also don't do any array access in register space, which would
+ * have required contiguous physical registers.
+ */

It would be nice to mention what the VS /does/ have that occupies VGRFs
of size > 1.  Structures and matrices?

Otherwise, this looks good.
Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>

New function comment:

/**
  * Splits virtual GRFs requesting more than one contiguous physical register.
  *
  * We initially create large virtual GRFs for temporary structures, arrays,
  * and matrices, so that the dereference visitor functions can add reg_offsets
  * to work their way down to the actual member being accessed.
  *
  * Unlike in the FS visitor, though, we have no SEND messages that return more
  * than 1 register.  We also don't do any array access in register space,
  * which would have required contiguous physical registers.  Thus, all those
  * large virtual GRFs can be split up into independent single-register virtual
  * GRFs, making allocation and optimization easier.
  */

Perfect, thank you!
Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to