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/r600/r600_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/r600/r600_state.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index fa0d0874402..08bf4d2e41e 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -441,10 +441,10 @@ static void *r600_create_dsa_state(struct pipe_context *ctx, /* alpha */ alpha_test_control = 0; alpha_ref = 0; - if (state->alpha.enabled) { - alpha_test_control = S_028410_ALPHA_FUNC(state->alpha.func); + if (state->alpha_enabled) { + alpha_test_control = S_028410_ALPHA_FUNC(state->alpha_func); alpha_test_control |= S_028410_ALPHA_TEST_ENABLE(1); - alpha_ref = fui(state->alpha.ref_value); + alpha_ref = fui(state->alpha_ref_value); } dsa->sx_alpha_test_control = alpha_test_control & 0xff; dsa->alpha_ref = alpha_ref; |