summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-24egl/android: remove flink name supportaosp-master-merge-fdo-master-build-fixesRob Herring
Maintaining both flink names and prime fd support which are provided by 2 different gralloc implementations is problematic because we have a dependency on a specific gralloc implementation header. This mostly removes the dependency on the gralloc implementation and headers. The dependency on GRALLOC_MODULE_PERFORM_GET_DRM_FD remains for now, but the definition is added locally to remove the header dependency. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
2018-04-24android: gallium/util: fix u_debug_stack_android buildMauro Rossi
Fix for build errors in src/gallium/auxiliary/util/u_debug_stack_android.cpp error: cast to 'void *' from smaller integer type pid_t Fixes: ff904978a1 ("gallium/util: Android backtrace support") Cc: "18.1" <mesa-stable@lists.freedesktop.org> Reviewed-By: Stefan Schake <stschake@gmail.com> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
2018-04-24Merge remote-tracking branch 'fdo/master' into aosp-master-merge-fdo-masteraosp-master-merge-fdo-masterSumit Semwal
From aosp/master, dropped the following commits that don't seem required: ba6b824a2cd5 FROMLIST: egl/android: Make drm_gralloc headers optional (v2) cbdafed168f0 Precompile intermediate sources eddd5cb2fa36 Don't use gralloc_drm headers Also, the following commits are already in fdo/master, so dropped: 74d41339087d Android: kill off {MESA_}ANDROID_VERSION defines aka Android 4.1 and older 6973278a62a7 Android: drop Android 4.4 (KitKat) support This branch needs 2 build fix patches. Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
2018-04-23ac: teach get_ac_sampler_dim() about subpass attachmentsSamuel Pitoiset
Suggested by Nicolai. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-04-23ac/nir: add missing round_slice for 1D arraysSamuel Pitoiset
This fixes a bunch of CTS fails with 1D arrays: dEQP-VK.glsl.texture_functions.texture*.sampler1darray_* Fixes: 625dcbbc456 ("amd/common: pass address components individually to ac_build_image_intrinsic") Cc: 18.1 <mesa-stable@lists.freedesktop.org> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-04-23bin/install_megadrivers: rename a few variables to make things clearerDylan Baker
Originally the "each" variable was just a part of the "drivers" variable. It's not anymore so it's a bit ambiguous. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
2018-04-23bin/install_megadrivers: fix DESTDIR and -D*-pathDylan Baker
This fixes -Ddri-drivers-path, -Dvdpau-libs-path, etc. with DESTDIR when those paths are absolute. Currently due to the way python's os.path.join handles absolute paths these will ignore DESTDIR, which is bad. This fixes them to be relative to DESTDIR if that is set. Fixes: 3218056e0eb375eeda470058d06add1532acd6d4 ("meson: Build i965 and dri stack") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
2018-04-23compiler/glsl: close fd's in glcpp_test.pyDylan Baker
I would have thought falling out of scope would allow the gc to collect these, but apparently it doesn't, and this hits an fd limit on macos. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106133 Fixes: db8cd8e36771eed98eb638fd0593c978c3da52a9 ("glcpp/tests: Convert shell scripts to a python script") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Vinson Lee <vlee@freedesktop.org>
2018-04-23nir: Do not use progress for unreachable code in return lowering.Bas Nieuwenhuizen
We seem to use progress for two cases: 1) When we lowered some returns. 2) When we remove unreachable code. If just case 2 happens we assert as state->return_flag has not been allocated yet, but we are still trying to do insert all predicates based on it. This splits the concerns. We only use progress internally for case 1 and then keep track of 2 in a separate variable to indicate progress in the return value of the pass. This is slightly better than transforming the assert into if (!state->return_flag) return, as the solution in this patch avoids inserting predicates even if some other part of the might need them. Fixes: 6e22ad6edc "nir: return early when lowering a return at the end of a function" CC: 18.1 <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106174 Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-04-23radv: advertise 8 bits of subpixel precision for viewportsJózef Kucia
This is what radeonsi does. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-04-23st/dri: Fix dangling pointer to a destroyed dri_drawableJohan Klokkhammer Helsing
If an EGLSurface is created, made current and destroyed, and then a second EGLSurface is created. Then the second malloc in driCreateNewDrawable may return the same pointer address the first surface's drawable had. Consequently, when dri_make_current later tries to determine if it should update the texture_stamp it compares the surface's drawable pointer against the drawable in the last call to dri_make_current and assumes it's the same surface (which it isn't). When texture_stamp is left unset, then dri_st_framebuffer_validate thinks it has already called update_drawable_info for that drawable, leaving it unvalidated and this is when bad things starts to happen. In my case it manifested itself by the width and height of the surface being unset. This is fixed this by setting the pointer to NULL before freeing the surface. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106126 Signed-off-by: Johan Klokkhammer Helsing <johan.helsing@qt.io> Signed-off-by: Marek Olšák <marek.olsak@amd.com> Cc: 18.0 18.1 <mesa-stable@lists.freedesktop.org>
2018-04-22nv50/ir: make a copy of tex src if it's referenced multiple timesIlia Mirkin
For nv50 we coalesce the srcs and defs into a single node. As such, we can end up with impossible constraints if the source is referenced after the tex operation (which, due to the coalescing of values, will have overwritten it). This logic already exists for inserting moves for MERGE/UNION sources. It's the exact same idea here, so leverage that code, which also includes a few optimizations around not extending live ranges unnecessarily. Fixes tests/spec/glsl-1.30/execution/fs-textureSize-components.shader_test Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2018-04-23virgl: disable virgl when no 3D for virtio gpu.Lepton Wu
If users are running mesa under old version of qemu or have turned off GL at runtime, virtio gpu driver actually doesn't work. Adds a detection here so mesa can fall back to software rendering. v2: - move detection from loader to virgl (Ilia, Emil) Signed-off-by: Lepton Wu <lepton@chromium.org> Reviewed-by: Dave Airlie <airlied@redhat.com>
2018-04-23radv: mark const structs as extern in header file to avoid lto damageDave Airlie
The copr repo from che was using LTO and he reported radv broke recently with it. When testing with lto builds here I noticed that we weren't seeing any instance extensions reported. It appears LTO was treating the const without extern as an empty struct, this is possibly a gcc bug, but we can work around it just by marking these with extern. Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-04-22Bump version after 18.1Dylan Baker
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
2018-04-21gallium/tests/trivial: fix viewport depth transformIlia Mirkin
These were getting mapped off into outer space, which would cause nv50 and nvc0 to clip the primitives (as depth_clip was enabled). These drivers are configured to clip everything outside the [0, 1] range, even though the hardware supports other view settings. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2018-04-21trace: allow image resource to be nullIlia Mirkin
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-04-21nv50/ir/ra: prefer def == src2 for fma with immediates on nvc0Karol Herbst
This helps with the PostRALoadPropagation pass moving long immediates into FMA/MAD instructions. changes in shader-db: total instructions in shared programs : 5894114 -> 5886074 (-0.14%) total gprs used in shared programs : 666558 -> 666563 (0.00%) total shared used in shared programs : 520416 -> 520416 (0.00%) total local used in shared programs : 53524 -> 53524 (0.00%) total bytes used in shared programs : 54006744 -> 53932472 (-0.14%) local shared gpr inst bytes helped 0 0 2 4192 4192 hurt 0 0 7 9 9 Signed-off-by: Karol Herbst <karolherbst@gmail.com> [imirkin: minor edits to separate nv50 and nvc0+ cases] Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2018-04-21docs/features: mark GL_ARB_post_depth_coverage as DONE for nvc0Rhys Perry
This was done a while ago but never marked on features.txt. Note that this is only supported on GM200+. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2018-04-20autotools: Include new meson filesDylan Baker
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2018-04-20autotools: Add passes.h to sources so it will be included in the tarballDylan Baker
This was introduced in commit 8f848ada8a42d9aaa8136afa1bafe32281a0fb48 but not added to the sources list, which is necessary for it to be included in release tarballs. Fixes: 8f848ada8a42d9aaa8136afa1bafe32281a0fb48 ("swr/rast: Start refactoring of builder/packetizer.") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2018-04-20autotools: include include/vulkan headersDylan Baker
This is needed to provide vk_android_native_buffer.h for vk_enum_to_str. v2: - remove accidentally included changes Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2018-04-20nvc0: fix line width on GM20x+Rhys Perry
This has the side-effect of fixing polygon-offset piglit test failures. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2018-04-20i965/miptree: Delete an unused functionNanley Chery
We're going to combine ::mcs_buf and ::hiz_buf in later commits. Once that happens, this function no longer make sense. Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-04-20i965/miptree: Don't leak the clear_color_boNanley Chery
Free the clear_color_bo in addition to freeing the intel_miptree_aux_buffer which holds the reference to it. Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-04-20i965/blorp: Do the gen11 BTI flushJason Ekstrand
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2018-04-20anv/blorp: Do the gen11 BTI flushJason Ekstrand
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2018-04-20etnaviv: fix texture_format_needs_swizLucas Stach
memcmp returns 0 when both swizzles are the same, which means we don't need any hardware swizzling. texture_format_needs_swiz should return true when the return value of the memcmp is non-zero. Fixes: 751ae6afbefd ("etnaviv: add support for swizzled texture formats") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Tested-by: Marek Vasut <marex@denx.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
2018-04-20ac/nir: fix image dimension for subpass attachmentsSamuel Pitoiset
For subpass attachments we need one more coordinate with the layer, so make them array types. This fixes a bunch of CTS fails with RADV. Fixes: 24fb3e6aa1 ("ac/nir: use ac_build_image_opcode for image intrinsics") Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-20radv: Mark GTT memory as device local for APUs.Bas Nieuwenhuizen
Otherwise a lot of games complain about not having enough memory, and it is sort of local so this seems reasonable to me. CC: 18.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-04-20radv/winsys: allow to submit up to 4 IBs for chips without chainingSamuel Pitoiset
The SI family doesn't support chaining which means the maximum size in dwords per CS is limited. When that limit was reached we failed to submit the CS and the application crashed. This patch allows to submit up to 4 IBs which is currently the limit, but recent amdgpu supports more than that. Please note that we can reach the limit of 4 IBs per submit but currently we can't improve that. The only solution is to upgrade libdrm. That will be improved later but for now this should fix crashes on SI or when using RADV_DEBUG=noibs. Fixes: 36cb5508e89 ("radv/winsys: Fail early on overgrown cs.") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105775 Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-20gallium/util: Android backtrace supportStefan Schake
We can't use any of the existing implementations in u_debug_stack. Android technically has libunwind, but it's been modified to the point where it no longer compiles with the Mesa usage. The library is also not meant to be referenced by vendor libraries. The officially sanctioned way of obtaining backtraces is through the Android own libbacktrace, a C++ library. Access it through a separate C++ source file on Android only. Signed-off-by: Stefan Schake <stschake@gmail.com> Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-04-20gallium/util: Don't stub u_debug_stack on AndroidStefan Schake
The fallback path for no libunwind ends up being stubs for Android. Don't compile them in so we can provide our own implementation. Signed-off-by: Stefan Schake <stschake@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-04-20ac/nir: handle nir_intrinsic_load_first_vertex like base_vertexSamuel Pitoiset
This fixes a ton of CTS crashes. Fixes: c366f422f0 ("nir: Offset vertex_id by first_vertex instead of base_vertex") Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-20radv/winsys: allow local BOs on APUsSamuel Pitoiset
Ported from RadeonSI. Local BOs ignore BO priorities, and we don't need those on APUs. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-20radv: use a global BO list only for VK_EXT_descriptor_indexingSamuel Pitoiset
Maintaining two different paths is annoying but this gets rid of the performance regression introduced by the global BO list. We might find a better solution in the future, but for now just keeps two paths. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-20Revert "radv: Don't store buffer references in the descriptor set."Samuel Pitoiset
In order to reduce a performance regression introduced by 4b13fe55a4 ("radv: Keep a global BO list for VkMemory."), we are going to maintain two different paths. One when VK_EXT_descriptor_indexing is enabled by the application because we need to have a global BO list, and one (the old one) when it's not enabled. With Talos on Polaris, the global BO list reduces performance by 10% which is too much for me. This reverts commit ab6cadd3ecc7fbdd9079808b407674e0b19c52f0. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-20i965/fs: retype offset_reg to UD at load_ssboJose Maria Casanova Crespo
All operations with offset_reg at do_vector_read are done with UD type. So copy propagation was not working through the generated MOVs: mov(8) vgrf9:UD, vgrf7:D This change allows removing the MOV generated for reading the first components for 16-bit and 64-bit ssbo reads with non-constant offsets. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2018-04-20ac/nir: use ac_build_image_opcode for image intrinsicsNicolai Hähnle
So that we'll use the dimension-aware intrinsics in the future. Acked-by: Marek Olšák <marek.olsak@amd.com>
2018-04-20radeonsi: generate image load/store/atomic ops using ac_build_image_opcodeNicolai Hähnle
In preparation of dimension-aware LLVM image intrinsics. Acked-by: Marek Olšák <marek.olsak@amd.com>
2018-04-20amd/common: pass address components individually to ac_build_image_intrinsicNicolai Hähnle
This is in preparation for the new image intrinsics. Acked-by: Marek Olšák <marek.olsak@amd.com>
2018-04-20amd/common: pass new enum ac_image_dim to ac_build_image_opcodeNicolai Hähnle
This is in preparation for the new, dimension-aware LLVM image intrinsics. Acked-by: Marek Olšák <marek.olsak@amd.com>
2018-04-20radeonsi/nir: fix crash in test involving the sample maskNicolai Hähnle
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-04-20radeonsi/nir: set FS properties only when scanning a fragment shaderNicolai Hähnle
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-04-20ac/nir: fix atomic compare-and-swapNicolai Hähnle
The LLVM instruction returns { i32, i1 }, where the i1 indicates success. We're only interested in the first part, which is the loaded value. Fixes dEQP-GLES31.functional.compute.shared_var.atomic.compswap.* Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-04-20radeonsi: fix error paths of si_texture_transfer_mapNicolai Hähnle
trans is zero-initialized, but trans->resource is setup immediately so needs to be dereferenced. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-04-20glsl: prevent spurious Valgrind errors when serializing NIRNicolai Hähnle
It looks as if the structure fields array is fully initialized below, but in fact at least gcc in debug builds will not actually overwrite the unused bits of bit fields. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-04-19clover: Fix host access validation for sub-buffer creationAaron Watry
From CL 1.2 Section 5.2.1: CL_INVALID_VALUE if buffer was created with CL_MEM_HOST_WRITE_ONLY and flags specify CL_MEM_HOST_READ_ONLY , or if buffer was created with CL_MEM_HOST_READ_ONLY and flags specify CL_MEM_HOST_WRITE_ONLY , or if buffer was created with CL_MEM_HOST_NO_ACCESS and flags specify CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_WRITE_ONLY . Fixes CL 1.2 CTS test/api get_buffer_info v2: Correct host_access_flags check (Francisco) Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2018-04-19nir: Offset vertex_id by first_vertex instead of base_vertexNeil Roberts
base_vertex will be zero for non-indexed calls and in that case we need vertex_id to be offset by the ‘first’ parameter instead. That is what we get with first_vertex. This is true for both GL and Vulkan. The freedreno driver is also setting vertex_id_zero_based on nir_options. In order to avoid breakage this patch switches the relevant code to handle SYSTEM_VALUE_FIRST_VERTEX so that it can retain the same behavior. v2: change a3xx/fd3_emit.c and a4xx/fd4_emit.c from SYSTEM_VALUE_BASE_VERTEX to SYSTEM_VALUE_FIRST_VERTEX (Kenneth). Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: Rob Clark <robdclark@gmail.com> Acked-by: Marek Olšák <marek.olsak@amd.com>
2018-04-19spirv: Lower BaseVertex to FIRST_VERTEX instead of BASE_VERTEXNeil Roberts
The base vertex in Vulkan is different from GL in that for non-indexed primitives the value is taken from the firstVertex parameter instead of being set to zero. This coincides with the new SYSTEM_VALUE_FIRST_VERTEX instead of BASE_VERTEX. v2 (idr): Add comment describing why SYSTEM_VALUE_FIRST_VERTEX is used for SpvBuiltInBaseVertex. Suggested by Jason. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> [v1] Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>