mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
gallium/radeon: add RADEON_SURF_OPTIMIZE_FOR_SPACE
FORCE_TILING should disable it. It has no effect now, but that may change soon. Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
44a3f2ee09
commit
49fa4a4e60
3 changed files with 6 additions and 1 deletions
|
|
@ -253,6 +253,8 @@ static int r600_init_surface(struct r600_common_screen *rscreen,
|
||||||
|
|
||||||
if (is_imported)
|
if (is_imported)
|
||||||
flags |= RADEON_SURF_IMPORTED;
|
flags |= RADEON_SURF_IMPORTED;
|
||||||
|
if (!(ptex->flags & R600_RESOURCE_FLAG_FORCE_TILING))
|
||||||
|
flags |= RADEON_SURF_OPTIMIZE_FOR_SPACE;
|
||||||
|
|
||||||
r = rscreen->ws->surface_init(rscreen->ws, ptex, flags, bpe,
|
r = rscreen->ws->surface_init(rscreen->ws, ptex, flags, bpe,
|
||||||
array_mode, surface);
|
array_mode, surface);
|
||||||
|
|
|
||||||
|
|
@ -281,6 +281,7 @@ enum radeon_micro_mode {
|
||||||
#define RADEON_SURF_DISABLE_DCC (1 << 22)
|
#define RADEON_SURF_DISABLE_DCC (1 << 22)
|
||||||
#define RADEON_SURF_TC_COMPATIBLE_HTILE (1 << 23)
|
#define RADEON_SURF_TC_COMPATIBLE_HTILE (1 << 23)
|
||||||
#define RADEON_SURF_IMPORTED (1 << 24)
|
#define RADEON_SURF_IMPORTED (1 << 24)
|
||||||
|
#define RADEON_SURF_OPTIMIZE_FOR_SPACE (1 << 25)
|
||||||
|
|
||||||
struct radeon_surf_level {
|
struct radeon_surf_level {
|
||||||
uint64_t offset;
|
uint64_t offset;
|
||||||
|
|
|
||||||
|
|
@ -402,7 +402,9 @@ static int amdgpu_surface_init(struct radeon_winsys *rws,
|
||||||
* requested, because TC-compatible HTILE requires 2D tiling.
|
* requested, because TC-compatible HTILE requires 2D tiling.
|
||||||
*/
|
*/
|
||||||
AddrSurfInfoIn.flags.degrade4Space = !AddrSurfInfoIn.flags.tcCompatible &&
|
AddrSurfInfoIn.flags.degrade4Space = !AddrSurfInfoIn.flags.tcCompatible &&
|
||||||
!(flags & RADEON_SURF_FMASK);
|
!AddrSurfInfoIn.flags.fmask &&
|
||||||
|
tex->nr_samples <= 1 &&
|
||||||
|
(flags & RADEON_SURF_OPTIMIZE_FOR_SPACE);
|
||||||
|
|
||||||
/* DCC notes:
|
/* DCC notes:
|
||||||
* - If we add MSAA support, keep in mind that CB can't decompress 8bpp
|
* - If we add MSAA support, keep in mind that CB can't decompress 8bpp
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue