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
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 */
}
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;
}
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))
/* 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;
}
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;
*xscale_out = xscale;
if (yscale_out)
*yscale_out = yscale;
- if (config_out)
- *config_out = config;
return true;
}