Mesa (gallium-0.1): tgsi: Backport tgsi_ureg to gallium-0.1.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue Aug 18 14:26:08 UTC 2009


Module: Mesa
Branch: gallium-0.1
Commit: 235a6986038224e64558ee35436aa6780ea07554
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=235a6986038224e64558ee35436aa6780ea07554

Author: José Fonseca <jfonseca at vmware.com>
Date:   Mon Aug 17 17:49:34 2009 +0100

tgsi: Backport tgsi_ureg to gallium-0.1.

---

 src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h |    8 ++++----
 src/gallium/auxiliary/tgsi/tgsi_ureg.c       |   13 ++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
index ed594a3..58397e1 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
@@ -112,11 +112,11 @@ OP12(DP2)
 OP12_TEX(TXL)
 OP00(BRK)
 OP01_LBL(IF)
-OP11(BGNFOR)
+OP11(LOOP)
 OP01(REP)
 OP00_LBL(ELSE)
 OP00(ENDIF)
-OP10(ENDFOR)
+OP10(ENDLOOP)
 OP00(ENDREP)
 OP01(PUSHA)
 OP10(POPA)
@@ -136,9 +136,9 @@ OP12_TEX(TXQ)
 OP00(CONT)
 OP00(EMIT)
 OP00(ENDPRIM)
-OP00_LBL(BGNLOOP)
+OP00_LBL(BGNLOOP2)
 OP00(BGNSUB)
-OP00_LBL(ENDLOOP)
+OP00_LBL(ENDLOOP2)
 OP00(ENDSUB)
 OP11(NOISE1)
 OP11(NOISE2)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index 1a42f47..6c450f6 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
@@ -42,7 +42,7 @@ union tgsi_any_token {
    struct tgsi_declaration_range decl_range;
    struct tgsi_declaration_semantic decl_semantic;
    struct tgsi_immediate imm;
-   union  tgsi_immediate_data imm_data;
+   struct tgsi_immediate_float32 imm_data;
    struct tgsi_instruction insn;
    struct tgsi_instruction_ext_nv insn_ext_nv;
    struct tgsi_instruction_ext_label insn_ext_label;
@@ -518,10 +518,9 @@ ureg_emit_insn(struct ureg_program *ureg,
    out = get_tokens( ureg, DOMAIN_INSN, 1 );
    out[0].value = 0;
    out[0].insn.Type = TGSI_TOKEN_TYPE_INSTRUCTION;
-   out[0].insn.NrTokens = 0;
+   out[0].insn.Size = 0;
    out[0].insn.Opcode = opcode;
    out[0].insn.Saturate = saturate;
-   out[0].insn.NrTokens = 0;
    out[0].insn.NumDstRegs = num_dst;
    out[0].insn.NumSrcRegs = num_src;
    out[0].insn.Padding = 0;
@@ -572,7 +571,7 @@ ureg_fixup_insn_size(struct ureg_program *ureg,
 {
    union tgsi_any_token *out = retrieve_token( ureg, DOMAIN_INSN, insn );
 
-   out->insn.NrTokens = ureg->domain[DOMAIN_INSN].count - insn - 1;
+   out->insn.Size = ureg->domain[DOMAIN_INSN].count - insn - 1;
 }
 
 
@@ -590,7 +589,7 @@ static void emit_decl( struct ureg_program *ureg,
 
    out[0].value = 0;
    out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION;
-   out[0].decl.NrTokens = 3;
+   out[0].decl.Size = 3;
    out[0].decl.File = file;
    out[0].decl.UsageMask = TGSI_WRITEMASK_XYZW; /* FIXME! */
    out[0].decl.Interpolate = interp;
@@ -616,7 +615,7 @@ static void emit_decl_range( struct ureg_program *ureg,
 
    out[0].value = 0;
    out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION;
-   out[0].decl.NrTokens = 2;
+   out[0].decl.Size = 2;
    out[0].decl.File = file;
    out[0].decl.UsageMask = 0xf;
    out[0].decl.Interpolate = TGSI_INTERPOLATE_CONSTANT;
@@ -634,7 +633,7 @@ static void emit_immediate( struct ureg_program *ureg,
 
    out[0].value = 0;
    out[0].imm.Type = TGSI_TOKEN_TYPE_IMMEDIATE;
-   out[0].imm.NrTokens = 5;
+   out[0].imm.Size = 5;
    out[0].imm.DataType = TGSI_IMM_FLOAT32;
    out[0].imm.Padding = 0;
    out[0].imm.Extended = 0;




More information about the mesa-commit mailing list