summaryrefslogtreecommitdiff
path: root/src/amd/common/ac_surface.c
AgeCommit message (Collapse)AuthorFilesLines
2017-09-13ac/surface: match Z and stencil tile configNicolai Hähnle1-7/+42
Fixes various piglit tests on Stoney, see the comment. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13ac/surface: sanity-check that we got a TC-compatible HTILE if requestedNicolai Hähnle1-0/+6
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-07ac/surface: add radeon_surf::has_stencil for convenienceMarek Olšák1-0/+2
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-08-22ac/surface/gfx9: don't allow DCC for the smallest mipmap levelsMarek Olšák1-1/+18
This fixes garbage there if we don't flush TC L2 after rendering. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-08-22radeonsi/gfx9: properly handle imported textures with unexpected swizzle modeMarek Olšák1-0/+5
Cc: 17.2 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-08-04ac/surface: align DCC size for surfaces that use tile swizzleMarek Olšák1-2/+9
Note that dcc_alignment = pipe_interleave_bytes * num_pipes * num_banks, which is greater than the previous open-coded alignment. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-08-04ac/surface: limit tile swizzle to non-mipmaps on SIMarek Olšák1-1/+3
Mipmapping with tile swizzle doesn't work. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-08-04ac/surface: enable tile swizzle for mipmapped texturesMarek Olšák1-34/+46
The tile swizzle computation was done after the whole miptree was computed, but that was too late, because at that point AddrSurfInfoOut contained information about the smallest miplevel, which is never 2D-tiled. The correct way is to do the computation before the second level is computed. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-08-04ac/surface: set structure size and handle errors for AddrComputeBaseSwizzleMarek Olšák1-1/+8
Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-08-04ac/surface: increment surf_index only when tile swizzle is allowedMarek Olšák1-2/+4
Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-08-04ac/surface: compute tile swizzle only when it's allowedMarek Olšák1-2/+4
Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-08-04ac/surface: move tile_swizzle to ac_surface and document itMarek Olšák1-1/+4
Gfx9 will use it too. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-07-26ac/surface: fix hybrid graphics where APU=GFX9, dGPU=olderMarek Olšák1-0/+12
v2: don't do it for compressed textures (bpp = 0) Cc: 17.2 <mesa-stable@lists.freedesktop.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1) Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (v1)
2017-07-17ac/surface/gfx9: flags.texture currently refers to TC-compatible HTILEMarek Olšák1-1/+3
This should lead to better MSAA performance on GFX9. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-07-17amd/addrlib: fix typo in api name.Dave Airlie1-1/+1
This fixes the misspelling of ALIGNMENTS in addrlib. Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-07-17radv: set cb base tile swizzles for MRT speedups (v4)Dave Airlie1-0/+14
This patch uses addrlib to workout the tile swizzles according to the surface index. It seems to produce the same values as amdgpu-pro for the deferred test. v2: don't apply swizzle to CMASK. the eg docs don't mention it, and we clearly don't align cmask for that. v3: disable surf index for dedicated images, as these will most likely be shared, and I don't think the metadata has space for this info in it yet. v4: update for shareable images, rename combined_swizzle to tile_swizzle This gets the deferred demo from 730->950fps on my rx480. (dcc cmask elim predication patches get it further) Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-07-09radv: add support for using addrlib max alignment.Dave Airlie1-1/+9
Rather than using 64k, use what addrlib returns as the base alignment for vulkan allocations. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-06ac/surface: Fix HTILE for radv.Bas Nieuwenhuizen1-2/+1
We always compute HTILE size using addrlib, even when not TC compatible. Signed-off-by: Bas Nieuwenhuizen <basni@google.com> Reviewed-by: Dave Airlied <airlied@redhat.com>
2017-06-05ac/surface/gfx6: explicitly support S8 surfacesNicolai Hähnle1-25/+50
This is needed by radv for dEQP-VK.renderpass.simple.stencil Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-05-18ac: add radeon_surf::htile_slice_sizeNicolai Hähnle1-0/+4
Vulkan needs it. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-18ac_surface: use radeon_info from ac_gpu_infoNicolai Hähnle1-22/+25
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-18ac/radeonsi: move some aspects of sanity checking to ac_surfaceNicolai Hähnle1-0/+33
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-18ac/radeonsi: add ac_compute_surface to automatically switch gfx6 vs. gfx9Nicolai Hähnle1-8/+19
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-18ac/radeonsi: move the bulk of gfx9_surface_init to ac_surfaceNicolai Hähnle1-0/+380
We can now merge the two *_surface_init functions. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-18ac/radeonsi: move the bulk of gfx6_surface_init to ac_surfaceNicolai Hähnle1-0/+430
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-18ac/radeonsi: move amdgpu_addr_create to ac_surfaceNicolai Hähnle1-0/+202
v2: - update Android.common.mk (Emil) - rebase on top of Raven support Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)