summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* radv: emit framebuffer state from primary if secondary doesn't inherit itSamuel Pitoiset2019-06-211-0/+9
| | | | | | | | | | | | | | | | Otherwise fast color/depth clears can't work because they depend on the framebuffer. This fixes the following CTS (when the small hint is disabled): - dEQP-VK.geometry.layered.1d_array.secondary_cmd_buffer - dEQP-VK.geometry.layered.2d_array.secondary_cmd_buffer - dEQP-VK.geometry.layered.cube.secondary_cmd_buffer - dEQP-VK.geometry.layered.cube_array.secondary_cmd_buffer Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110810 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107986 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: enable DCC for mipmapped color textures on GFX8Samuel Pitoiset2019-06-201-2/+7
| | | | | | | It's tricky on GFX9, so only GFX8 for now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not fast clears if one level can't be fast clearedSamuel Pitoiset2019-06-201-0/+15
| | | | | | | And fallback to slow color clears. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add fast clears support for mipmapped color images with DCCSamuel Pitoiset2019-06-201-1/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add radv_dcc_clear_level() helperSamuel Pitoiset2019-06-202-3/+30
| | | | | | | For clearing only one level. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: re-initialize DCC metadata after decompressing using computeSamuel Pitoiset2019-06-201-4/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: initialize levels without DCC during layout transitionsSamuel Pitoiset2019-06-201-1/+48
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/rtld: report better error messages for LDS overallocationNicolai Hähnle2019-06-191-2/+11
| | | | Tested-by: Dieter Nützel <[email protected]>
* ac/rtld: check correct LDS max sizeMarek Olšák2019-06-192-1/+9
| | | | Tested-by: Dieter Nützel <[email protected]>
* radeonsi: add s_sethalt to shaders for debuggingNicolai Hähnle2019-06-192-0/+18
| | | | Tested-by: Dieter Nützel <[email protected]>
* ac/rtld: fix sorting of LDS symbols by alignmentNicolai Hähnle2019-06-191-2/+2
| | | | Tested-by: Dieter Nützel <[email protected]>
* radv: Fix vulkan build in meson.Bas Nieuwenhuizen2019-06-191-0/+7
| | | | | | | Apparently the android part was never ported to meson. CC: <[email protected]> Acked-by: Samuel Pitoiset <[email protected]>
* ac/nir: Set speculatable for buffer loads where allowedConnor Abbott2019-06-191-3/+4
| | | | | | | | | | | | | | | | | | | | | This brings the nir path in line with the TGSI path. Totals from affected shaders: SGPRS: 2984 -> 2984 (0.00 %) VGPRS: 2792 -> 2652 (-5.01 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Private memory VGPRs: 0 -> 0 (0.00 %) Scratch size: 0 -> 0 (0.00 %) dwords per thread Code Size: 247380 -> 248072 (0.28 %) bytes LDS: 0 -> 0 (0.00 %) blocks Max Waves: 121 -> 132 (9.09 %) Wait states: 0 -> 0 (0.00 %) Most of the change came from DiRT: Showdown, and came from sinking SSBO loads. Reviewed-by: Timothy Arceri <[email protected]>
* ac,radeonsi: Always mark buffer stores as inaccessiblememonlyConnor Abbott2019-06-195-74/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | inaccessiblememonly means that it doesn't modify memory accesible via normal LLVM pointers. This lets LLVM's dead store elimination, memcpy forwarding, etc. ignore functions with this attribute. We don't represent descriptors as pointers, so this property is always true of buffer and image stores. There are plans to represent descriptors via pointers, but this just means that now nothing is inaccessiblememonly, as LLVM will then understand loads/stores via its usual alias analysis. Radeonsi was mistakenly only setting it if the driver could prove that there were no reads, and then it was cargo-culted into ac_llvm_build and ac_llvm_to_nir. Rip it out of everything. statistics with nir enabled: Totals from affected shaders: SGPRS: 152 -> 152 (0.00 %) VGPRS: 128 -> 132 (3.12 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Private memory VGPRs: 0 -> 0 (0.00 %) Scratch size: 0 -> 0 (0.00 %) dwords per thread Code Size: 9324 -> 9244 (-0.86 %) bytes LDS: 2 -> 2 (0.00 %) blocks Max Waves: 17 -> 17 (0.00 %) Wait states: 0 -> 0 (0.00 %) The only difference was a manhattan31 shader. Acked-by: Timothy Arceri <[email protected]> Acked-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radv: disable viewport clamping even if FS doesn't write ZSamuel Pitoiset2019-06-191-3/+1
| | | | | | | This fixes new CTS dEQP-VK.pipeline.depth_range_unrestricted.*. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: implement compressed FMASK texture reads with RADV_PERFTEST=tccompatcmaskSamuel Pitoiset2019-06-197-1/+103
| | | | | | | | | | | | | This allows us to disable the FMASK decompress pass when transitioning from CB writes to shader reads. This will likely be improved and enabled by default in the future. No CTS regressions on GFX8 but a few number of multisample CTS failures on GFX9 (they look related to the small hint). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: fix FMASK expand with SRGB formatsSamuel Pitoiset2019-06-191-1/+2
| | | | | | | | Found while working on DCC for MSAA. Fixes: 6b976024a87 ("radv: add support for FMASK expand") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: adjust the DCC base VA for mipmapped color attachmentsSamuel Pitoiset2019-06-181-0/+5
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: fix color decompressions for FMASK/CMASKSamuel Pitoiset2019-06-181-1/+2
| | | | | | | | Only skip levels without DCC when it's a DCC decompression. Whoops. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not decompress levels without DCC with the graphics pathSamuel Pitoiset2019-06-181-15/+20
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not decompress levels without DCC with the compute pathSamuel Pitoiset2019-06-181-0/+5
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: check if DCC is enabled per mip not for the whole imageSamuel Pitoiset2019-06-186-19/+23
| | | | | | | | In other words, make use of radv_dcc_enabled() instead of radv_image_has_dcc() all over the places. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Disable linear tiled compressed textures.Bas Nieuwenhuizen2019-06-181-0/+4
| | | | | | Support got removed in the new addrlib update. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: add mipmaps support for DCC decompression on computeSamuel Pitoiset2019-06-171-52/+54
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add mipmaps support for color decompressions (DCC/FMASK/CMASK)Samuel Pitoiset2019-06-171-99/+129
| | | | | | | And some cleanups. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: set the DCC/FCE predicates from the base levelSamuel Pitoiset2019-06-171-0/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: load the fast color clear values from the base levelSamuel Pitoiset2019-06-171-6/+6
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: store the DCC predicate for each mipSamuel Pitoiset2019-06-176-26/+72
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: store the FCE predicate for each mipSamuel Pitoiset2019-06-174-10/+32
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: store the fast color clear values for each mipSamuel Pitoiset2019-06-173-13/+39
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: allocate DCC metadata for each mipSamuel Pitoiset2019-06-171-4/+4
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-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]>
* radv: Add asserts that buffer descriptors are created with valid buffer formats.Bas Nieuwenhuizen2019-06-171-0/+3
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Decompress DCC when the image format is not allowed for buffers.Bas Nieuwenhuizen2019-06-173-2/+40
| | | | | | | | | | Otherwise the buffer loads/stores in the bufimage meta operations fail. If we decompress DCC then we can use the "canonical" format compatible with the not-supported format. CC: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: make sure to init the DCC decompress compute path stateSamuel Pitoiset2019-06-171-0/+8
| | | | | | | | | This fixes a segfault when forcing DCC decompressions on compute because internal meta objects are not created since the on-demand stuff. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-By: Bas Nieuwenhuizen <[email protected]>
* ac: make ac_compute_cmask() a static functionSamuel Pitoiset2019-06-172-7/+3
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-By: Bas Nieuwenhuizen <[email protected]>
* radv: rely on ac_compute_cmask() for CMASK infoSamuel Pitoiset2019-06-171-42/+3
| | | | | | | | | Instead of re-computing in the driver. The 3d and cube flags are correctly set, so the same values should returned by ac_compute_surface(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-By: Bas Nieuwenhuizen <[email protected]>
* radv: silent a compiler warning in radv_CmdPushDescriptorSetKHR()Samuel Pitoiset2019-06-171-1/+1
| | | | | | Trivial. Signed-off-by: Samuel Pitoiset <[email protected]>
* ac: update llvm.amdgcn.icmp intrinsic name for LLVM 9+Samuel Pitoiset2019-06-171-3/+4
| | | | | | | | LLVM r363339 changed llvm.amdgcn.icmp.i* to llvm.amdgcn.icmp.i64.i*. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-By: Bas Nieuwenhuizen <[email protected]>
* ac: add radeon_info::is_amdgpu instead of checking drm_major == 3Marek Olšák2019-06-143-9/+10
| | | | | | and clean up Reviewed-by: Samuel Pitoiset <[email protected]>
* android: amd/common: fix missing include pathMauro Rossi2019-06-141-0/+1
| | | | | | | | | | | | | | | | Fixes the following building error in Android: In file included from external/mesa/src/amd/common/ac_llvm_helper.cpp:34: In file included from external/mesa/src/amd/common/ac_llvm_build.h:30: In file included from external/mesa/src/compiler/nir/nir.h:40: In file included from external/mesa/src/compiler/nir_types.h:36: external/mesa/src/compiler/glsl_types.h:37:10: fatal error: 'main/config.h' file not found ^~~~~~~~~~~~~~~ 1 error generated. Fixes: bd4c661 ("ac,ac/nir: use a better sync scope for shared atomics") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* android: radv: fix necessary dependeciesMauro Rossi2019-06-141-1/+11
| | | | | | | | | | | | | | | | | | | Fixes building errors due to libmesa_util and libexpat dependencies: In file included from external/mesa/src/amd/vulkan/radv_device.c:52: external/mesa/src/util/xmlpool.h:115:10: fatal error: 'xmlpool/options.h' file not found ^~~~~~~~~~~~~~~~~~~ 1 error generated. FAILED: out/target/product/x86_64/obj_x86/SHARED_LIBRARIES/vulkan.radv_intermediates/LINKED/vulkan.radv.so ... external/mesa/src/util/xmlconfig.c:670: error: undefined reference to 'XML_ParserCreate' ... clang.real: error: linker command failed with exit code 1 (use -v to see invocation) Fixes: 3c2e826 ("radv: Add support for driconf.") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* ac/registers: use better names for disambiguated definitionsMarek Olšák2019-06-131-4/+4
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* ac/registers: remove deprecated/inapplicable definitionsMarek Olšák2019-06-131-180/+0
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: enable AMD_shader_ballot with RADV_PERFTEST_SHADER_BALLOT ↵Daniel Schürmann2019-06-135-1/+9
| | | | | | ('shader_ballot') Reviewed-by: Connor Abbott <[email protected]>
* amd/common: add support for AMD_shader_ballot functionsDaniel Schürmann2019-06-131-0/+20
| | | | Reviewed-by: Connor Abbott <[email protected]>
* spirv/nir: add support for AMD_shader_ballot and Groups capabilityDaniel Schürmann2019-06-131-2/+3
| | | | | | | | This commit also renames existing AMD capabilities: - gcn_shader -> amd_gcn_shader - trinary_minmax -> amd_trinary_minmax Reviewed-by: Connor Abbott <[email protected]>
* radv: enable shader_subgroup_vote & shader_subgroup_ballot extensionsDaniel Schürmann2019-06-131-0/+2
| | | | Reviewed-by: Connor Abbott <[email protected]>
* radv: flush and invalidate CB before resetting query pools on GFX9Samuel Pitoiset2019-06-131-0/+4
| | | | | | | | | | | | We have to emit a CACHE_FLUSH_AND_INV_TS_EVENT to be sure all prior GPU work is done. While we are at it, also flush and invalidate DB. This fixes the following CTS (when the small hint is disabled): dEQP-VK.query_pool.statistics_query.reset_before_copy.* Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-By: Bas Nieuwenhuizen <[email protected]>
* radv: Always disable DCC on shareable images.Bas Nieuwenhuizen2019-06-131-3/+1
| | | | | | | Do not want it for perf reasons. Always have to disable DCC when transferring to external queue. Reviewed-by: Samuel Pitoiset <[email protected]>