diff options
author | Marek Olšák <marek.olsak@amd.com> | 2020-12-04 08:19:57 -0500 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-12-22 12:01:38 +0000 |
commit | d0534cea7f4920111794cf19059bd9c15b471b7f (patch) | |
tree | 6c3c2453fab102b0bcd0ffb3dfc31f5873890b40 /src/gallium/drivers/radeonsi/si_state.c | |
parent | b7f12a04525dee07ab28128e5a6d6df8bce432b2 (diff) |
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>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 6033af77e6f..ae8e0c3def9 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1174,11 +1174,11 @@ static void *si_create_dsa_state(struct pipe_context *ctx, } /* alpha */ - if (state->alpha.enabled) { - dsa->alpha_func = state->alpha.func; + if (state->alpha_enabled) { + dsa->alpha_func = state->alpha_func; si_pm4_set_reg(pm4, R_00B030_SPI_SHADER_USER_DATA_PS_0 + SI_SGPR_ALPHA_REF * 4, - fui(state->alpha.ref_value)); + fui(state->alpha_ref_value)); } else { dsa->alpha_func = PIPE_FUNC_ALWAYS; } |