diff options
author | Rob Clark <[email protected]> | 2016-11-23 12:21:38 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-11-30 12:25:48 -0500 |
commit | 728e2c4d38b2c03ad1fdc997bef70e646ada9fe4 (patch) | |
tree | a70a1dcba9644c3c8582cd696d4d6a274dd220a6 /src/gallium/drivers/freedreno/a3xx | |
parent | 7a591572876afdd4d3e38416f3148cfe99ea5bbf (diff) |
freedreno/ir3: don't offset inloc by 8
On a3xx/a4xx, the SP_VS_VPC_DST_REG.OUTLOCn is offset by 8, so we used
to add this offset into fs->inputs[n].inloc. But a5xx drops this extra
offset-by-8. So instead make inloc zero based and add the offset when
we emit OUTLOCn values (for the gen's that need the offset).
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_program.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_program.c b/src/gallium/drivers/freedreno/a3xx/fd3_program.c index e72d432c6ca..f43d5c47ce0 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_program.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_program.c @@ -299,10 +299,10 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit, OUT_PKT0(ring, REG_A3XX_SP_VS_VPC_DST_REG(i), 1); - reg |= A3XX_SP_VS_VPC_DST_REG_OUTLOC0(l.var[j++].loc); - reg |= A3XX_SP_VS_VPC_DST_REG_OUTLOC1(l.var[j++].loc); - reg |= A3XX_SP_VS_VPC_DST_REG_OUTLOC2(l.var[j++].loc); - reg |= A3XX_SP_VS_VPC_DST_REG_OUTLOC3(l.var[j++].loc); + reg |= A3XX_SP_VS_VPC_DST_REG_OUTLOC0(l.var[j++].loc + 8); + reg |= A3XX_SP_VS_VPC_DST_REG_OUTLOC1(l.var[j++].loc + 8); + reg |= A3XX_SP_VS_VPC_DST_REG_OUTLOC2(l.var[j++].loc + 8); + reg |= A3XX_SP_VS_VPC_DST_REG_OUTLOC3(l.var[j++].loc + 8); OUT_RING(ring, reg); } @@ -391,10 +391,7 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit, */ unsigned compmask = fp->inputs[j].compmask; - /* TODO might be cleaner to just +8 in SP_VS_VPC_DST_REG - * instead.. rather than -8 everywhere else.. - */ - uint32_t inloc = fp->inputs[j].inloc - 8; + uint32_t inloc = fp->inputs[j].inloc; if ((fp->inputs[j].interpolate == INTERP_MODE_FLAT) || (fp->inputs[j].rasterflat && emit->rasterflat)) { |