summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/ir3/ir3_shader.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-11-23 12:21:38 -0500
committerRob Clark <[email protected]>2016-11-30 12:25:48 -0500
commit728e2c4d38b2c03ad1fdc997bef70e646ada9fe4 (patch)
treea70a1dcba9644c3c8582cd696d4d6a274dd220a6 /src/gallium/drivers/freedreno/ir3/ir3_shader.h
parent7a591572876afdd4d3e38416f3148cfe99ea5bbf (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/ir3/ir3_shader.h')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_shader.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.h b/src/gallium/drivers/freedreno/ir3/ir3_shader.h
index c46b4522e3c..c603168a04b 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_shader.h
+++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.h
@@ -181,16 +181,10 @@ struct ir3_shader_variant {
uint8_t regid;
uint8_t compmask;
uint8_t ncomp;
- /* In theory inloc of fs should match outloc of vs. Or
- * rather the outloc of the vs is 8 plus the offset passed
- * to bary.f. Presumably that +8 is to account for
- * gl_Position/gl_PointSize?
- *
- * NOTE inloc is currently aligned to 4 (we don't try
- * to pack varyings). Changing this would likely break
- * assumptions in few places (like setting up of flat
- * shading in fd3_program) so be sure to check all the
- * spots where inloc is used.
+ /* location of input (ie. offset passed to bary.f, etc). This
+ * matches the SP_VS_VPC_DST_REG.OUTLOCn value (a3xx and a4xx
+ * have the OUTLOCn value offset by 8, presumably to account
+ * for gl_Position/gl_PointSize)
*/
uint8_t inloc;
/* vertex shader specific: */