summaryrefslogtreecommitdiffstats
path: root/src/broadcom/compiler/vir.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-04-26 09:24:32 -0700
committerEric Anholt <[email protected]>2018-04-26 11:30:22 -0700
commit76ee9edcb4f5be8699cfb9a6c4aa231c4e7d4183 (patch)
tree27556d81315aa8bf857050be0c86dec24a15306b /src/broadcom/compiler/vir.c
parente2f33178010a9612d8d89bf128e3a01a69e1dd82 (diff)
broadcom/vc5: Add support for centroid varyings.
It would be nice to share the flags packet emit logic with flat shade flags, but I couldn't come up with a good way while still using our pack macros. We need to refactor this to shader record setup at compile time, anyway. Fixes ext_framebuffer_multisample-interpolation * centroid-*
Diffstat (limited to 'src/broadcom/compiler/vir.c')
-rw-r--r--src/broadcom/compiler/vir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c
index 93990ee806f..0de5335d12a 100644
--- a/src/broadcom/compiler/vir.c
+++ b/src/broadcom/compiler/vir.c
@@ -758,6 +758,9 @@ v3d_set_fs_prog_data_inputs(struct v3d_compile *c,
for (int i = 0; i < V3D_MAX_FS_INPUTS; i++) {
if (BITSET_TEST(c->flat_shade_flags, i))
prog_data->flat_shade_flags[i / 24] |= 1 << (i % 24);
+
+ if (BITSET_TEST(c->centroid_flags, i))
+ prog_data->centroid_flags[i / 24] |= 1 << (i % 24);
}
}
@@ -838,6 +841,7 @@ uint64_t *v3d_compile_fs(const struct v3d_compiler *compiler,
prog_data->writes_z = (c->s->info.outputs_written &
(1 << FRAG_RESULT_DEPTH));
prog_data->discard = c->s->info.fs.uses_discard;
+ prog_data->uses_centroid_and_center_w = c->uses_centroid_and_center_w;
return v3d_return_qpu_insts(c, final_assembly_size);
}