projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3489290
)
i965: Only set key->flat_shade if COL0/COL1 are written.
author
Kenneth Graunke
<kenneth@whitecape.org>
Tue, 22 Aug 2017 21:23:17 +0000
(14:23 -0700)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Wed, 23 Aug 2017 18:55:17 +0000
(11:55 -0700)
This may reduce some recompiles.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/drivers/dri/i965/brw_wm.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/i965/brw_wm.c
b/src/mesa/drivers/dri/i965/brw_wm.c
index c9c45045902484fa0b3da6a6467d8d13c659fedf..e1555d60c569eb5e0f5a8a46c4eaf84b887378ca 100644
(file)
--- a/
src/mesa/drivers/dri/i965/brw_wm.c
+++ b/
src/mesa/drivers/dri/i965/brw_wm.c
@@
-531,7
+531,9
@@
brw_wm_populate_key(struct brw_context *brw, struct brw_wm_prog_key *key)
key->stats_wm = brw->stats_wm;
/* _NEW_LIGHT */
- key->flat_shade = (ctx->Light.ShadeModel == GL_FLAT);
+ key->flat_shade =
+ (prog->info.inputs_read & (VARYING_BIT_COL0 | VARYING_BIT_COL1)) &&
+ (ctx->Light.ShadeModel == GL_FLAT);
/* _NEW_FRAG_CLAMP | _NEW_BUFFERS */
key->clamp_fragment_color = ctx->Color._ClampFragmentColor;