etnaviv: drop not used config_out function param
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
This commit is contained in:
parent
6f7ec6ee39
commit
a949fa9d5d
|
@ -376,7 +376,7 @@ etna_try_blt_blit(struct pipe_context *pctx,
|
||||||
assert(blit_info->src.level <= src->base.last_level);
|
assert(blit_info->src.level <= src->base.last_level);
|
||||||
assert(blit_info->dst.level <= dst->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;
|
return false;
|
||||||
|
|
||||||
/* The width/height are in pixels; they do not change as a result of
|
/* The width/height are in pixels; they do not change as a result of
|
||||||
|
|
|
@ -145,7 +145,7 @@ etna_screen_can_create_resource(struct pipe_screen *pscreen,
|
||||||
const struct pipe_resource *templat)
|
const struct pipe_resource *templat)
|
||||||
{
|
{
|
||||||
struct etna_screen *screen = etna_screen(pscreen);
|
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;
|
return false;
|
||||||
|
|
||||||
/* templat->bind is not set here, so we must use the minimum sizes */
|
/* 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;
|
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 */
|
/* Number of samples not supported */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -561,13 +561,8 @@ static bool msaa_config(const struct pipe_resource *src,
|
||||||
assert(src->nr_samples <= 4);
|
assert(src->nr_samples <= 4);
|
||||||
assert(dst->nr_samples <= 4);
|
assert(dst->nr_samples <= 4);
|
||||||
|
|
||||||
translate_samples_to_xyscale(src->nr_samples,
|
translate_samples_to_xyscale(src->nr_samples, &src_xscale, &src_yscale);
|
||||||
&src_xscale, &src_yscale,
|
translate_samples_to_xyscale(dst->nr_samples, &dst_xscale, &dst_yscale);
|
||||||
NULL);
|
|
||||||
|
|
||||||
translate_samples_to_xyscale(dst->nr_samples,
|
|
||||||
&dst_xscale, &dst_yscale,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
/* RS does not support upscaling */
|
/* RS does not support upscaling */
|
||||||
if ((src_xscale < dst_xscale) || (src_yscale < dst_yscale))
|
if ((src_xscale < dst_xscale) || (src_yscale < dst_yscale))
|
||||||
|
|
|
@ -435,7 +435,7 @@ etna_screen_is_format_supported(struct pipe_screen *pscreen,
|
||||||
/* Validate MSAA; number of samples must be allowed, and render target
|
/* Validate MSAA; number of samples must be allowed, and render target
|
||||||
* must have MSAA'able format. */
|
* must have MSAA'able format. */
|
||||||
if (sample_count > 1) {
|
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) {
|
translate_ts_format(format) != ETNA_NO_MATCH) {
|
||||||
allowed |= PIPE_BIND_RENDER_TARGET;
|
allowed |= PIPE_BIND_RENDER_TARGET;
|
||||||
}
|
}
|
||||||
|
|
|
@ -417,32 +417,26 @@ translate_clear_depth_stencil(enum pipe_format format, float depth,
|
||||||
return clear_value;
|
return clear_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert MSAA number of samples to x and y scaling factor and
|
/* Convert MSAA number of samples to x and y scaling factor.
|
||||||
* VIVS_GL_MULTI_SAMPLE_CONFIG value.
|
|
||||||
* Return true if supported and false otherwise. */
|
* Return true if supported and false otherwise. */
|
||||||
static inline bool
|
static inline bool
|
||||||
translate_samples_to_xyscale(int num_samples, int *xscale_out, int *yscale_out,
|
translate_samples_to_xyscale(int num_samples, int *xscale_out, int *yscale_out)
|
||||||
uint32_t *config_out)
|
|
||||||
{
|
{
|
||||||
int xscale, yscale;
|
int xscale, yscale;
|
||||||
uint32_t config;
|
|
||||||
|
|
||||||
switch (num_samples) {
|
switch (num_samples) {
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
xscale = 1;
|
xscale = 1;
|
||||||
yscale = 1;
|
yscale = 1;
|
||||||
config = VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_NONE;
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
xscale = 2;
|
xscale = 2;
|
||||||
yscale = 1;
|
yscale = 1;
|
||||||
config = VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_2X;
|
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
xscale = 2;
|
xscale = 2;
|
||||||
yscale = 2;
|
yscale = 2;
|
||||||
config = VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_4X;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
@ -452,8 +446,6 @@ translate_samples_to_xyscale(int num_samples, int *xscale_out, int *yscale_out,
|
||||||
*xscale_out = xscale;
|
*xscale_out = xscale;
|
||||||
if (yscale_out)
|
if (yscale_out)
|
||||||
*yscale_out = yscale;
|
*yscale_out = yscale;
|
||||||
if (config_out)
|
|
||||||
*config_out = config;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue