gallium: inline pipe_alpha_state to enable better DSA bitfield packing

pipe_alpha_state and pipe_depth_state will be packed together
because they have only a few bitfields each. This will eventually
remove 4 bytes of padding in pipe_depth_stencil_alpha_state.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7940>
This commit is contained in:
Marek Olšák
2020-12-04 08:19:57 -05:00
committed by Marge Bot
parent b7f12a0452
commit d0534cea7f
41 changed files with 120 additions and 131 deletions

View File

@@ -2739,8 +2739,8 @@ vc4_update_compiled_fs(struct vc4_context *vc4, uint8_t prim_mode)
key->stencil_full_writemasks = vc4->zsa->stencil_uniforms[2] != 0;
key->depth_enabled = (vc4->zsa->base.depth.enabled ||
key->stencil_enabled);
if (vc4->zsa->base.alpha.enabled)
key->alpha_test_func = vc4->zsa->base.alpha.func;
if (vc4->zsa->base.alpha_enabled)
key->alpha_test_func = vc4->zsa->base.alpha_func;
else
key->alpha_test_func = COMPARE_FUNC_ALWAYS;