Mesa (master): tgsi: fix regression in indexed const lookups

Keith Whitwell keithw at kemper.freedesktop.org
Mon Jul 20 18:33:45 UTC 2009


Module: Mesa
Branch: master
Commit: 27a19be8d1c59c64240198261af348b868b101e4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=27a19be8d1c59c64240198261af348b868b101e4

Author: Keith Whitwell <keithw at vmware.com>
Date:   Mon Jul 20 19:28:34 2009 +0100

tgsi: fix regression in indexed const lookups

This function was calling get_input_base() and get_output_base() to
get the names of a couple of register to use as temps.  Those
functions no longer return registers, so adjust it to get the
registers elsewhere.

This change doesn't address the issue that it's a fairly poor way to
grab a register name by calling a function with an apparently
unrelated meaning.

---

 src/gallium/auxiliary/tgsi/tgsi_sse2.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_sse2.c b/src/gallium/auxiliary/tgsi/tgsi_sse2.c
index df49638..a4b86ab 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sse2.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sse2.c
@@ -269,12 +269,14 @@ emit_const(
       /* 'vec' is the offset from the address register's value.
        * We're loading CONST[ADDR+vec] into an xmm register.
        */
-      struct x86_reg r0 = get_input_base();
-      struct x86_reg r1 = get_output_base();
+      struct x86_reg r0 = get_immediate_base();
+      struct x86_reg r1 = get_coef_base();
       uint i;
 
       assert( indirectFile == TGSI_FILE_ADDRESS );
       assert( indirectIndex == 0 );
+      assert( r0.mod == mod_REG );
+      assert( r1.mod == mod_REG );
 
       x86_push( func, r0 );
       x86_push( func, r1 );




More information about the mesa-commit mailing list