summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* radv: Skip transitions coming from external queue.Bas Nieuwenhuizen2019-06-131-0/+3
| | | | | | | | Transitions to external queue should do the transition & make sure it works on all queues. Fixes: 8ebc7dcb59a "radv: Allow fast clears with concurrent queue mask for some layouts." Reviewed-by: Samuel Pitoiset <[email protected]>
* amd/rtld: layout and relocate LDS symbolsNicolai Hähnle2019-06-122-19/+235
| | | | | | | | | | | Upcoming changes to LLVM will emit LDS objects as symbols in the ELF symbol table, with relocations that will be resolved with this change. Callers will also be able to define LDS symbols that are shared between shader parts. This will be used by radeonsi for the ESGS ring in gfx9+ merged shaders. Reviewed-by: Marek Olšák <[email protected]>
* amd/common: use ARRAY_SIZE for the LLVM command line optionsNicolai Hähnle2019-06-121-2/+2
| | | | | | This is more convenient for changing it around during debug. Reviewed-by: Marek Olšák <[email protected]>
* amd/common: add ac_compile_module_to_elfNicolai Hähnle2019-06-122-7/+83
| | | | | | | A new variant of ac_compile_module_to_binary that allows us to keep the entire ELF around. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use ac_shader_configNicolai Hähnle2019-06-121-0/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* amd/common: add a more powerful runtime linkerNicolai Hähnle2019-06-125-0/+655
| | | | | | | | | Using an explicit linker instead of just concatenating .text sections will allow us to start using .rodata sections and explicit descriptions of data on LDS that is shared between stages. Reviewed-by: Marek Olšák <[email protected]>
* amd/common: clarify ac_shader_binary::lds_sizeNicolai Hähnle2019-06-121-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* amd/common: extract ac_parse_shader_binary_configNicolai Hähnle2019-06-122-34/+47
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radv: fix VK_EXT_memory_budget if one heap isn't availableSamuel Pitoiset2019-06-121-27/+33
| | | | | | | | | | | When the visible VRAM size is equal to the VRAM size only two heaps are exposed. This fixes dEQP-VK.api.info.device.memory_budget. Cc: 19.0 19.1 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-By: Bas Nieuwenhuizen <[email protected]>
* radv: fix occlusion queries on VegaMSamuel Pitoiset2019-06-121-21/+27
| | | | | | | | | | | | | | The number of render backends is 16 but the enabled mask is 0xaaaa. As noticed by Bas, allowing disabled render backends might break the OCCLUSION_QUERY packet. We don't use it yet but keep this in mind. This fixes dEQP-VK.query_pool.* and dEQP-VK.multiview.*. Cc: 19.0 19.1 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-By: Bas Nieuwenhuizen <[email protected]>
* radeonsi: use the ac helper for index buffer stores in the culling shaderMarek Olšák2019-06-113-3/+5
|
* radv: assert on inline uniform blocks in radv_CmdPushDescriptorSetKHR()Samuel Iglesias Gonsálvez2019-06-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | According to the Vulkan spec, inline uniform blocks are not allowed to be updated through vkCmdPushDescriptorSetKHR(). These are the spec quotes from "13.2.1. Descriptor Set Layout" that are relevant for this case: "VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR specifies that descriptor sets must not be allocated using this layout, and descriptors are instead pushed by vkCmdPushDescriptorSetKHR." "If flags contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then all elements of pBindings must not have a descriptorType of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT". There is no explicit mention in vkCmdPushDescriptorSetKHR() to forbid this case but it is implied in the creation of the descriptor set layout as aforementioned. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: remove extra assignment in radv_decompress_resolve_subpass_src()Samuel Pitoiset2019-06-111-1/+0
| | | | | | baseArrayLayer is defined twice, trivial. Signed-off-by: Samuel Pitoiset <[email protected]>
* radv: add radv_get_resolve_pipeline() helper in the graphics pathSamuel Pitoiset2019-06-111-12/+29
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-By: Bas Nieuwenhuizen <[email protected]>
* radv: do not decompress all image layers before resolving inside a subpassSamuel Pitoiset2019-06-111-3/+9
| | | | | | | | When decompressing resolve source images, we should rely on the framebuffer layer count instead of resolving all images layers. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-By: Bas Nieuwenhuizen <[email protected]>
* radv: initialize the aspect mask when decompressing resolve source imagesSamuel Pitoiset2019-06-111-0/+1
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-By: Bas Nieuwenhuizen <[email protected]>
* radv: perform proper layout transitions before resolvingSamuel Pitoiset2019-06-111-19/+19
| | | | | | | | Use an explicit pipeline barrier for doing layout transitions instead of duplicating some code. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-By: Bas Nieuwenhuizen <[email protected]>