etnaviv: drop not used config_out function param

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
This commit is contained in:
Christian Gmeiner 2019-11-15 17:34:11 +01:00
parent 6f7ec6ee39
commit a949fa9d5d
5 changed files with 8 additions and 21 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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))

View File

@ -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;
}

View File

@ -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;
}