summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/vc5/vc5_emit.c5
-rw-r--r--src/gallium/drivers/vc5/vc5_program.c8
-rw-r--r--src/gallium/drivers/vc5/vc5_state.c7
3 files changed, 3 insertions, 17 deletions
diff --git a/src/gallium/drivers/vc5/vc5_emit.c b/src/gallium/drivers/vc5/vc5_emit.c
index 413059efa4a..3914a346e9d 100644
--- a/src/gallium/drivers/vc5/vc5_emit.c
+++ b/src/gallium/drivers/vc5/vc5_emit.c
@@ -507,11 +507,6 @@ vc5_emit_state(struct pipe_context *pctx)
flags.flat_shade_flags_for_varyings_v024 =
vc5->prog.fs->prog_data.fs->flat_shade_flags[0] & 0xfffff;
-
- if (vc5->rasterizer->base.flatshade) {
- flags.flat_shade_flags_for_varyings_v024 |=
- vc5->prog.fs->prog_data.fs->shade_model_flags[0] & 0xfffff;
- }
}
}
diff --git a/src/gallium/drivers/vc5/vc5_program.c b/src/gallium/drivers/vc5/vc5_program.c
index 4232d6aeb83..2fbd83982cd 100644
--- a/src/gallium/drivers/vc5/vc5_program.c
+++ b/src/gallium/drivers/vc5/vc5_program.c
@@ -390,6 +390,7 @@ vc5_update_compiled_fs(struct vc5_context *vc5, uint8_t prim_mode)
}
key->light_twoside = vc5->rasterizer->base.light_twoside;
+ key->shade_model_flat = vc5->rasterizer->base.flatshade;
struct vc5_compiled_shader *old_fs = vc5->prog.fs;
vc5->prog.fs = vc5_get_compiled_shader(vc5, &key->base);
@@ -399,11 +400,8 @@ 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->rasterizer->base.flatshade &&
- vc5->prog.fs->prog_data.fs->shade_model_flags !=
- old_fs->prog_data.fs->shade_model_flags))) {
+ vc5->prog.fs->prog_data.fs->flat_shade_flags !=
+ old_fs->prog_data.fs->flat_shade_flags) {
vc5->dirty |= VC5_DIRTY_FLAT_SHADE_FLAGS;
}
diff --git a/src/gallium/drivers/vc5/vc5_state.c b/src/gallium/drivers/vc5/vc5_state.c
index 8bc575f6f1d..a3ae2b3f539 100644
--- a/src/gallium/drivers/vc5/vc5_state.c
+++ b/src/gallium/drivers/vc5/vc5_state.c
@@ -272,13 +272,6 @@ static void
vc5_rasterizer_state_bind(struct pipe_context *pctx, void *hwcso)
{
struct vc5_context *vc5 = vc5_context(pctx);
- struct vc5_rasterizer_state *rast = hwcso;
-
- if (vc5->rasterizer && rast &&
- vc5->rasterizer->base.flatshade != rast->base.flatshade) {
- vc5->dirty |= VC5_DIRTY_FLAT_SHADE_FLAGS;
- }
-
vc5->rasterizer = hwcso;
vc5->dirty |= VC5_DIRTY_RASTERIZER;
}