summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'mesa/13.0' into nougat-x86Chih-Wei Huang2017-01-093-2/+30
|\
| * 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)
| * radv: fix another regression since shadow fixes.Dave Airlie2016-12-141-1/+1
| | | | | | | | | | | | | | | | | | This fixes: dEQP-VK.glsl.texture_gather.basic.2d.depth32f.* Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 8033f78f94c7c6349e1c6a4d63fe3accb34b36f1)
| * 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)
* | Merge remote-tracking branch 'mesa/13.0' into nougat-x86Chih-Wei Huang2016-12-074-22/+21
|\ \ | |/
| * 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/ac/llvm: shadow samplers only return one value.Dave Airlie2016-11-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The intrinsic engine asserts in llvm due to this. Reported-by: Christoph Haag <haagch+mesadev@frickel.club> Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit b56b54cbf1d8e70c87a434da5350d11533e5fed8) Squashed with commit: radv/ac/llvm: fix regression with shadow samplers fix This fixes b56b54cbf1d8e70c87a434da5350d11533e5fed8: radv/ac/llvm: shadow samplers only return one value It makes sure we only do that for shadow sampling, as opposed to sizing requests. Signed-off-by: Dave Airlie <airlied@redhat.com> Cc: "13.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit b2e217369e1ca4bf9d7741721559a4506b1f0ce8) Squashed with commit: radv: brown-paper bag for a forgotten else. This fixes the fix: radv/ac/llvm: fix regression with shadow samplers fix Signed-off-by: Dave Airlie <airlied@redhat.com> Cc: "13.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 020978af12ef6d598bc5efeae3704c0eb8cdafd2)
| * 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 texel fetch offset with 2d arrays.Dave Airlie2016-11-281-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The code didn't limit the offsets to the number supplied, so if we expected 3 but only got 2 we were accessing undefined memory. This fixes random failures in: dEQP-VK.glsl.texture_functions.texelfetchoffset.sampler2darray_* 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 bb8ac183404541ca8dee31563709d5aca8de0e73)
* | Merge remote-tracking branch 'mesa/13.0' into nougat-x86Chih-Wei Huang2016-11-255-17/+28
|\ \ | |/
| * radv: spir-v allows texture size query with and without lod.Dave Airlie2016-11-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | The translation to llvm was failing here due to required lod. This fixes some new SteamVR shaders. 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 b1340fd708bb873617b8a529ac45cbc9507bd6c4)
| * 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)
| * ac/nir/llvm: fix channel in texture gather lowering code.Dave Airlie2016-11-241-1/+1
| | | | | | | | | | | | | | | | | | This fixes a number of CTS tests like: dEQP-VK.glsl.texture_gather.basic.2d.rgba8ui.size_npot.clamp_to_edge_repeat Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 713522fb8d4366d29be18edc3d5f33faba1cb7c4)
| * 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: fix texturesamples to handle single sample caseDave Airlie2016-11-231-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | We can only read the valid samples if this is an MSAA texture, which means the type field must be 0x14 or 0x15. This fixes: dEQP-VK.glsl.texture_functions.query.texturesamples.* 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 2de85eb97ab2ef45ec23f694a566cd0ec8192885)
* | Merge remote-tracking branch 'mesa/13.0' into nougat-x86Chih-Wei Huang2016-11-167-37/+136
|\ \ | |/
| * 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)
| * amd/addrlib: limit fastcall/regparm to GCC i386Emil Velikov2016-11-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of regparm causes an error on arm/arm64 builds with clang. fastcall is allowed, but still throws a warning. As both options only have effect on 32-bit x86 builds, limit them to that case. v2: keep the __i386__ within GCC (Nicolai) Cc: 13.0 <mesa-stable@lists.freedesktop.org> Cc: Rob Herring <robh@kernel.org> Cc: Nicolai Hähnle <nhaehnle@gmail.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Rob Herring <robh@kernel.org> (cherry picked from commit 190bae7685e230d8fb4e9a0f9ce4a6aa3c7643f5)
| * 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)
| * ac/nir: add support for discard_if intrinsic (v2)Dave Airlie2016-11-091-0/+21
| | | | | | | | | | | | | | | | | | | | | | We are going to start lowering to this in NIR code, so prepare radv for it. v2: handle conversion to kilp properly (nha) Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit dd77faeca2819fc78a72f71ca9b996c209378cde)
| * radv: emit correct last export when Z/stencil export is enabledDave Airlie2016-11-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was getting a random GPU hang in the renderpass simple tests, it turns out sometimes radv emitted the wrong thing "last". This fixes the logic to emit Z/stencil last if they occur, and not mark a color output as last. Also this relies on the Z/STENCIL being the first two fragment outputs, which they are so yay. Fixes: dEQP-VK.renderpass.simple.color_depth (random hangs) 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 bafc75b4370bfbec0c91ff6bb4d4972fb37bb22a)
| * 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)
* | gallium/radeon: define some prototypes of LLVMInitialize functionsChih-Wei Huang2016-11-011-0/+51
|/
* 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 <haagch+mesadev@frickel.club> 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 d548fa882b865b8e5052954b872e392312c38ab8)
* 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: use emit_icmp for samples_identicalDave Airlie2016-10-241-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" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit d842546ad1ebdb4825f0cbca2d68a56139d88e2a)
* 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 <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>