Fixed arb1 version of ps_1_1 TEXLD opcode.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 16 Apr 2012 23:46:42 -0400
changeset 1089 b965d0942dff
parent 1088 d2c20b029834
child 1090 636ffcd3f14a
Fixed arb1 version of ps_1_1 TEXLD opcode.
mojoshader.c
--- a/mojoshader.c	Sun Apr 15 05:52:03 2012 -0400
+++ b/mojoshader.c	Mon Apr 16 23:46:42 2012 -0400
@@ -5422,12 +5422,9 @@
     {
         // Note that this code counts on the register not having swizzles, etc.
         DestArgInfo *info = &ctx->dest_arg;
-        char regnum_str[16];
-        const char *dst = get_ARB1_register_string(ctx, info->regtype,
-                                                   info->regnum, regnum_str,
-                                                   sizeof (regnum_str));
-        output_line(ctx, "TEX %s%s, %s%s, texture[%d], 2D;",
-                    dst, regnum_str, dst, regnum_str, info->regnum);
+        char dst[64]; get_ARB1_destarg_varname(ctx, dst, sizeof (dst));
+        output_line(ctx, "TEX %s, %s, texture[%d], 2D;",
+                    dst, dst, info->regnum);
         return;
     } // if