aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* radv: expose xlib platform extensionDave Airlie2016-11-021-0/+6
| | | | | | | | | I missed this when I added the xlib code, this allows dolphin emu to start and crash later. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "13.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* amd: fix a typo in PIXEL_PIPE_STAT_RESET definitionMarek Olšák2016-11-011-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radv: drop some unused cmask info members.Dave Airlie2016-11-012-8/+0
| | | | | | | | These were assigned but never used. Inspired by similiar patch in radeonsi. Signed-off-by: Dave Airlie <[email protected]>
* radv: split the device local memory heap into twoFredrik Höglund2016-10-283-6/+20
| | | | | | | | | | Advertise two device local memory heaps; one that is host visible and one that is not. This makes it possible for clients to tell how much host visible vs. non-host visible memory is available. Signed-off-by: Dave Airlie <[email protected]>
* radv: add a write-combining host-local memory typeFredrik Höglund2016-10-281-4/+13
| | | | | | | | | | | | | | | | | | | | | | Add the new memory type between the two device-local types. This makes the list of supported memory types look like this: 1) DEVICE_LOCAL | | | 2) | HOST_VISIBLE | HOST_COHERENT | 3) DEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT | 4) | HOST_VISIBLE | HOST_COHERENT | HOST_CACHED With this order a client that searches for a HOST_VISIBLE and HOST_COHERENT memory type using the algorithm described in section 10.2 of the Vulkan specification (revision 32) will find the host- local memory type first. A client that requires the memory type to be HOST_VISIBLE and HOST_COHERENT, but not DEVICE_LOCAL is most likely searching for a memory type suitable for staging buffers / images. Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac/llvm: trim texture return valuesDave Airlie2016-10-271-1/+2
| | | | | | | | | | | | | The intrinsic engine asserts in llvm due to this, as we put a vec4 into a vec1, and the next instruction isn't expecting it. So trim the vector at the end before inserting it. Reported-by: Christoph Haag <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "13.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium/radeon: fix a ZPASS comment, EVENT_WRITE_EOP fixupsMarek Olšák2016-10-261-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* nir/i965/anv/radv/gallium: make shader info a pointerTimothy Arceri2016-10-2611-54/+54
| | | | | | | | | | When restoring something from shader cache we won't have and don't want to create a nir_shader this change detaches the two. There are other advantages such as being able to reuse the shader info populated by GLSL IR. Reviewed-by: Jason Ekstrand <[email protected]>
* radv: mark the fence as submitted and signalled in vkAcquireNextImageKHRFredrik Höglund2016-10-263-9/+18
| | | | | | | | This stops the debug layers from complaining when fences are used to throttle image acquisition. Cc: "13.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Replace "abi_versions" with correct "api_version".Matt Turner2016-10-252-2/+2
| | | | | | | | git history shows "abi_versions" was used from the outset. Cc: <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98415 Reviewed-by: Dave Airlie <[email protected]>
* radv: allow cmask transitions without fast clearDave Airlie2016-10-241-3/+0
| | | | | | | | | | | | | | This fixes dEQP-VK.pipeline.multisample.sampled_image* These all render to multisampled image, and then sample from it, so we must transition it correctly, since we have a cmask and fmask this will cause the correct transition. Cc: "13.0" <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: use emit_icmp for samples_identicalDave Airlie2016-10-201-1/+1
| | | | | | | | | On a debug llvm build we'd assert on the next compare when the return from samples_identical was i1 instead of i32. Cc: "13.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: decompress fmask before reading using texture unitDave Airlie2016-10-193-6/+5
| | | | | | | | Before we can read the fmask using the compute shader, we need to decompress the fmask in place. This fixes a bunch of remaining failure and hopefully multisampling in Talos.
* radv: fix samples_identical return value.Dave Airlie2016-10-191-0/+3
| | | | | | | This was returning an inversion, so not doing as it should have. We need to compare the fmask value with 0, and return the result from that.
* radv: fix wsi porting regression in swapchain destroy.Dave Airlie2016-10-191-3/+10
| | | | | The code in anv is right, there's a pending patch to fix this up different, but I'll sync the code for now.
* radv: fix fmask ptr issueDave Airlie2016-10-191-4/+18
| | | | We were using the wrong descriptor in the fmask picking code.
* radv: simplify fast clear shadersDave Airlie2016-10-191-46/+2
| | | | There is no need for anything but a noop shader here.
* radv: start using defines for the user sgpr offsetsDave Airlie2016-10-193-14/+34
| | | | | | | | This adds some comments and adds defines for the user sgprs, so that we can move them around easier later and not have to change/revalidate every one of these. Signed-off-by: Dave Airlie <[email protected]>
* radv: port to common wsi codebaseDave Airlie2016-10-197-1860/+216
| | | | | | | | | | This drops all the radv WSI code in favour of using the new shared code that was ported from anv This regresses Talos for now, Jason has pointed out the bug is in Talos and we should wait for them to fix it. Reviewed-by: Jason Ekstrand <[email protected]>
* radv/anv/wsi: drop unneeded parameterDave Airlie2016-10-194-4/+1
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* radv: drop pointless struct decl.Dave Airlie2016-10-191-2/+0
| | | | | Acked-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: move to using shared vk_alloc inlines.Dave Airlie2016-10-1912-131/+88
| | | | | | | | This moves to the shared vk_alloc inlines for vulkan memory allocations. Acked-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: drop local MIN/MAX macros.Dave Airlie2016-10-194-7/+4
| | | | | | | Use the ones in macros.h instead. Acked-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: make use of shared vector helper.Dave Airlie2016-10-193-135/+8
| | | | | | | | This removes the vector code from radv in favour of sharing code with anv. Acked-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/winsys: Fail early on overgrown cs.Gustaw Smolarczyk2016-10-161-4/+14
| | | | | | | | When !use_ib_bos, we can't easily chain ibs one to another. If the required cs size grows over 1Mi - 8 dwords just fail the cs so that we won't assert-fail in radv_amdgpu_winsys_cs_submit later on. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* 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]>