From: Christian Gmeiner Date: Fri, 15 Nov 2019 16:34:11 +0000 (+0100) Subject: etnaviv: drop not used config_out function param X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a949fa9d5df228244a44b1f5c8be635baa595d5e;p=mesa.git etnaviv: drop not used config_out function param Signed-off-by: Christian Gmeiner --- diff --git a/src/gallium/drivers/etnaviv/etnaviv_blt.c b/src/gallium/drivers/etnaviv/etnaviv_blt.c index ef0bbe92a8f..7266505eb4f 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_blt.c +++ b/src/gallium/drivers/etnaviv/etnaviv_blt.c @@ -376,7 +376,7 @@ etna_try_blt_blit(struct pipe_context *pctx, assert(blit_info->src.level <= src->base.last_level); assert(blit_info->dst.level <= dst->base.last_level); - if (!translate_samples_to_xyscale(src->base.nr_samples, &msaa_xscale, &msaa_yscale, NULL)) + if (!translate_samples_to_xyscale(src->base.nr_samples, &msaa_xscale, &msaa_yscale)) return false; /* The width/height are in pixels; they do not change as a result of diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index cca8b64d7c6..be5d87168f1 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c @@ -145,7 +145,7 @@ etna_screen_can_create_resource(struct pipe_screen *pscreen, const struct pipe_resource *templat) { struct etna_screen *screen = etna_screen(pscreen); - if (!translate_samples_to_xyscale(templat->nr_samples, NULL, NULL, NULL)) + if (!translate_samples_to_xyscale(templat->nr_samples, NULL, NULL)) return false; /* templat->bind is not set here, so we must use the minimum sizes */ @@ -229,7 +229,7 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout, } int msaa_xscale = 1, msaa_yscale = 1; - if (!translate_samples_to_xyscale(nr_samples, &msaa_xscale, &msaa_yscale, NULL)) { + if (!translate_samples_to_xyscale(nr_samples, &msaa_xscale, &msaa_yscale)) { /* Number of samples not supported */ return NULL; } diff --git a/src/gallium/drivers/etnaviv/etnaviv_rs.c b/src/gallium/drivers/etnaviv/etnaviv_rs.c index 52251150787..5c9c45deb86 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_rs.c +++ b/src/gallium/drivers/etnaviv/etnaviv_rs.c @@ -561,13 +561,8 @@ static bool msaa_config(const struct pipe_resource *src, assert(src->nr_samples <= 4); assert(dst->nr_samples <= 4); - translate_samples_to_xyscale(src->nr_samples, - &src_xscale, &src_yscale, - NULL); - - translate_samples_to_xyscale(dst->nr_samples, - &dst_xscale, &dst_yscale, - NULL); + translate_samples_to_xyscale(src->nr_samples, &src_xscale, &src_yscale); + translate_samples_to_xyscale(dst->nr_samples, &dst_xscale, &dst_yscale); /* RS does not support upscaling */ if ((src_xscale < dst_xscale) || (src_yscale < dst_yscale)) diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index a7d7ce72205..1f515ade6fd 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -435,7 +435,7 @@ etna_screen_is_format_supported(struct pipe_screen *pscreen, /* Validate MSAA; number of samples must be allowed, and render target * must have MSAA'able format. */ if (sample_count > 1) { - if (translate_samples_to_xyscale(sample_count, NULL, NULL, NULL) && + if (translate_samples_to_xyscale(sample_count, NULL, NULL) && translate_ts_format(format) != ETNA_NO_MATCH) { allowed |= PIPE_BIND_RENDER_TARGET; } diff --git a/src/gallium/drivers/etnaviv/etnaviv_translate.h b/src/gallium/drivers/etnaviv/etnaviv_translate.h index fea7328456e..afa5c260573 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_translate.h +++ b/src/gallium/drivers/etnaviv/etnaviv_translate.h @@ -417,32 +417,26 @@ translate_clear_depth_stencil(enum pipe_format format, float depth, return clear_value; } -/* Convert MSAA number of samples to x and y scaling factor and - * VIVS_GL_MULTI_SAMPLE_CONFIG value. +/* Convert MSAA number of samples to x and y scaling factor. * Return true if supported and false otherwise. */ static inline bool -translate_samples_to_xyscale(int num_samples, int *xscale_out, int *yscale_out, - uint32_t *config_out) +translate_samples_to_xyscale(int num_samples, int *xscale_out, int *yscale_out) { int xscale, yscale; - uint32_t config; switch (num_samples) { case 0: case 1: xscale = 1; yscale = 1; - config = VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_NONE; break; case 2: xscale = 2; yscale = 1; - config = VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_2X; break; case 4: xscale = 2; yscale = 2; - config = VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_4X; break; default: return false; @@ -452,8 +446,6 @@ translate_samples_to_xyscale(int num_samples, int *xscale_out, int *yscale_out, *xscale_out = xscale; if (yscale_out) *yscale_out = yscale; - if (config_out) - *config_out = config; return true; }