freedreno/ir3: array offset can be negative
authorRob Clark <robclark@freedesktop.org>
Fri, 15 Jan 2016 23:22:40 +0000 (18:22 -0500)
committerRob Clark <robclark@freedesktop.org>
Sat, 16 Jan 2016 19:23:20 +0000 (14:23 -0500)
commit6a33c5c0dffce136bdc95daa2db2d3e9d3c1741f
treee8fe0fde1b2df33a17d9e08ca58035ca42c294be
parentddede497b831fb98e3540247b570968532cdacc9
freedreno/ir3: array offset can be negative

It at least happens with some piglit tests, like
$piglit/bin/vp-address-01

  VERT
  DCL IN[0]
  DCL IN[1]
  DCL OUT[0], POSITION
  DCL OUT[1], COLOR
  DCL CONST[0..7]
  DCL ADDR[0]
    0: ARL ADDR[0].x, IN[1].xxxx
    1: MOV_SAT OUT[1], CONST[ADDR[0].x-1]
    2: DP4 OUT[0].x, CONST[4], IN[0]
    3: DP4 OUT[0].y, CONST[5], IN[0]
    4: DP4 OUT[0].z, CONST[6], IN[0]
    5: DP4 OUT[0].w, CONST[7], IN[0]
    6: END

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/ir3/instr-a3xx.h
src/gallium/drivers/freedreno/ir3/ir3.c
src/gallium/drivers/freedreno/ir3/ir3.h
src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
src/gallium/drivers/freedreno/ir3/ir3_print.c