gallium/hud: always use two-dimensional constant references
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 23 Aug 2017 16:13:15 +0000 (18:13 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 4 Sep 2017 11:43:59 +0000 (13:43 +0200)
Acked-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/gallium/auxiliary/hud/hud_context.c

index 2deb48d18e7609ec8f72a4bebfc0a72921d183d1..ed2e8491143b5067a2321855a4c61ba0a8d83b9d 100644 (file)
@@ -1618,17 +1618,17 @@ hud_create(struct pipe_context *pipe, struct cso_context *cso)
          /* [0] = color,
           * [1] = (2/fb_width, 2/fb_height, xoffset, yoffset)
           * [2] = (xscale, yscale, 0, 0) */
-         "DCL CONST[0..2]\n"
+         "DCL CONST[0][0..2]\n"
          "DCL TEMP[0]\n"
          "IMM[0] FLT32 { -1, 0, 0, 1 }\n"
 
          /* v = in * (xscale, yscale) + (xoffset, yoffset) */
-         "MAD TEMP[0].xy, IN[0], CONST[2].xyyy, CONST[1].zwww\n"
+         "MAD TEMP[0].xy, IN[0], CONST[0][2].xyyy, CONST[0][1].zwww\n"
          /* pos = v * (2 / fb_width, 2 / fb_height) - (1, 1) */
-         "MAD OUT[0].xy, TEMP[0], CONST[1].xyyy, IMM[0].xxxx\n"
+         "MAD OUT[0].xy, TEMP[0], CONST[0][1].xyyy, IMM[0].xxxx\n"
          "MOV OUT[0].zw, IMM[0]\n"
 
-         "MOV OUT[1], CONST[0]\n"
+         "MOV OUT[1], CONST[0][0]\n"
          "MOV OUT[2], IN[1]\n"
          "END\n"
       };