[Mesa-dev] [PATCH 5/7] radeonsi: import cayman_msaa.c from drivers/radeon
Nicolai Hähnle
nhaehnle at gmail.com
Mon Oct 9 14:32:47 UTC 2017
On 09.10.2017 16:26, Marek Olšák wrote:
> On Mon, Oct 9, 2017 at 3:26 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
>> On 08.10.2017 00:47, Marek Olšák wrote:
>>>
>>> From: Marek Olšák <marek.olsak at amd.com>
>>>
>>> ---
>>> src/gallium/drivers/radeon/Makefile.sources | 1 -
>>> src/gallium/drivers/radeon/cayman_msaa.c | 269
>>> --------------------------
>>> src/gallium/drivers/radeon/r600_pipe_common.c | 1 -
>>> src/gallium/drivers/radeon/r600_pipe_common.h | 25 ---
>>> src/gallium/drivers/radeonsi/Makefile.sources | 1 +
>>> src/gallium/drivers/radeonsi/si_pipe.c | 1 +
>>> src/gallium/drivers/radeonsi/si_pipe.h | 9 +
>>> src/gallium/drivers/radeonsi/si_state.c | 79 ++++++--
>>> src/gallium/drivers/radeonsi/si_state.h | 4 +
>>> src/gallium/drivers/radeonsi/si_state_msaa.c | 209 ++++++++++++++++++++
>>> 10 files changed, 292 insertions(+), 307 deletions(-)
>>> delete mode 100644 src/gallium/drivers/radeon/cayman_msaa.c
>>> create mode 100644 src/gallium/drivers/radeonsi/si_state_msaa.c
>>>
>> [snip]
>>>
>>> diff --git a/src/gallium/drivers/radeonsi/si_state.c
>>> b/src/gallium/drivers/radeonsi/si_state.c
>>> index 82f3962..3c6b7ca 100644
>>> --- a/src/gallium/drivers/radeonsi/si_state.c
>>> +++ b/src/gallium/drivers/radeonsi/si_state.c
>>
>> [snip]
>>
>>> @@ -3296,24 +3296,82 @@ static void si_emit_msaa_config(struct si_context
>>> *sctx, struct r600_atom *atom)
>>> S_028A4C_OUT_OF_ORDER_PRIMITIVE_ENABLE(out_of_order_rast)
>>> |
>>> S_028A4C_OUT_OF_ORDER_WATER_MARK(0x7) |
>>> /* always 1: */
>>> S_028A4C_WALK_ALIGN8_PRIM_FITS_ST(1) |
>>> S_028A4C_SUPERTILE_WALK_ORDER_ENABLE(1) |
>>> S_028A4C_TILE_WALK_ORDER_ENABLE(1) |
>>> S_028A4C_MULTI_SHADER_ENGINE_PRIM_DISCARD_ENABLE(1) |
>>> S_028A4C_FORCE_EOV_CNTDWN_ENABLE(1) |
>>> S_028A4C_FORCE_EOV_REZ_ENABLE(1);
>>> - si_common_emit_msaa_config(cs, sctx->framebuffer.nr_samples,
>>> - sctx->ps_iter_samples,
>>> - sctx->smoothing_enabled ?
>>> SI_NUM_SMOOTH_AA_SAMPLES : 0,
>>> - sc_mode_cntl_1);
>>> + int setup_samples = sctx->framebuffer.nr_samples > 1 ?
>>> sctx->framebuffer.nr_samples :
>>> + sctx->smoothing_enabled ?
>>> SI_NUM_SMOOTH_AA_SAMPLES : 0;
>>> +
>>> + /* Required by OpenGL line rasterization.
>>> + *
>>> + * TODO: We should also enable perpendicular endcaps for AA lines,
>>> + * but that requires implementing line stippling in the
>>> pixel
>>> + * shader. SC can only do line stippling with axis-aligned
>>> + * endcaps.
>>> + */
>>> + unsigned sc_line_cntl = S_028BDC_DX10_DIAMOND_TEST_ENA(1);
>>> +
>>> + if (setup_samples > 1) {
>>> + /* distance from the pixel center, indexed by
>>> log2(nr_samples) */
>>> + static unsigned max_dist[] = {
>>> + 0, /* unused */
>>> + 4, /* 2x MSAA */
>>> + 6, /* 4x MSAA */
>>> + 7, /* 8x MSAA */
>>
>>
>> cayman_msaa.c had 8 here, is that change intentional?
>
> Yes, the 8x sample positions don't use +-8.
Ah, makes sense. R-b on this patch as well then.
>
> Marek
>
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
More information about the mesa-dev
mailing list