panfrost: Use pan_sample_pattern in pan_cmdstream
We had a duplicate function there, let's use common code instead and allow v4. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Eric R. Smith <eric.smith@collabora.com> Reviewed-by: Olivia Lee <olivia.lee@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34997>
This commit is contained in:
committed by
Marge Bot
parent
4c0ce0c6f9
commit
37856eff06
@@ -60,6 +60,7 @@
|
||||
#include "pan_shader.h"
|
||||
#include "pan_texture.h"
|
||||
#include "pan_util.h"
|
||||
#include "pan_desc.h"
|
||||
|
||||
/* JOBX() is used to select the job backend helpers to call from generic
|
||||
* functions. */
|
||||
@@ -105,23 +106,6 @@ static_assert((int)PIPE_FUNC_NOTEQUAL == MALI_FUNC_NOT_EQUAL, "must match");
|
||||
static_assert((int)PIPE_FUNC_GEQUAL == MALI_FUNC_GEQUAL, "must match");
|
||||
static_assert((int)PIPE_FUNC_ALWAYS == MALI_FUNC_ALWAYS, "must match");
|
||||
|
||||
static inline enum mali_sample_pattern
|
||||
panfrost_sample_pattern(unsigned samples)
|
||||
{
|
||||
switch (samples) {
|
||||
case 1:
|
||||
return MALI_SAMPLE_PATTERN_SINGLE_SAMPLED;
|
||||
case 4:
|
||||
return MALI_SAMPLE_PATTERN_ROTATED_4X_GRID;
|
||||
case 8:
|
||||
return MALI_SAMPLE_PATTERN_D3D_8X_GRID;
|
||||
case 16:
|
||||
return MALI_SAMPLE_PATTERN_D3D_16X_GRID;
|
||||
default:
|
||||
unreachable("Unsupported sample count");
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned
|
||||
translate_tex_wrap(enum pipe_tex_wrap w, bool using_nearest)
|
||||
{
|
||||
@@ -1243,7 +1227,7 @@ panfrost_upload_sample_positions_sysval(struct panfrost_batch *batch,
|
||||
unsigned samples = util_framebuffer_get_num_samples(&batch->key);
|
||||
uniform->du[0] =
|
||||
dev->sample_positions->ptr.gpu +
|
||||
panfrost_sample_positions_offset(panfrost_sample_pattern(samples));
|
||||
panfrost_sample_positions_offset(pan_sample_pattern(samples));
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -167,7 +167,6 @@ pan_wls_adjust_size(unsigned wls_size)
|
||||
|
||||
#ifdef PAN_ARCH
|
||||
|
||||
#if PAN_ARCH >= 5
|
||||
static inline enum mali_sample_pattern
|
||||
pan_sample_pattern(unsigned samples)
|
||||
{
|
||||
@@ -188,7 +187,6 @@ pan_sample_pattern(unsigned samples)
|
||||
unreachable("Unsupported sample count");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void GENX(pan_select_tile_size)(struct pan_fb_info *fb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user