diff options
author | Erik Faye-Lund <[email protected]> | 2019-10-03 16:35:23 -0400 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-10-17 10:41:36 +0200 |
commit | b1c4c4c7f53cde52a8f3b3ec17cd66b89bf04199 (patch) | |
tree | 45eebd1e657b0ccdb45c1e34ba52c65762d9b99f /src/mesa/state_tracker/st_atom_shader.c | |
parent | 6d7e02e37da5335d2be11ca1d4bfa002e73c5770 (diff) |
mesa/gallium: automatically lower alpha-testing
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_atom_shader.c')
-rw-r--r-- | src/mesa/state_tracker/st_atom_shader.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index da269537866..f79c401e3e7 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -122,6 +122,11 @@ st_update_fp( struct st_context *st ) key.lower_flatshade = st->lower_flatshade && st->ctx->Light.ShadeModel == GL_FLAT; + /* _NEW_COLOR */ + key.lower_alpha_func = COMPARE_FUNC_NEVER; + if (st->lower_alpha_test && _mesa_is_alpha_test_enabled(st->ctx)) + key.lower_alpha_func = st->ctx->Color.AlphaFunc; + /* _NEW_FRAG_CLAMP */ key.clamp_color = st->clamp_frag_color_in_shader && st->ctx->Color._ClampFragmentColor; |