summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* radv: add missing license file to radv_meta_bufimage.Dave Airlie2016-12-141-0/+27
| | | | | | | | | | | | | Just noticed this file was missing license and any explaination of what is in it. (stable just for license header reasons) Reviewed by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 2a33049c70020d4a6587ff3774c86575877af371)
* anv: set maxFragmentDualSrcAttachments to 1Dave Airlie2016-12-141-1/+1
| | | | | | | | | Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reported-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit f9ab60202d48c72afa6a6f2a8c27db1e0777ed16)
* radv: don't leak the fd if radv_physical_device_init() succeedsEmil Velikov2016-12-141-0/+1
| | | | | | | | | | | radv_amdgpu_winsys_create() does not take ownership of the fd, thus we end up leaking it as we return with VK_SUCCESS. Cc: Dave Airlie <airlied@redhat.com> Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (cherry picked from commit 78707a15f205f9c2f45dc43ccbb99eb43029dc78)
* radv: fix 3D clears with baseMiplevelDave Airlie2016-11-281-1/+1
| | | | | | | | | | | | | This fixes: dEQP-VK.api.image_clearing.clear_color_image.3d* These were hitting an assert as the code wasn't taking the baseMipLevel into account when minify the image depth. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com> Cc: "13.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 09c0c17bc3609a5f5d3ba1df26820406ff5449bf)
* radv/si: fix optimal micro tile selectionDave Airlie2016-11-281-7/+7
| | | | | | | | | The same fix was posted for radeonsi, so port it here. Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 9838db8f643354e485f74664b92b902fe0b95c4f)
* radv: honour the number of properties availableEmil Velikov2016-11-281-11/+7
| | | | | | | | | | | | Cap up-to the number of properties available while copying the data. Otherwise we might crash and/or leak data. Cc: Dave Airlie <airlied@redhat.com> Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit a025c5b2c7c9c6862006b13c9b8ab46c3acf8e53)
* radv: fix image view creation for depth and stencil onlyDave Airlie2016-11-242-13/+9
| | | | | | | | | | | | | | | | This fixes the image view for sampling just the depth. It removes some pointless swizzle code, and adds a missing case for the x8_d24 format. Fixes: dEQP-VK.renderpass.formats.d32_sfloat_s8_uint.input.* dEQP-VK.renderpass.formats.d24_unorm_s8_uint.input.* dEQP-VK.renderpass.formats.x8_d24_unorm_pack32.input.* Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 6d7be52d90cd5f4798b9612e8a68f6d6d9e31c33)
* radv: make sure to flush input attachments correctly.Dave Airlie2016-11-241-0/+1
| | | | | | | | | | | This fixes 9 of the dEQP-VK.renderpass.attachment_allocation.input_output.* tests. Cc: "13.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 51a44c0021398177d56f86b7fb8d63673186a380)
* radv: don't crash on null swapchain destroy.Dave Airlie2016-11-241-0/+3
| | | | | | | | | | Just return if the passed in swapchain is NULL. Fixes: dEQP-VK.wsi.xlib.swapchain.destroy.null_handle Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 38ab625c5f5ca06b78af2892422a966dc659f8cd)
* radv/pipeline: Don't dereference NULL dynamic state pointersDarren Salt2016-11-141-20/+47
| | | | | | | | | | | | | | | | | | | This is a port of commit a4a59172482d50318a5ae7f99021bcf0125e0f53: Add guards to prevent dereferencing NULL dynamic pipeline state. Asserts of pCreateInfo members are moved to the earliest points at which they should not be NULL. This fixes a segfault, related to pColorBlendState, seen in Talos Principle which I've observed after startup is completed and when exiting the menus, depending on when Vulkan rendering is selected. v2: moved the NULL check in radv_pipeline_init_blend_state to after the declarations. Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (cherry picked from commit 9b121512ac0f78d0996613664b456005d88370d2)
* radv: Suffix the radeon_icd file with the host CPUEmil Velikov2016-11-103-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | Port of the anv commit d96345de989 ("anv: Suffix the intel_icd file with the host CPU"). v2: s/intel_icd/radeon_icd/ in commit summary (Gražvydas) Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> (IRC) (cherry picked from commit 0f434a68a39f391795dff92c317349d28dd2e638) Squashed with commit: radv: automake: list correct file in the EXTRA_DIST Earlier commit renamed the file radeon_icd.json{,.in} but missed one reference of the file - in EXTRA_DIST. Cc: "13.0" <mesa-stable@lists.freedesktop.org> Fixes: 0f434a68a ("radv: Suffix the radeon_icd file with the host CPU") Signed-off-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit b359f62456211c2162109064cb504ad7de2ee799)
* radv: use correct .specVersion for extensionsEmil Velikov2016-11-101-4/+4
| | | | | | | | | Analogous to previous commit. Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dave Airlie <airlied@redhat.com> (IRC) (cherry picked from commit abe110df019af230bd3d29fb73c046fc404b5525)
* radv: fix GetFenceStatus for signaled fencesDave Airlie2016-11-091-0/+2
| | | | | | | | | | | if a fence is created pre-signaled we should return that in GetFenceStatus even if it hasn't been submitted. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Gustaw Smolarczyk <wielkiegie@gmail.com> Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit fb50245ac1e1eb60b2451d9d6dd05388cb89634a)
* radv: enable conditional discard optimisation on radv.Dave Airlie2016-11-091-0/+1
| | | | | | | | | | | | | | This fixes a bunch of GPU hangs introduced in some CTS tests like dEQP-VK.memory.pipeline_barrier.host_write_uniform_buffer.65536 It works around an issue seen in the LLVM backend, but also makes the radv code work more like the radeonsi stack. Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 3c9af7578fcd62fc55e0443733f56b2aaa50ba9c)
* radv: add support for anisotropic filtering on VI+Fredrik Höglund2016-11-091-3/+27
| | | | | | | | Ported from radeonsi. Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit e7b9c5eb74619dbda3f24928196ab8c8d9408c0b)
* radv: fix dual source blendingDave Airlie2016-11-091-3/+9
| | | | | | | | | | | | Dolphin tried to use this, but we hadn't had any tests for it properly. All that is required is the shader output format needs to be set for 0 and 1 exports. Cc: "13.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 73592b92844af3c1298ef5e66e3055793443546d)
* radv: expose xlib platform extensionDave Airlie2016-11-091-0/+6
| | | | | | | | | | I missed this when I added the xlib code, this allows dolphin emu to start and crash later. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 9f0726f3e509c80c78ddb5e7411fa34f676de71d)
* radv: mark the fence as submitted and signalled in vkAcquireNextImageKHRFredrik Höglund2016-10-273-9/+18
| | | | | | | | | This stops the debug layers from complaining when fences are used to throttle image acquisition. Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 0a153f4ee472f8f17575bbfe05f1c96fb5ecf1ea)
* radv: Replace "abi_versions" with correct "api_version".Matt Turner2016-10-272-2/+2
| | | | | | | | | git history shows "abi_versions" was used from the outset. Cc: <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98415 Reviewed-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 14aac061e92fe57d1ee61843c1ccd1b275d8ca76)
* 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" <mesa-stable@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit a969548f59342330badf78ec7721a1ead7599a29)
* 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 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: 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-191-12/+12
| | | | | | | | 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 <airlied@redhat.com>
* 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 <jason@jlekstrand.net>
* radv/anv/wsi: drop unneeded parameterDave Airlie2016-10-194-4/+1
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* radv: drop pointless struct decl.Dave Airlie2016-10-191-2/+0
| | | | | Acked-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* 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 <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv: drop local MIN/MAX macros.Dave Airlie2016-10-194-7/+4
| | | | | | | Use the ones in macros.h instead. Acked-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* 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 <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* 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 <bas@basnieuwenhuizen.nl>
* 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 <emil.velikov@collabora.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
* 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 <emil.velikov@collabora.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
* radv: fix the wayland wsi busy bitDave Airlie2016-10-141-1/+1
| | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
* 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 <airlied@redhat.com>
* 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 <funfunctor@folklore1984.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* 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 <airlied@redhat.com>
* 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 <emil.velikov@collabora.com>
* 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 <funfunctor@folklore1984.net> Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
* 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 <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv: fix strict aliasing violationGrigori Goronzy2016-10-121-2/+5
| | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv: fix uninitialized variablesGrigori Goronzy2016-10-122-2/+2
| | | | | | This gets rid of "may be used uninitialized" compiler warnings. Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv: add missing unreachableGrigori Goronzy2016-10-121-0/+1
| | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
* 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 <airlied@redhat.com>
* 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 <airlied@redhat.com>
* 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 <airlied@redhat.com>
* 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 <airlied@redhat.com>
* radv: fix memory leak from physical device if wsi failsDave Airlie2016-10-121-1/+3
| | | | | | | Inspired by patch from Edward O'Callaghan <funfunctor@folklore1984.net> which didn't do it right. Signed-off-by: Dave Airlie <airlied@redhat.com>
* 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 <funfunctor@folklore1984.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* 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 <funfunctor@folklore1984.net> Signed-off-by: Dave Airlie <airlied@redhat.com>