summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/ir3
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-09-26 10:33:11 -0400
committerRob Clark <[email protected]>2014-09-27 13:34:07 -0400
commited48f91275f52f26b513fc2970233063bfa023af (patch)
tree6c845930cbfdca79d8a5c4eafc98b8037b1a505a /src/gallium/drivers/freedreno/ir3
parentdf2f0c6d5595280150281409b4a9aadb9311bfdc (diff)
freedreno/a3xx: add flat interpolation mode
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_compiler.c1
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_shader.h17
2 files changed, 15 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
index c6026bbe74a..c2d4942b66d 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
@@ -2380,6 +2380,7 @@ decl_in(struct ir3_compile_context *ctx, struct tgsi_full_declaration *decl)
so->inputs[n].compmask = (1 << ncomp) - 1;
so->inputs[n].regid = r;
so->inputs[n].inloc = ctx->next_inloc;
+ so->inputs[n].interpolate = decl->Interp.Interpolate;
for (j = 0; j < ncomp; j++) {
struct ir3_instruction *instr = NULL;
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.h b/src/gallium/drivers/freedreno/ir3/ir3_shader.h
index 882893fdde5..ea861649176 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_shader.h
+++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.h
@@ -122,9 +122,20 @@ struct ir3_shader_variant {
uint8_t regid;
uint8_t compmask;
uint8_t ncomp;
- /* in theory inloc of fs should match outloc of vs: */
+ /* 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.
+ */
uint8_t inloc;
uint8_t bary;
+ uint8_t interpolate;
} inputs[16 + 2]; /* +POSITION +FACE */
unsigned total_in; /* sum of inputs (scalar) */
@@ -159,9 +170,9 @@ struct ir3_shader {
struct ir3_shader_variant *variants;
/* so far, only used for blit_prog shader.. values for
- * VPC_VARYING_INTERP[i].MODE and VPC_VARYING_PS_REPL[i].MODE
+ * VPC_VARYING_PS_REPL[i].MODE
*/
- uint32_t vinterp[4], vpsrepl[4];
+ uint32_t vpsrepl[4];
};