mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
radeonsi: move max_dist for MSAA into si_state_msaa.c
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
This commit is contained in:
parent
12c239f829
commit
43cdb51402
3 changed files with 11 additions and 9 deletions
|
|
@ -3711,14 +3711,6 @@ static void si_emit_msaa_config(struct si_context *sctx, unsigned index)
|
|||
|
||||
if (coverage_samples > 1 && (rs->multisample_enable ||
|
||||
sctx->smoothing_enabled)) {
|
||||
/* 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 */
|
||||
7, /* 16x MSAA */
|
||||
};
|
||||
unsigned log_samples = util_logbase2(coverage_samples);
|
||||
|
||||
sc_line_cntl |= S_028BDC_EXPAND_LINE_WIDTH(1) |
|
||||
|
|
@ -3727,7 +3719,7 @@ static void si_emit_msaa_config(struct si_context *sctx, unsigned index)
|
|||
(sctx->family == CHIP_VEGA20 ||
|
||||
sctx->gfx_level >= GFX10));
|
||||
sc_aa_config = S_028BE0_MSAA_NUM_SAMPLES(log_samples) |
|
||||
S_028BE0_MAX_SAMPLE_DIST(max_dist[log_samples]) |
|
||||
S_028BE0_MAX_SAMPLE_DIST(si_msaa_max_distance[log_samples]) |
|
||||
S_028BE0_MSAA_EXPOSED_SAMPLES(log_samples) |
|
||||
S_028BE0_COVERED_CENTROID_IS_CENTER(sctx->gfx_level >= GFX10_3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -647,6 +647,7 @@ void si_init_draw_functions_GFX11(struct si_context *sctx);
|
|||
void si_init_draw_functions_GFX11_5(struct si_context *sctx);
|
||||
|
||||
/* si_state_msaa.c */
|
||||
extern unsigned si_msaa_max_distance[5];
|
||||
void si_init_msaa_functions(struct si_context *sctx);
|
||||
|
||||
/* si_state_streamout.c */
|
||||
|
|
|
|||
|
|
@ -105,6 +105,15 @@ static const uint32_t sample_locs_16x[] = {
|
|||
};
|
||||
static const uint64_t centroid_priority_16x = 0xc97e64b231d0fa85ull;
|
||||
|
||||
/* distance from the pixel center, indexed by log2(nr_samples) */
|
||||
unsigned si_msaa_max_distance[5] = {
|
||||
0, /* no AA */
|
||||
4, /* 2x MSAA */
|
||||
6, /* 4x MSAA */
|
||||
7, /* 8x MSAA */
|
||||
7, /* 16x MSAA */
|
||||
};
|
||||
|
||||
static void si_get_sample_position(struct pipe_context *ctx, unsigned sample_count,
|
||||
unsigned sample_index, float *out_value)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue