summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-04-04meson: Use dep_llvm when finding clang modulesHEADmasterThierry Reding1-14/+12
When cross-compiling OpenCL support, clover will encode the LLVM library path so that it can add the proper directory (containing opencl-c.h) to the include path during runtime compilation of programs. In order for that to work, the LLVM library directory needs to be an absolute path in the host filesystem. However, during cross-compilation the LLVM library directory will also be used to find the clang modules to link against. But at build time the clang modules will have to be looked up in th LLVM library directory within the host sysroot, which is a cross-compilation staging area that is located in an arbitrary directory on the build filesystem. However, the library search path provided by the dep_llvm dependency contains the correct path to the clang modules at build time, so the dependency can be passed to the cc.find_library() command to properly check for the existence of the library and whether it can actually be linked to. NOTE: This depends on a patch that hasn't been merged into Meson yet. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04meson: Fix placeholder dependenciesThierry Reding3-45/+45
Using empty lists ([]) for placeholder dependencies causes warnings from recent versions of Meson about how dependency types cannot be compared to a list. To fix that, use proper placeholder dependencies using: dependency('', required : False) This creates an object that can be used in the same context as normal dependencies, but it is marked as not found and doesn't provide any flags or libraries on compiler command-lines. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04meson: Use proper empty dependenciesThierry Reding1-1/+1
declare_dependency() returns a project internal dependency which is always marked as found. However, that's not what we want for default external dependencies. External dependencies should by default not be found so that conditionals will behave correctly. The proper way to do that is using dependency('', required : false). Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04remove debug messagesThierry Reding9-1001/+87
2018-04-04WIP: nouveau: Support ASTC/ETC2 formats on GM200Thierry Reding1-1/+2
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04loader: Add support for USB devicesThierry Reding1-0/+5
Allow USB devices to be used as output slaves for PRIME. Note that this currently doesn't work on the X.Org server's built-in modesetting driver because it requires glamor in order to expose the necessary capabilities through RandR. It should be possible to use this in order to accelerate Wayland clients on the GPU, though it's questionable how useful that is without having a compositor that gets accelerated. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04loader: Remove gratuituous blank linesThierry Reding1-1/+0
A single blank line is enough to separate functions from each other, no need for two. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04HACK: nouveau: Add debugging outputThierry Reding6-22/+112
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04HACK: tegra: Add debugging outputThierry Reding3-65/+889
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04gallium: Add helper to print flush flagsThierry Reding2-0/+14
This can be useful for debugging purposes because the flush flag names are easier to read for humans than the numerical values. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04gallium: Add support for dumping framebuffer modifiersThierry Reding5-1/+143
Adds a simple helper that can be used to dump the name of a framebuffer modifier for debug purposes. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04nouveau: Support fence FDsThierry Reding6-8/+75
Implements fence FDs based on new libdrm API and the accompanying IOCTL. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04tegra: Treat resources with modifiers as scanoutThierry Reding1-1/+12
Resources created with modifiers are treated as scanout because there is no way for applications to specify the usage (though that capability may be useful to have in the future). Currently all the resources created by applications with modifiers are for scanout, so make sure they have bind flags set accordingly. This is necessary in order to properly export buffers for such resources so that they can be shared with scanout hardware. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04tegra: Fix scanout resources without modifiersThierry Reding1-1/+18
Resources created for scanout but without modifiers need to be treated as pitch-linear. This is because applications that don't use modifiers to create resources must be assumed to not understand modifiers and in turn won't be able to create a DRM framebuffer and passing along which modifiers were picked by the implementation. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04tegra: Remove usage of non-stable UAPIThierry Reding1-66/+3
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04tegra: Do not import resource on failureThierry Reding1-1/+1
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-04radv: implement out-of-order rasterization when it's safe on VI+Samuel Pitoiset6-3/+279
Disabled by default for now, it can be enabled with RADV_PERFTEST=outoforder. No CTS regressions on Polaris, and all Vulkan games I tested look good as well. Expect small performance improvements for applications where out-of-order rasterization can be enabled by the driver. Loosely based on RadeonSI. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-04radv: change blend_enable field to use four bits per CBSamuel Pitoiset1-3/+5
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-04radv: scan which color blend attachments are enabledSamuel Pitoiset1-0/+2
With cb_target_enabled_4bit in order to have four bits per CB. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-04radv: put more fields in radv_blend_stateSamuel Pitoiset1-20/+17
Some will be used for further optimizations (ie. out-of-order rast). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-04radv: do not always disable dual quad mode when chip has RbPlusSamuel Pitoiset1-3/+17
For GFX9+ only, RadeonSI does this too. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-04radv: don't use the SPI barrier management bug workaroundSamuel Pitoiset1-0/+5
Ported from RadeonSI. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-04radv: mask out high VM address bits in registers where neededSamuel Pitoiset3-19/+19
Ported from RadeonSI. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-04intel: compiler: silence compiler warningLionel Landwerlin1-0/+1
../src/intel/compiler/brw_reg.h: In function ‘bool brw_regs_negative_equal(const brw_reg*, const brw_reg*)’: ../src/intel/compiler/brw_reg.h:305:1: warning: control reaches end of non-void function [-Wreturn-type] Introduced by 8f83eea71e233 ("i965: Add negative_equals methods"). Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2018-04-04compiler/spirv: set is_shadow for depth comparitor sampling opcodesIago Toral Quiroga1-1/+2
From the SPIR-V spec, OpTypeImage: "Depth is whether or not this image is a depth image. (Note that whether or not depth comparisons are actually done is a property of the sampling opcode, not of this type declaration.)" The sampling opcodes that specify depth comparisons are OpImageSample{Proj}Dref{Explicit,Implicit}Lod, so we should set is_shadow only for these (we were using the deph property of the image until now). v2: - Do the same for OpImageDrefGather. - Set is_shadow to false if the sampling opcode is not one of these (Jason) - Reuse an existing switch statement instead of adding a new one (Jason) Fixes crashes in: dEQP-VK.spirv_assembly.instruction.graphics.image_sampler.depth_property.* Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Cc: mesa-stable@lists.freedesktop.org
2018-04-03i965: Extend the negative 32-bit deltas to 64-bitsSergii Romantsov1-1/+1
Gen8+ use 48-bit address relocations so need to extend the sign to 64-bit return value. Without it we have higher bits zeroed and missing the negavive values. Haswell and older use 32-bit deltas so are unaffected by this issue. v2: used int32_t fucntion parameter instead of explicit type conversion. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101408 Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com> Tested-by: Andriy Khulap <andriy.khulap@globallogic.com> Tested-by: Stuart Young <cefiar@gmail.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "18.0 17.3" <mesa-stable@lists.freedesktop.org>
2018-04-03nir/lower_vec_to_movs: Only coalesce if the vec had a SSA destinationJason Ekstrand1-1/+6
Otherwise we may end up trying to coalesce in a case such as ssa_1 = fadd r1, r2 r3.x = fneg(r2); r3 = vec4(ssa_1, ssa_1.y, ...) and that would cause us to move the writes to r3 from the vec to the fadd which would re-order them with respect to the write from the fneg. In order to solve this, we just don't coalesce if the destination of the vec is not SSA. We could try to get clever and still coalesce if there are no writes to the destination of the vec between the vec and the ALU source. However, since registers only come from phi webs and indirects, the chances of having a vec with a register destination that is actually coalescable into its source is very slim. Shader-db results on Haswell: total instructions in shared programs: 13657906 -> 13659101 (<.01%) instructions in affected programs: 149291 -> 150486 (0.80%) helped: 0 HURT: 592 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105440 Fixes: 2458ea95c56 "nir/lower_vec_to_movs: Coalesce movs on-the-fly when possible" Reported-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com> Tested-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2018-04-03anv: Fix close(fd) before import issue in vkCreateDmaBufImageINTELKevin Strasser1-2/+2
If we close the fd before calling DRM_IOCTL_PRIME_FD_TO_HANDLE the kernel will hit a -EBADF error. Move the close(fd) call to the end of anv_CreateDmaBufImageINTEL(). Signed-off-by: Kevin Strasser <kevin.strasser@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-04-04glsl: always call do_lower_jumps() after loop unrollingTimothy Arceri1-0/+18
This fixes a bug in radeonsi where LLVM cannot handle the case where a break exists but its not the last instruction in the block. LLVM would fail with: Terminator found in the middle of a basic block! LLVM ERROR: Broken function found, compilation aborted! Fixes: 96fe8834f539 "glsl_to_tgsi: do fewer optimizations with GLSLOptimizeConservatively" Reviewed-by: Matt Turner <mattst88@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105317
2018-04-03vulkan/wsi/wayland: fix leaksJames Legg1-0/+4
Fixes: bfa22266cd ("vulkan/wsi/wayland: Add support for zwp_dmabuf") Reviewed-by: Daniel Stone <daniels@collabora.com> CC: Jason Ekstrand <jason@jlekstrand.net>
2018-04-03docs: update calendar, add news and link release notes to 17.3.8Juan A. Suarez Romero3-7/+8
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2018-04-03docs: add sha256 checksums for 17.3.8Juan A. Suarez Romero1-1/+2
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> (cherry picked from commit ba371c7262a484391cace9d5e17635ed14c58692)
2018-04-03docs: add release notes for 17.3.8Juan A. Suarez Romero1-0/+146
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> (cherry picked from commit 3bf5c10c5c0e9fac6eb0b2c201bcf44755ecfaec)
2018-04-03st/mesa: Also use PIPE_FORMAT_R8G8B8A8_SRGB for framebuffer_sRGB.Jakob Bornecrantz1-1/+2
When running virgl on a GLES host the only sRGB formats that support rendering is RGBA and RGBX. That pipe format is in the sRGB default lists that the state tracker uses when mapping mesa formats. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
2018-04-03intel: gen-decoder: print all dword a field belongs toLionel Landwerlin2-7/+9
Prior to printing a decoded field, print out all dwords that field belongs to. In particular with address fields spanning multiple dwords, we want to have all the dwords presented before the field is decoded to make it easier to read. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
2018-04-03intel: genxml: decode variable length MI_LRILionel Landwerlin10-0/+40
MI_LOAD_REGISTER_IMM can load multiple (register, value) tuples in one command. In our drivers we only use one tuple at a time, but the kernel might load more than one at a time. Instead of making all the tuple part of a group, we leave out the first tuple (the one we use in the generated packing structures). This is particularly useful for looking at error stats generated by the kernel. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
2018-04-03intel: gen-decoder: don't decode fields beyond a dword lengthLionel Landwerlin1-15/+26
For example, a PIPE_CONTROL with DWordLength = 2 should look like this : 0xffffe374: 0x7a000002: PIPE_CONTROL 0xffffe374: 0x7a000002 : Dword 0 DWord Length: 2 0xffffe378: 0x00800000 : Dword 1 Depth Cache Flush Enable: false Stall At Pixel Scoreboard: false State Cache Invalidation Enable: false Constant Cache Invalidation Enable: false VF Cache Invalidation Enable: false DC Flush Enable: false Pipe Control Flush Enable: false Notify Enable: false Indirect State Pointers Disable: false Texture Cache Invalidation Enable: false Instruction Cache Invalidate Enable: false Render Target Cache Flush Enable: false Depth Stall Enable: false Post Sync Operation: 0 (No Write) Generic Media State Clear: false TLB Invalidate: false Global Snapshot Count Reset: false Command Streamer Stall Enable: false Store Data Index: 0 LRI Post Sync Operation: 1 (MMIO Write Immediate Data) Destination Address Type: 0 (PPGTT) Flush LLC: false 0xffffe37c: 0x00000000 : Dword 2 Address: 0x00000000 0xffffe384: 0x05000000: MI_BATCH_BUFFER_END Prior to this change, fields beyond the length of the command would be decoded (notice the MI_BATCH_BUFFER_END decoded as part of the previous PIPE_CONTROL) : 0xffffe374: 0x7a000002: PIPE_CONTROL 0xffffe374: 0x7a000002 : Dword 0 DWord Length: 2 0xffffe378: 0x00800000 : Dword 1 Depth Cache Flush Enable: false Stall At Pixel Scoreboard: false State Cache Invalidation Enable: false Constant Cache Invalidation Enable: false VF Cache Invalidation Enable: false DC Flush Enable: false Pipe Control Flush Enable: false Notify Enable: false Indirect State Pointers Disable: false Texture Cache Invalidation Enable: false Instruction Cache Invalidate Enable: false Render Target Cache Flush Enable: false Depth Stall Enable: false Post Sync Operation: 0 (No Write) Generic Media State Clear: false TLB Invalidate: false Global Snapshot Count Reset: false Command Streamer Stall Enable: false Store Data Index: 0 LRI Post Sync Operation: 1 (MMIO Write Immediate Data) Destination Address Type: 0 (PPGTT) Flush LLC: false 0xffffe37c: 0x00000000 : Dword 2 Address: 0x00000000 0xffffe380: 0x00000000 : Dword 3 0xffffe384: 0x05000000 : Dword 4 Immediate Data: 83886080 0xffffe384: 0x05000000: MI_BATCH_BUFFER_END Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
2018-04-03intel: error_decode: add an option to decode all buffersLionel Landwerlin1-2/+7
The kernel reports workaround batch buffers, but we're not presenting them currently. Also they might not be useful for debugging purely userspace driver issues, when problems arise because of interactions between kernel & userspace drivers, it's nice to be able to decode them. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
2018-04-03intel: genxml: add preemption control instructionsLionel Landwerlin4-0/+26
Helpful to debug kernel workaround batchbuffers. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
2018-04-03mesa: ensure that variable is initializedDylan Baker1-1/+1
This variable controls whether we link using the glsl code path or the spirv path. It's set when we validate that all shaders are glsl or spirv, but if there are no shaders attached to the program it will remain unset, resulting in undefined behavior. We want to go down the glsl path in that case, so initialize to false. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105820 Fixes: 16f6634e7fb5ada308e55b852cd49251e7f3f8b1 ("mesa/program: Link SPIR-V shaders using the SPIR-V code-path") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Tested-by: Mark Janes <mark.a.janes@intel.com> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
2018-04-03radeonsi/gfx9: fix bad LLVM params in monolithic LS+HSMarek Olšák1-1/+5
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-04-03radv: enable VK_EXT_shader_viewport_index_layerSamuel Pitoiset2-0/+2
The driver already supports exporting the Layer and ViewportIndex built-ins from vertex or tessellation shaders. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-03nir+drivers: add helpers to get # of src/dest componentsRob Clark6-25/+32
Add helpers to get the number of src/dest components for an intrinsic, and update spots that were open-coding this logic to use the helpers instead. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2018-04-03freedreno/ir3: fix fallout of unused false-depth eliminationRob Clark2-17/+19
Since we were MARK flag for both preventing loops, and tracking whether instructions were used, we could end up in an infinite loop due to bd2ca2bcdd. Instead invert the logic.. mark all instructions UNUSED up front and clear the flag as we visit them. Fixes: bd2ca2bcdd freedreno/ir3: eliminate unused false-deps Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-04-03gallium/pipebuffer: fix parenthesis locationTimothy Arceri1-1/+1
Without this the return value will never get set to -1. This was first added in 49866c8f3457 and copied in 2b396eeed983. Fixes: 2b396eeed983 "gallium/pb_cache: add a copy of cache bufmgr independent of pb_manager" Reviewed-by: Marek Olšák <marek.olsak@amd.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102342
2018-04-03Revert "mesa: add GL_HALF_FLOAT as supported type to readpixels"Tapani Pälli1-2/+0
This reverts commit 41cf30b8bc55fdf36adac3311002dc32b6715949. Commit caused regressions with KHR-GLES3.packed_pixels.* tests. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Suggested-by: Eric Anholt <eric@anholt.net>
2018-04-02gallivm: Fix include for LLVMAddPromoteMemoryToRegisterPassMike Lothian1-0/+3
Include llvm-c/Transforms/Utils.h with the newest LLVM 7 Signed-of-by: Mike Lothian <mike@fireburn.co.uk> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2018-04-02radeonsi: Fix include for LLVMAddPromoteMemoryToRegisterPassMike Lothian1-0/+3
Include llvm-c/Transforms/Utils.h with the newest LLVM 7 Signed-of-by: Mike Lothian <mike@fireburn.co.uk> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2018-04-02ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPassMike Lothian1-0/+3
Include llvm-c/Transforms/Utils.h with the newest LLVM 7 Signed-of-by: Mike Lothian <mike@fireburn.co.uk> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2018-04-02st/dri: Initialise modifier to INVALID for DRI2Daniel Stone1-0/+1
When allocating a buffer for DRI2, set the modifier to INVALID to inform the backend that we have no supplied modifiers and it should do its own thing. The missed initialisation forced linear, even if the implementation had made other decisions. This resulted in VC4 DRI2 clients failing with: Modifier 0x0 vs. tiling (0x700000000000001) mismatch Signed-off-by: Daniel Stone <daniels@collabora.com> Reported-by: Andreas Müller <schnitzeltony@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Fixes: 3f8513172ff6 ("gallium/winsys/drm: introduce modifier field to winsys_handle")