aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc5/vc5_program.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/gallium/drivers/vc5/vc5_program.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/gallium/drivers/vc5/vc5_program.c')
-rw-r--r--src/gallium/drivers/vc5/vc5_program.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gallium/drivers/vc5/vc5_program.c b/src/gallium/drivers/vc5/vc5_program.c
index d885cdf2975..23d2d73a2dc 100644
--- a/src/gallium/drivers/vc5/vc5_program.c
+++ b/src/gallium/drivers/vc5/vc5_program.c
@@ -477,10 +477,16 @@ vc5_update_compiled_fs(struct vc5_context *vc5, uint8_t prim_mode)
vc5->dirty |= VC5_DIRTY_COMPILED_FS;
- if (old_fs &&
- vc5->prog.fs->prog_data.fs->flat_shade_flags !=
- old_fs->prog_data.fs->flat_shade_flags) {
- vc5->dirty |= VC5_DIRTY_FLAT_SHADE_FLAGS;
+ if (old_fs) {
+ if (vc5->prog.fs->prog_data.fs->flat_shade_flags !=
+ old_fs->prog_data.fs->flat_shade_flags) {
+ vc5->dirty |= VC5_DIRTY_FLAT_SHADE_FLAGS;
+ }
+
+ if (vc5->prog.fs->prog_data.fs->centroid_flags !=
+ old_fs->prog_data.fs->centroid_flags) {
+ vc5->dirty |= VC5_DIRTY_CENTROID_FLAGS;
+ }
}
if (old_fs && memcmp(vc5->prog.fs->prog_data.fs->input_slots,