summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* radv: move AMDGPU_LIBS later in the link chainEmil Velikov2016-10-141-1/+2
| | | | | | | | | | At the moment (albeit unlikely) one could get link-time issues, since libdrm_amdgpu.so is before it's users in the link chain. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]>
* radv: correct variable name VISIBILITY_{, C}FLAGSEmil Velikov2016-10-141-1/+2
| | | | | | | | | | | The letter C was missing, thus in turn all the internal symbols were exported. As a result we hide ~150 symbols and cut ~36K from libvulkan_radeon.so. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]>
* amd/addrlib: hide private symbols via VISIBILITY_CXXFLAGSEmil Velikov2016-10-141-0/+3
| | | | | | | | | Private/internal symbols should not be exported. Using the CXXFLAGS cuts ~300 exported symbols and ~23K from libvulkan_radeon.so. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radv: fix the wayland wsi busy bitDave Airlie2016-10-141-1/+1
| | | | Signed-off-by: Dave Airlie <[email protected]>
* radv: Use new image load/store intrinsic signatures v2Tom Stellard2016-10-141-25/+108
| | | | | | | | | | These were changed in LLVM r284024. v2: - Only use float types for vdata of llvm.amdgcn.image.store. LLVM doesn't support integer types for this intrinsic. Signed-off-by: Dave Airlie <[email protected]>
* radv: Fix incorrect commentTom Stellard2016-10-141-2/+2
| | | | Signed-off-by: Dave Airlie <[email protected]>
* radv: fix identity swizzle handlingDave Airlie2016-10-141-8/+10
| | | | | | | | | | The identity swizzle should operate exactly like an .r = R, .g = G, .b = B, .a = A swizzle. This fixes a bunch of the 16-bit BGRA blit tests dEQP-VK.api.copy_and_blit.blit_image.all_formats.b4g4r4a4* Signed-off-by: Dave Airlie <[email protected]>
* radv/wsi: fix app that acquire multiple images up frontDave Airlie2016-10-142-0/+2
| | | | | | | | | | | | | | dota2 does multiple acquires followed by multiple queues, this bug manifested itself as a hang in the xshmfence code randomly when dota2 was doing it's menus. It also occured when running dota2 under phoronix-test-suite. The fix is once the image is acquired to mark it busy then so nobody else can acquire. We have to trust vulkan apps that they will eventually submit it. Acked-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Return correct result in EnumeratePhysicalDevicesNicolas Koch2016-10-131-0/+2
| | | | | | | | | If pPhysicalDevices is too small for all physical devices, the driver must return VK_INCOMPLETE. Since only a single physical device is supported, this is only the case when pPhysicalDeviceCount == 0 && pPhysicalDevices != NULL. Signed-off-by: Dave Airlie <[email protected]>
* radv: add all headers to the sources listEmil Velikov2016-10-121-1/+12
| | | | | | Otherwise they'll be missing from the tarball and the build will fail. Signed-off-by: Emil Velikov <[email protected]>
* radv: trivial case stmt style fixupsEdward O'Callaghan2016-10-121-3/+3
| | | | | | | | Relocate a 'default:' to the end of a case stmt and fix an indent issue. Signed-off-by: Edward O'Callaghan <[email protected]> Reviewed-by: Thomas Helland <[email protected]>
* radv/winsys: Fix radv_amdgpu_cs_grow min_size argument. (v2)Gustaw Smolarczyk2016-10-121-4/+7
| | | | | | | | | | | It's supposed to be how much at least we want to grow the cs, not the minimum size of the cs after growth. v2: Unbreak use_ib_bos. Don't mask the ib_size when !use_ib_bos, since it's not needed. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix strict aliasing violationGrigori Goronzy2016-10-121-2/+5
| | | | Signed-off-by: Dave Airlie <[email protected]>
* radv: fix uninitialized variablesGrigori Goronzy2016-10-122-2/+2
| | | | | | This gets rid of "may be used uninitialized" compiler warnings. Signed-off-by: Dave Airlie <[email protected]>
* radv: add missing unreachableGrigori Goronzy2016-10-121-0/+1
| | | | Signed-off-by: Dave Airlie <[email protected]>
* radv: remove the validation layer and some related bits.Dave Airlie2016-10-122-37/+2
| | | | | | | As pointed out by Emil this isn't used in anv anymore, and it was totally unused in radv anyways. Signed-off-by: Dave Airlie <[email protected]>
* radv: drop entrypoint split out.Dave Airlie2016-10-123-73/+2
| | | | | | | radv really doesn't need different dispatch per gen yet, there really isn't that many differences yet. Signed-off-by: Dave Airlie <[email protected]>
* radv: drop the RADV_CALL macro.Dave Airlie2016-10-127-50/+42
| | | | | | This is leftover from anv, and we really never needed it. Signed-off-by: Dave Airlie <[email protected]>
* radv: check driver name before calling amdgpu.Dave Airlie2016-10-121-0/+16
| | | | | | | | | | | | This checks the kernel driver name is amdgpu before calling libdrm_amdgpu. This avoids the following error: amdgpu_device_initialize: DRM version is 1.6.0 but this driver is only compatible with 3.x.x when run on a machine with i915 graphics as well as amdgpu. Signed-off-by: Dave Airlie <[email protected]>
* radv: fix memory leak from physical device if wsi failsDave Airlie2016-10-121-1/+3
| | | | | | | Inspired by patch from Edward O'Callaghan <[email protected]> which didn't do it right. Signed-off-by: Dave Airlie <[email protected]>
* radv/winsys: Fix mem leak at failed do_winsys_init() call siteEdward O'Callaghan2016-10-121-2/+6
| | | | | | | | | | | | Probably unlikely however ensure we don't leak a heap allocation on the fail path. V.2: also fix missing 'amdgpu_device_deinitialize()' calls (Emil Velikov). Signed-off-by: Edward O'Callaghan <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/winsys: Trivial style and readability fixupsEdward O'Callaghan2016-10-124-12/+17
| | | | | | | | Drop/add a few newlines where appropriate and drop a couple of unnessary braces. Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: automake: move libamdgpu_addrlib.la to VULKAN_LIB_DEPSEmil Velikov2016-10-111-1/+2
| | | | | | | The static library is analogous to the intel ISL, which is required for both hardware and (to be added) testing library. Signed-off-by: Emil Velikov <[email protected]>
* radv: automake: remove unused variablesEmil Velikov2016-10-111-6/+0
| | | | Signed-off-by: Emil Velikov <[email protected]>
* radv: automake: include the python scripts/formats table in the tarballEmil Velikov2016-10-111-2/+5
| | | | Signed-off-by: Emil Velikov <[email protected]>
* radv: Use proper header guards over 'pragma once' directivesEdward O'Callaghan2016-10-1013-14/+60
| | | | | Signed-off-by: Edward O'Callaghan <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* radv: drop all uint for unsigned.Dave Airlie2016-10-071-8/+8
| | | | Signed-off-by: Dave Airlie <[email protected]>
* radv: Skip already signalled fences.Gustaw Smolarczyk2016-10-071-3/+3
| | | | | | | | | If the user created a fence with VK_FENCE_CREATE_SIGNALED_BIT set, we shouldn't fail to wait for a fence if it was not submitted since that is not necessary. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add initial non-conformant radv vulkan driverDave Airlie2016-10-0761-0/+32060
| | | | | | | | | | | | | | | | | | | | | | | This squashes all the radv development up until now into one for merging. History can be found: https://github.com/airlied/mesa/tree/semi-interesting This requires llvm 3.9 and is in no way considered a conformant vulkan implementation. It can run a number of vulkan applications, and supports all GPUs using the amdgpu kernel driver. Thanks to Intel for providing anv and spirv->nir, and Emil Velikov for reviewing build integration. Parts of this are: Reviewed-by: Nicolai Hähnle <[email protected]> Acked-by: Edward O'Callaghan <[email protected]> Authors: Bas Nieuwenhuizen and Dave Airlie Signed-off-by: Dave Airlie <[email protected]>
* amd: add amd_kernel_code_t.h to the sources listEmil Velikov2016-10-061-0/+1
| | | | | | | | Otherwise it won't be picked in the tarball and the build will fail. Fixes: 91ec6e56649 ("radeonsi/compute: Use the HSA abi for non-TGSI compute shaders v3") Signed-off-by: Emil Velikov <[email protected]>
* radeonsi/compute: Use the HSA abi for non-TGSI compute shaders v3Tom Stellard2016-09-161-0/+534
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch switches non-TGSI compute shaders over to using the HSA ABI described here: https://github.com/RadeonOpenCompute/ROCm-Docs/blob/master/AMDGPU-ABI.md The HSA ABI provides a much cleaner interface for compute shaders and allows us to share more code in the compiler with the HSA stack. The main changes in this patch are: - We now pass the scratch buffer resource into the shader via user sgprs rather than using relocations. - Grid/Block sizes are now passed to the shader via the dispatch packet rather than at the beginning of the kernel arguments. Typically for HSA, the CP firmware will create the dispatch packet and set up the user sgprs automatically. However, in Mesa we let the driver do this work. The main reason for this is that I haven't researched how to get the CP to do all these things, and I'm not sure if it is supported for all GPUs. v2: - Add comments explaining why we are setting certain bits of the scratch resource descriptor. v3: - Use amdgcn-mesa-mesa3d triple instead of amdgcn--mesa3d. Reviewed-by: Nicolai Hähnle <[email protected]>
* android: add support for libmesa_amdgpu_addrlibMauro Rossi2016-09-132-0/+72
| | | | | | | | | | | Android porting of the following commits: f1f1ba3 "radeonsi: move sid.h/r600d_common.h to a common place." 69fca64 "amd/addrlib: move addrlib from amdgpu winsys to common code" This patch fixes android building errors Reviewed-by: Dave Airlie <[email protected]>
* amd/addrlib: move addrlib from amdgpu winsys to common codeDave Airlie2016-09-0623-1/+21979
| | | | | Acked-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeon: move radeon_family/chip_class defintions to commonDave Airlie2016-09-062-1/+113
| | | | | | | This just moves these to a common header file. Acked-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: move sid.h/r600d_common.h to a common place.Dave Airlie2016-09-064-0/+9336
Step one to merging radv would be to move some files around. This only adds the include path to r600/radeonsi, because later we want to avoid having to add it to the generic target paths. Acked-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>