mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
etnaviv: increase alignment for MSAA resources
The RS window aligment restrictions apply to the downsampled size of a MSAA resource, so in order to be able to do the downsample blit for all possible sizes, we must make sure to increase the alignment of the multisampled resource by the MSAA scale. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19066>
This commit is contained in:
parent
391ccff250
commit
6dfae66016
1 changed files with 7 additions and 4 deletions
|
|
@ -205,6 +205,7 @@ etna_layout_multiple(const struct etna_screen *screen,
|
|||
*/
|
||||
bool rs_align = !specs->use_blt && !etna_resource_sampler_only(templat) &&
|
||||
VIV_FEATURE(screen, chipMinorFeatures1, TEXTURE_HALIGN);
|
||||
int msaa_xscale = 1, msaa_yscale = 1;
|
||||
|
||||
/* Compressed textures are padded to their block size, but we don't have
|
||||
* to do anything special for that.
|
||||
|
|
@ -217,6 +218,8 @@ etna_layout_multiple(const struct etna_screen *screen,
|
|||
return;
|
||||
}
|
||||
|
||||
translate_samples_to_xyscale(templat->nr_samples, &msaa_xscale, &msaa_yscale);
|
||||
|
||||
switch (layout) {
|
||||
case ETNA_LAYOUT_LINEAR:
|
||||
*paddingX = rs_align ? 16 : 4;
|
||||
|
|
@ -224,8 +227,8 @@ etna_layout_multiple(const struct etna_screen *screen,
|
|||
*halign = rs_align ? TEXTURE_HALIGN_SIXTEEN : TEXTURE_HALIGN_FOUR;
|
||||
break;
|
||||
case ETNA_LAYOUT_TILED:
|
||||
*paddingX = rs_align ? 16 : 4;
|
||||
*paddingY = 4;
|
||||
*paddingX = rs_align ? 16 * msaa_xscale : 4;
|
||||
*paddingY = 4 * msaa_yscale;
|
||||
*halign = rs_align ? TEXTURE_HALIGN_SIXTEEN : TEXTURE_HALIGN_FOUR;
|
||||
break;
|
||||
case ETNA_LAYOUT_SUPER_TILED:
|
||||
|
|
@ -234,8 +237,8 @@ etna_layout_multiple(const struct etna_screen *screen,
|
|||
*halign = TEXTURE_HALIGN_SUPER_TILED;
|
||||
break;
|
||||
case ETNA_LAYOUT_MULTI_TILED:
|
||||
*paddingX = 16;
|
||||
*paddingY = 4 * specs->pixel_pipes;
|
||||
*paddingX = 16 * msaa_xscale;
|
||||
*paddingY = 4 * msaa_yscale * specs->pixel_pipes;
|
||||
*halign = TEXTURE_HALIGN_SPLIT_TILED;
|
||||
break;
|
||||
case ETNA_LAYOUT_MULTI_SUPERTILED:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue