aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/addrlib
Commit message (Collapse)AuthorAgeFilesLines
* amd/addrlib: Use enum instead of sparse chars to identify dimensionsMichel Dänzer2020-04-163-207/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The enum values can be used directly as indices into arrays, simplifying the code. This significantly cuts down the number of CPU cycles spent inside * Addr::V2::Gfx9Lib::HwlComputeDccAddrFromCoord: +------------------------------------------------------------------------+ |+ +++ + x x xx| | |_____AM____| |_A__|| +------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 5 14.89 15.44 15.14 15.156 0.24704251 + 5 8.26 9.96 9.37 9.282 0.6262747 Difference at 95.0% confidence -5.874 +/- 0.694294 -38.7569% +/- 4.58098% (Student's t, pooled s = 0.476051) * Addr::V2::CoordEq::solve: +------------------------------------------------------------------------+ | + x | | + + + + x x x x| ||__MA____| |______A__M____|| +------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 5 8.11 9.59 9.21 9.02 0.55605755 + 5 4.28 5.05 4.48 4.564 0.32867917 Difference at 95.0% confidence -4.456 +/- 0.666135 -49.4013% +/- 7.38509% (Student's t, pooled s = 0.456744) (The measured numbers are the percentages of samples inside the respective function and its calles for `perf record --call-graph=fp kitty -e false`, measured on a Lenovo Thinkpad E595 (Picasso)) v2: * Add missed 'coords[dim] |= bit << ord;' (Pierre-Eric Pelloux-Prayer) * Put 'ADDR_ASSERT(dim < DIM_S);' where the code previous had 'ADDR_ASSERT_ALWAYS()' for the s/m dimensions. * Use 1u for BitsValid (since it's 32-bit unsigned values). * Use parens in 'BitsValid[dim] & (1u << ord)' for clarity. Acked-by: Marek Olšák <[email protected]> # v1 Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4523>
* 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>
* amd/addrlib: fix build on non-x86 platformsGreg V2020-02-261-4/+6
| | | | | | | | | regparm(0) attribute does not work on aarch64 (and presumably powerpc64 and others). Default to not specifying any calling convention on non-amd64/i386 platforms. Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3567> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3567>
* amd: fix empty-body issuesEric Engestrom2019-12-271-6/+6
| | | | | | 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]>
* amd/addrlib: update to the latest versionMarek Olšák2019-12-1615-8051/+7271
| | | | | | Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Samuel Pitoiset <[email protected]> Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* util: rename PIPE_ARCH_*_ENDIAN to UTIL_ARCH_*_ENDIANDylan Baker2019-11-053-6/+6
| | | | | | | | | | | As requested by Tim. This was generated with: grep 'PIPE_ARCH_.*_ENDIAN' -rIl | xargs sed -ie 's@PIPE_ARCH_\(.*\)_ENDIAN@UTIL_ARCH_\1_ENDIAN@'g v2: - add this patch Reviewed-by: Eric Engestrom <[email protected]>
* util/u_endian: set PIPE_ARCH_*_ENDIAN to 1Dylan Baker2019-11-053-6/+6
| | | | | | | | | | | | This will allow it to be used as a drop in replacement for _mesa_little_endian in a number of cases. v2: - Always define PIPE_ARCH_LITTLE_ENDIAN and PIPE_ARCH_BIG_ENDIAN, define the one that reflects the host system to 1 and the other to 0 - replace all uses of #ifdef, #ifndef, and #if defined() with #if and #if ! with PIPE_ARCH_*_ENDIAN Reviewed-by: Eric Engestrom <[email protected]>
* ac/addrlib: fix chip identification for Vega10, Arcturus, Raven2, RenoirMarek Olšák2019-09-231-10/+5
| | | | | Cc: 19.2 <[email protected]> Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: add support for RenoirMarek Olšák2019-08-142-0/+7
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* tree-wide: replace MAYBE_UNUSED with ASSERTEDEric Engestrom2019-07-313-5/+5
| | | | | | Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* amd: add support for ArcturusMarek Olšák2019-07-291-0/+4
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* amd/addrlib/gfx10: forbid DCC for swizzle modes which the hardware does not ↵Nicolai Hähnle2019-07-031-3/+2
| | | | | | support Acked-by: Bas Nieuwenhuizen <[email protected]>
* amd/addrlib/gfx10: fix assertion in Addr2IsValidDisplaySwizzleModeNicolai Hähnle2019-07-031-0/+1
| | | | Acked-by: Bas Nieuwenhuizen <[email protected]>
* amd/common: add GFX10 chipsNicolai Hähnle2019-07-031-1/+5
| | | | Acked-by: Bas Nieuwenhuizen <[email protected]>
* amd/addrlib: add gfx10 supportMarek Olšák2019-07-0317-39/+12171
| | | | Acked-by: Bas Nieuwenhuizen <[email protected]>
* amd: update addrlibMarek Olšák2019-06-1727-490/+641
| | | | | Acked-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Bas Nieuwenhuizen <[email protected]>
* amd/addrlib: fix uninitialized values for Addr2ComputeDccAddrFromCoordMarek Olšák2019-04-041-0/+2
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* amd/addrlib: update Mesa's copy of addrlibNicolai Hähnle2018-11-2930-11362/+823
| | | | | | | | Update to the internal master as of 2018-11-15. This has a lot of gratuitous whitespace change, but on the plus side it's built using the same tooling that's used for AMDVLK, which should help going forward.
* radeonsi: add support for Raven2 (v2)Marek Olšák2018-10-302-1/+3
| | | | | | v2: fix enabling primitive binning Reviewed-by: Samuel Pitoiset <[email protected]>
* amd/addrlib: Fix include path for c99_compat.hMariusz Ceier2018-08-221-1/+1
| | | | | | | | | | | | | | | | Without this patch mesa doesn't compile: In file included from ../mesa-9999/src/amd/addrlib/addrinterface.cpp:39: ../mesa-9999/src/util/macros.h:29:10: fatal error: c99_compat.h: No such file or directory #include "c99_compat.h" ^~~~~~~~~~~~~~ compilation terminated. Fixes: 15ca5ce99a80d9ebb5ef2b1aca6ea00784931de4 ("amd/addrlib: mark returnCode as MAYBE_UNUSED in") Signed-off-by: Mariusz Ceier <[email protected]> Acked-by: Kai Wasserbäch <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* amd/addrlib: mark physicalSliceSize as MAYBE_UNUSED in ↵Kai Wasserbäch2018-08-221-1/+1
| | | | | | | | | | | | | | | Addr::V1::EgBasedLib::HwlGetSizeAdjustmentMicroTiled Only used, when asserts are enabled. Fixes an unused-but-set-variable warning with GCC 8: ../../../src/amd/addrlib/r800/egbaddrlib.cpp: In member function 'virtual long long unsigned int Addr::V1::EgBasedLib::HwlGetSizeAdjustmentMicroTiled(unsigned int, unsigned int, ADDR_SURFACE_FLAGS, unsigned int, unsigned int, unsigned int, unsigned int*, unsigned int*) const': ../../../src/amd/addrlib/r800/egbaddrlib.cpp:4111:13: warning: variable 'physicalSliceSize' set but not used [-Wunused-but-set-variable] UINT_64 physicalSliceSize; ^~~~~~~~~~~~~~~~~ Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd/addrlib: mark numPipes as MAYBE_UNUSED in ↵Kai Wasserbäch2018-08-221-1/+3
| | | | | | | | | | | | | | | | | | Addr::V1::EgBasedLib::SanityCheckMacroTiled (v2) Only used, when asserts are enabled. Fixes an unused-variable warning with GCC 8: ../../../src/amd/addrlib/r800/egbaddrlib.cpp: In member function 'int Addr::V1::EgBasedLib::SanityCheckMacroTiled(ADDR_TILEINFO*) const': ../../../src/amd/addrlib/r800/egbaddrlib.cpp:982:13: warning: unused variable 'numPipes' [-Wunused-variable] UINT_32 numPipes = HwlGetPipes(pTileInfo); ^~~~~~~~ v2: Don't realign other variable definitions, to keep in line with file style (Marek) Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd/addrlib: mark *pEqToCheck as MAYBE_UNUSED in ↵Kai Wasserbäch2018-08-221-1/+1
| | | | | | | | | | | | | | | | | | Addr::V2::Gfx9Lib::ComputeStereoInfo (v2) Only used, when asserts are enabled. Fixes an unused-variable warning with GCC 8: ../../../src/amd/addrlib/gfx9/gfx9addrlib.cpp: In member function 'ADDR_E_RETURNCODE Addr::V2::Gfx9Lib::ComputeStereoInfo(const ADDR2_COMPUTE_SURFACE_INFO_INPUT*, ADDR2_COMPUTE_SURFACE_INFO_OUTPUT*, unsigned int*) const': ../../../src/amd/addrlib/gfx9/gfx9addrlib.cpp:3879:34: warning: unused variable 'pEqToCheck' [-Wunused-variable] const ADDR_EQUATION *pEqToCheck = &m_equationTable[eqIndex]; ^~~~~~~~~~ v2: Don't realign other variable definitions, to keep in line with file style (Marek) Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd/addrlib: mark microBlockDim as MAYBE_UNUSED in ↵Kai Wasserbäch2018-08-221-1/+3
| | | | | | | | | | | | | | | Addr::V2::Gfx9Lib::HwlComputeBlock256Equation Only used, when asserts are enabled. Fixes an unused-but-set-variable warning with GCC 8: ../../../src/amd/addrlib/gfx9/gfx9addrlib.cpp: In member function 'virtual ADDR_E_RETURNCODE Addr::V2::Gfx9Lib::HwlComputeBlock256Equation(AddrResourceType, AddrSwizzleMode, unsigned int, ADDR_EQUATION*) const': ../../../src/amd/addrlib/gfx9/gfx9addrlib.cpp:2473:15: warning: variable 'microBlockDim' set but not used [-Wunused-but-set-variable] Dim2d microBlockDim = Block256_2d[elementBytesLog2]; ^~~~~~~~~~~~~ Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd/addrlib: mark returnCode as MAYBE_UNUSED in ElemGetExportNormKai Wasserbäch2018-08-221-1/+3
| | | | | | | | | | | | | Only used, when asserts are enabled. Fixes an unused-but-set-variable warning with GCC 8: ../../../src/amd/addrlib/addrinterface.cpp: In function 'int ElemGetExportNorm(ADDR_HANDLE, const ELEM_GETEXPORTNORM_INPUT*)': ../../../src/amd/addrlib/addrinterface.cpp:835:23: warning: variable 'returnCode' set but not used [-Wunused-but-set-variable] ADDR_E_RETURNCODE returnCode = ADDR_OK; ^~~~~~~~~~ Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add support for Vega20Marek Olšák2018-07-123-1/+5
| | | | Reviewed-by: Alex Deucher <[email protected]>
* amd/addrlib: add support for VegaMMarek Olšák2018-04-184-0/+41
| | | | Acked-by: Nicolai Hähnle <[email protected]>
* amd/addrlib: update to the latest version for Vega12Marek Olšák2018-03-2816-147/+438
| | | | Reviewed-by: Alex Deucher <[email protected]>
* meson: Use include variablesDylan Baker2018-01-111-1/+1
| | | | | | | | These were added after adderlib was mesonified, but it still good to use them instead of open coding them. Acked-by: Eric Engestrom <[email protected]> Signed-off-by: Dylan Baker <[email protected]>
* meson: Use consistent styleDylan Baker2018-01-111-3/+6
| | | | | | | | | | | | | | | | | | | | Currently the meosn build has a mix of two styles: arg : [foo, ... bar], and arg : [ foo, ..., bar, ] For consistency let's pick one. I've picked the later style, which I think is more readable, and is more common in the mesa code base. v2: - fix commit message Acked-by: Eric Engestrom <[email protected]> Signed-off-by: Dylan Baker <[email protected]>
* amd: remove always-true BRAHMA_BUILD defineEric Engestrom2017-12-012-14/+3
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* meson: Remove build_by_default from amd codeDylan Baker2017-11-131-1/+0
| | | | | | | This is the same logic as the previous two patches. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* amd/addrlib: update to latest versionMarek Olšák2017-11-0825-3104/+1324
| | | | | | | | | | | | This uses C++11 initializer lists. I just overwrote all Mesa files with internal addrlib and discarded hunks that we should probably keep, but I might have missed something. The code depending on ADDR_AM_BUILD is removed. We can add it back next time if needed. Acked-by: Nicolai Hähnle <[email protected]>
* amd/addrlib: add Addr2IsValidDisplaySwizzleModeMarek Olšák2017-10-124-2/+58
| | | | | | | | Some "standard" (_S) swizzle modes are displayable on Raven, even though the micro tile mode says it's not displayable. Expose the addrlib function to the driver. Reviewed-by: Nicolai Hähnle <[email protected]>
* meson: build "radv" vulkan driver for radeon hardwareDylan Baker2017-09-271-0/+63
| | | | | | | | | | | | | | | | This builds, installs, and has been tested on a r290x (Hawaii) with the Vulkan CTS. It dies horribly in a fire at the same point for the meson build as the autotools build. v2: - enable radv by default - add shader cache support and enforce that it's built for radv v3: - Fix typo in meson_options (Nicholas) - strip trailing 'svn' from llvm version before setting the version preprocessor flag (Bas) - Check for LLVM module requirements Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* amd/addrlib: fix missing va_end() after va_copy()Nicolai Hähnle2017-09-211-6/+2
| | | | | | | | | | There's no reason to use va_copy here. CID: 1418113 Reviewed-by: Eric Engestrom <[email protected]> Fixes: e7fc664b91a5d886c270 ("winsys/amdgpu: add addrlib - texture addressing and alignment calculator") Reviewed-by: Marek Olšák <[email protected]>
* ac/addrlib: enable assertions in debug buildsNicolai Hähnle2017-09-131-9/+17
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/addrlib: relax an assertionNicolai Hähnle2017-09-131-1/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/addrlib: relax an assertionNicolai Hähnle2017-09-131-1/+1
| | | | | | | | | This assertion is triggered on Stoney in Piglit ./bin/framebuffer-blit-levels {draw,read} stencil -auto -fbo and similar tests. It should be harmless -- just relax it until we can get internal clarification. Reviewed-by: Marek Olšák <[email protected]>
* amd/addrlib: fix typo in api name.Dave Airlie2017-07-1710-15/+15
| | | | | | | | This fixes the misspelling of ALIGNMENTS in addrlib. Reviewed-by: Eduardo Lima Mitev <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* amd/addrlib: import Raven supportMarek Olšák2017-05-152-3/+62
| | | | | | Cc: 17.1 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* amd/addrlib: use correct variable name in headerThomas Hindoe Paaboel Andersen2017-04-101-1/+1
| | | | | | | | Since the inclusion in 7f160efcde41b52ad78e562316384373dab419e3 the header used x_biased, while the implementation used y_biased. This changes the header to macth the implementation since the uses of the function seems to expect y_biased. Reviewed-by: Marek Olšák <[email protected]>
* amd/addrlib: second update for Vega10 + bug fixesMarek Olšák2017-04-0417-2132/+3298
| | | | | | | | | | | | | | | | | | | | | | | Highlights: - Display needs tiled pitch alignment to be at least 32 pixels - Implement Addr2ComputeDccAddrFromCoord(). - Macro-pixel packed formats don't support Z swizzle modes - Pad pitch and base alignment of PRT + TEX1D to 64KB. - Fix support for multimedia formats - Fix a case "PRT" entries are not selected on SI. - Fix wrong upper bits in equations for 3D resource. - We can't support 2d array slice rotation in gfx8 swizzle pattern - Set base alignment for PRT + non-xor swizzle mode resource to 64KB. - Bug workaround for Z16 4x/8x and Z32 2x/4x/8x MSAA depth texture - Add stereo support - Optimize swizzle mode selection - Report pitch and height in pixels for each mip - Adjust bpp/expandX for format ADDR_FMT_GB_GR/ADDR_FMT_BG_RG - Correct tcCompatible flag output for mipmap surface - Other fixes and cleanups Acked-by: Alex Deucher <[email protected]> Acked-by: Nicolai Hähnle <[email protected]>
* amd/addrlib: fix optimized build warningsGrazvydas Ignotas2017-04-031-1/+1
| | | | | | | | All the -Wunused-but-set-variable ones. Found a way to do it with a oneliner. Signed-off-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* Partially revert "amd/addrlib: silence warnings" to fix builds with DEBUGMarek Olšák2017-03-303-6/+6
| | | | This partially reverts commit 8a74140a21fe6b0d2e8a60b065b890f797f2db51.
* amd/addrlib: silence warningsMarek Olšák2017-03-304-15/+15
|
* amd/addrlib: import gfx9 supportNicolai Hähnle2017-03-3016-3/+22032
|
* amd/addrlib: Not all ETC2 formats are 128bpp... add new ETC2 formats to ↵Kevin Furrow2017-03-303-19/+45
| | | | differentiate between 64 and 128bpp formats.
* amd/addrlib: Fix selection of swizzle modes for 3D compressed images.Kevin Furrow2017-03-301-1/+2
|
* amd/addrlib: Add support for ETC2 and ASTC formats.Kevin Furrow2017-03-303-1/+119
|