aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/common
Commit message (Collapse)AuthorAgeFilesLines
...
* ac: enable displayable DCC on Navi12 & Navi14Marek Olšák2020-04-291-4/+7
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4697>
* ac/surface: validate that DCC is enabled correctly on gfx9+Marek Olšák2020-04-291-0/+69
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4697>
* ac/surface: add code for gfx10 displayable DCCMarek Olšák2020-04-292-16/+67
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4697>
* ac/surface: move non-displayable DCC to the end of the bufferMarek Olšák2020-04-291-3/+6
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4697>
* ac/surface: don't compute DCC if it's unsupported by DCN on gfx9+Marek Olšák2020-04-291-9/+29
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4697>
* ac/surface: match get_display_flag() with expectations for is_displayableMarek Olšák2020-04-291-1/+7
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4697>
* ac/surface: replace RADEON_SURF_OPTIMIZE_FOR_SPACE with !FORCE_SWIZZLE_MODEMarek Olšák2020-04-292-2/+4
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4697>
* ac/surface: remove RADEON_SURF_TC_COMPATIBLE_HTILE and assume it's always setMarek Olšák2020-04-292-11/+14
| | | | | | | | | | | So that drivers can enable it without worrying how the texture was allocated. v2: reworked the mechanism, hopefully fixes now added Bas Nieuwenhuizen's diff to fix radv Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> (v1) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4697>
* ac/surface: rename micro tile mode enums like gfx10 uses themMarek Olšák2020-04-292-9/+11
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4697>
* drm-uapi,radv,radeonsi: Add amdgpu_drm.h header.Bas Nieuwenhuizen2020-04-272-2/+2
| | | | | | | | | | | | Use it instead of the libdrm provided amdgpu_drm.h header. I used the kernel revision from the README to get the header so the header versions should be consistent. Tested by removing /usr/include/libdrm/amdgpu_drm.h from my dev-machine. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4749>
* ac: out-of-order rasterization is not supported on gfx10Marek Olšák2020-04-241-0/+1
| | | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4698>
* ac,radv: add ac_gpu_info::has_double_rate_fp16Samuel Pitoiset2020-04-092-0/+4
| | | | | | | | | Only GFX9+ support double rate packed math instructions. Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Daniel Schürmann <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4453>
* meson: inline `inc_common`Eric Engestrom2020-03-281-1/+1
| | | | | | | | | Let's make it clear what includes are being added everywhere, so that they can be cleaned up. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
* ac: unify denorm setting enforcementMarek Olšák2020-03-171-0/+13
| | | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected] Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4196>
* ac: disable late alloc on small gfx10 chipsMarek Olšák2020-03-121-1/+2
| | | | | | | | same as PAL. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4143> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4143>
* ac: add radeon_info::use_late_alloc to control LATE_ALLOC globallyMarek Olšák2020-03-122-0/+5
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4143>
* ac: add ac_gpu_info::cu_mask to store bitmask of compute unitsSamuel Pitoiset2020-03-062-3/+7
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4023>
* ac: rename min_vgpr_alloc to min_wave64_vgpr_allocSamuel Pitoiset2020-03-032-3/+3
| | | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3975> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3975>
* ac: rename vgpr_alloc_granularity to wave64_vgpr_alloc_granularitySamuel Pitoiset2020-03-032-3/+3
| | | | | | | | And update the value. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3975>
* ac: rename lds_size_per_cu to lds_size_per_workgroupSamuel Pitoiset2020-03-032-3/+3
| | | | | | | | | It's more accurate. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3975>
* ac: add more fields to ac_gpu_infoSamuel Pitoiset2020-02-282-1/+61
| | | | | | | | For RGP traces. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3900>
* radeonsi: fix surf_pitch for subsampled surfacePierre-Eric Pelloux-Prayer2020-02-271-0/+5
| | | | | | | | | | | | | | gfx9.surf_pitch is supposed to be in blocks (or elements) but addrlib returns a pitch in pixels. This cause a mismatch between surface->bpe and surface.u.gfx9.surf_pitch. For subsampled formats like uyvy (bpe is 2) this breaks in various places: - sdma copy - video rendering (see issue https://gitlab.freedesktop.org/mesa/mesa/issues/2363) when the vl_compositor_gfx_render method is used Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3738>
* ac: add more ac_gpu_info related shader fieldsSamuel Pitoiset2020-02-262-3/+33
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3899>
* ac,radeonsi: add ac_gpu_info::lds_size_per_cuSamuel Pitoiset2020-02-262-0/+9
| | | | | | | | | Both RadeonSI and RADV use the WGP mode, so we can assume 128KB on GFX10. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3899>
* ac/llvm: implement VK_AMD_shader_explicit_vertex_parameterSamuel Pitoiset2020-01-291-0/+1
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3578>
* amd/common,radv: move vertex_format_table to ac_shader_util.{h,c}Rhys Perry2020-01-282-0/+35
| | | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3086>
* ac,radeonsi: increase the maximum number of shader args and return valuesMarek Olšák2020-01-131-1/+2
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi/gfx9: force the micro tile mode for MSAA resolve correctly on gfx9Marek Olšák2020-01-092-3/+18
| | | | | | | Fixes: 69ea473 "amd/addrlib: update to the latest version" Closes: #2325 Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* ac/gpu_info: add pc_lines and use it in radeonsiMarek Olšák2020-01-082-0/+4
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* ac/gpu_info: always use distributed tessellation on gfx10Marek Olšák2020-01-081-2/+2
| | | | | | | This might fix a hang on Navi14. Cc: 19.2 19.3 <[email protected]> Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* ac/surface: use uint16_t for mipmap level pitchesSamuel Pitoiset2020-01-061-1/+1
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* Revert "amd/common: Always initialize gfx9 mipmap offset/pitch."Bas Nieuwenhuizen2020-01-042-5/+7
| | | | | | | | | This reverts commit 973181c06cca3fe232c3a435abde31f2fc1b81ef. Requested by Marek. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd/common: Always initialize gfx9 mipmap offset/pitch.Bas Nieuwenhuizen2020-01-022-7/+5
| | | | | | | | | | | | | | The WSI expects pitch to be meaningful even for tiled textures. (It is used for the pitch in modesetting and X11) Fixes: 824bd0830e8 "radv: return the correct pitch for linear mipmaps on GFX10" Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2301 Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2304 Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3245> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3245>
* radv: return the correct pitch for linear mipmaps on GFX10Samuel Pitoiset2019-12-302-1/+5
| | | | | | | | | | | | On GFX9, the pitch of a level is always the pitch of the entire image but not on GFX10. This fixes graphics glithes with Halo - The Master Chief Collection. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2188 CC: <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* amd/common: Handle alignment of 96-bit formats.Bas Nieuwenhuizen2019-12-301-0/+11
| | | | | | | | | addrlib doesn't quite do it right, so do it ourselves. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2162 CC: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd: fix empty-body issuesEric Engestrom2019-12-271-1/+1
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Fixes: 8d43e2b2ded0fe3c82d4 ("meson: add -Werror=empty-body to disallow `if(x);`") Reviewed-By: Timur Kristóf <[email protected]>
* ac/surface: fix an assertion failure on gfx9 in CMASK computationMarek Olšák2019-12-201-0/+1
| | | | | | | | | | | addrlib only allows the 2D resource type with CMASK. Fixes: 69ea473eeb9 "amd/addrlib: update to the latest version" Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3187> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3187>
* amd/addrlib: update to the latest versionMarek Olšák2019-12-161-7/+0
| | | | | | Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Samuel Pitoiset <[email protected]> Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* amd/common: Always use addrlib for HTILE tc-compat.Bas Nieuwenhuizen2019-12-141-11/+4
| | | | | | | | | | | | | | | | | Even without depth+stencil addrlib can (correctly!) decide to disable tc compatible HTILE. One example is 8x sampling with 32-bit depth on Stoney. The row size on Stoney is 1024, while the tile size is 2048, which results in tile splits which are not supported with tc-compat. On Stoney, this fixes dEQP-VK.glsl.builtin_var.fragdepth.*_list_d32_sfloat_multisample_8 CC: <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3054> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3054>
* amd/common: Fix tcCompatible degradation on Stoney.Bas Nieuwenhuizen2019-12-141-1/+1
| | | | | | | | | | | | | addrlib sometimes returns smaller sizes for tcCompat as it does not seem to take into account the depth+stencil matching config gymnastics with tcCompat. This fixes dEQP-VK.pipeline.render_to_image.core.2d_array.huge.height.r8g8b8a8_unorm_d32_sfloat_s8_uint CC: <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3054>
* aco: Use common argument handlingConnor Abbott2019-11-251-0/+1
| | | | Reviewed-by: Daniel Schürmann <[email protected]>
* ac: Add a shared interface between radv, radeonsi, LLVM and ACOConnor Abbott2019-11-253-0/+168
| | | | | | | | | | | | | | | | | | | ac_shader_args will be similar to ac_shader_abi, except for being free from LLVM-specific concepts and therefore capable of being shared between LLVM and ACO. This will help us accomplish a few different things: - Decouple setting up SGPR and VGPR arguments from translating to LLVM, so that we can reference these arguments in NIR lowering passes, which will let us lower e.g. descriptor sets in NIR. - Stop using radv-specific structures for things like determining the chip generation in ACO. In the end, we should replace ac_shader_abi with this structure + driver-specific lowering passes. Reviewed-by: Samuel Pitoiset <[email protected]>
* ac: fill num_rings for remaining IPsMarek Olšák2019-11-191-2/+16
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* ac: add radeon_info::num_rings and move ring_type to amd_family.hMarek Olšák2019-11-193-6/+18
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* ac: add radeon_info::has_l2_uncachedSamuel Pitoiset2019-11-182-0/+4
| | | | | | | For chips that have uncached device memory (ie. MTYPE_UC). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: Handle invalid GFX10 format correctly in ac_get_tbuffer_format.Timur Kristóf2019-11-081-0/+5
| | | | | | | | | | It happens that some games try to access a vertex buffer without a valid format. This case was incorrectly handled by ac_get_tbuffer_format which made ACO emit an invalid instruction. Signed-off-by: Timur Kristóf <[email protected]> Cc: 19.3 <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* ac: add missing Arcturus to the info of pc linesLeo Liu2019-11-041-0/+2
| | | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: Marek Olšák <[email protected]>
* ac: get tcc_harvested from the kernelMarek Olšák2019-10-281-3/+8
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* amd/common: Add extern "C" to some headers that were missing it.Timur Kristóf2019-10-103-0/+24
| | | | | | | | | We'd like to include some of these in C++ code later. Specifically, ACO is written in C++ and we would like to use some of this code in ACO in order to avoid code duplication. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* amd: don't use AMD_FAMILY definitions from amdgpu_drm.hMarek Olšák2019-10-091-8/+8
| | | | | | use the ones from addrlib Reviewed-by: Samuel Pitoiset <[email protected]>