Commit Graph

96696 Commits

Author SHA1 Message Date
Dylan Baker
90b5ec6c5f meson: Don't try to install dri drivers unless one is built
This confused the with_dri flag which is meant to control Direct
Rendering Infrastructure, not classic drivers

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-16 16:32:43 -07:00
Dylan Baker
601bd7296f meson: Set _GNU_SOURCE
When we start adding non-free software platforms support we'll need to
guard this, but for now it should be fine as is.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-16 16:32:43 -07:00
Dylan Baker
e21e0a6a70 meson: add checks for version script and dynamic list
These are used by gallium drivers.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-16 16:32:43 -07:00
Dylan Baker
e4796ab7c8 configure: commit test files
These are currently auto-generated, but meson needs the same files, so
lets commit them to reduce duplication.

v3: - Rename .build to build-support

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2017-10-16 16:32:43 -07:00
Dylan Baker
3b209e9304 meson: Add switch for texture float
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-16 16:32:43 -07:00
Kenneth Graunke
9e779e59b2 Revert "i965/tex_image: Reference the renderbuffer miptree in setTexBuffer2"
This reverts commit d80cbbeaff.

It turns out that formats do matter - the framebuffer's miptree has an
sRGB format, and the one we created did not.  This broke rendering when
using KWin compositing, GNOME Terminal Fedora (with a transparent
background), and Qt menu rendering in general, to name a few.

It's been a month and this hasn't been fixed, and I'm sick of reverting
this patch or applying NAK'd hacks and restarting various programs at
random times every day, multiple times a day, to keep my desktop
environment functional.

The only benefit of this patch was to prepare the way for modifiers,
which AFAIK aren't finished yet anyway, so there's really no downside
to reverting it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102924
2017-10-16 16:02:53 -07:00
Rob Herring
c6e584f194 Android: add libmesa_nir dependency to libmesa_dricore
Commit 32fcced7b4 ("meta: Unset the textures_used_by_txf bitfield.")
added a dependency in libmesa_dricore to NIR headers, but failed to add
libmesa_nir as a dependency resulting in a build error:

In file included from external/mesa3d/src/mesa/drivers/common/meta.c:90:
external/mesa3d/src/compiler/nir/nir.h:48:10: fatal error: 'nir_opcodes.h' file not found

Add libmesa_nir as a static library dependency to libmesa_dricore.

Fixes: 32fcced7b4 ("meta: Unset the textures_used_by_txf bitfield.")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2017-10-16 14:49:37 -05:00
Chris Wilson
2c4097aff1 i965: Only put external handles into the handle ht
We know that we will only ever need to lookup an external handle and so
can defer adding a bo to the external ht until it is ever exported or
imported, keeping that hashtable compact.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-10-16 11:52:59 -07:00
Eric Engestrom
b05820621d svga: format the version string like the rest of mesa
All 4 other version strings do it like this.
((Also, double parentheses just look confusing))

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2017-10-16 18:52:41 +01:00
Eric Engestrom
16be271c6e git_sha1_gen: use git_sha1.h.in on all build systems
Meson already uses this, let's get the other build sys to use it too.

Note: rstrip() was dropped, as truncating to the first 10 chars already
gets rid of the terminating newline (not an issue with the env var
either, unless maliciously crafted to break the build... not sure this
is a real-world issue).

Verified to work and give the same output as before on both python 2
and 3 :)

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2017-10-16 18:52:35 +01:00
Brian Paul
4542a63254 svga: fix format_conversion_table breakage
The new A1B5G5R5_UNORM, X1B5G5R5_UNORM formats were added in the
wrong place in commit ef874ee450.

Fixes: ef874ee450 "gallium: Add support for 5551 with the 1-bit field in the low bit."

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-16 10:58:02 -06:00
Jason Ekstrand
92d3f21ec2 i965/miptree: Drop the invalidate parameter form copy_teximage
This was a leftover from i915.  The one caller in i965 always passes in
false so there's no point in having the parameter.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-10-16 08:06:02 -07:00
Jason Ekstrand
b03b19f558 anv: Get rid of gen fall-through
In the early days of the Vulkan driver, we thought it would be a good
idea to just make genN just fall back to the genN-1 code if it didn't
need to be any different for genN.  While this seemed like a good idea,
it ultimately ended up being far simpler to just recompile everything.
We haven't been using the fall-through functionality for some time so
we're better off just deleting it so it doesn't accidentally start
causing problems.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-10-16 08:04:56 -07:00
Jason Ekstrand
9cec35579c intel/common: Improve the comments for sample positions
These are pulled directly from brw_multisample_state.h

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-10-16 08:04:56 -07:00
Samuel Pitoiset
f16382d35b radv: update ia_multi_vgt when executing secondary buffers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-16 14:50:30 +02:00
Samuel Pitoiset
47d7d18613 radv: be smarter with the draw packets when executing secondary buffers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-16 14:50:27 +02:00
Samuel Pitoiset
b253f3189a radv: always dirty some states after executing secondary buffers
The spec requires the number of buffer to be greater than 0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-16 14:09:51 +02:00
Samuel Pitoiset
4e65b4ea4b radv: be smarter with pipelines when emitting secondary buffers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-16 14:09:51 +02:00
Jakob Bornecrantz
67dd52e7e8 docs: Add EXT_memory_objects extensions to features.txt
These extensions are good for Vulkan interop, so track them.

Signed-off-by: Jakob Bornecrantz <jakob.bornecrantz@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-10-16 11:05:41 +01:00
Timothy Arceri
f1eb5e6399 nir: add component level support to remove_unused_io_vars()
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-16 09:06:53 +11:00
Timothy Arceri
9f7127f5d2 glsl: mark xfb inputs as always_active_io
We won't split varyings marked as always active because there
is no point in doing so. This means we need to mark both
sides of the interface as always active otherwise we will have
a mismatch and start removing things we shouldn't.

Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-16 09:06:53 +11:00
Timothy Arceri
6af5e0bec9 nir: add variant of lower_io_to_scalar to be called earlier
This is intended to be called before nir_lower_io() so that we
can do some linking optimisations with the results. It can also
be used with drivers that don't use nir_lower_io() at all such
as RADV.

v2: pass mode mask rather than first and last stage integer.

Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-16 09:06:53 +11:00
Timothy Arceri
3b59f5ca17 nir: add glsl_channel_type() helper
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-16 09:06:53 +11:00
Timothy Arceri
421c1b9bd6 nir: add glsl_type_is_64bit() to nir_types
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-16 09:06:53 +11:00
Ilia Mirkin
790b5c4a38 a2xx: add support for a few 16-bit color rendering formats
The rest should be possible too, just needs some additional
investigation. Passes fbo-*-formats piglit tests.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
2017-10-15 12:09:21 -04:00
Wladimir J. van der Laan
d3af7f5153 freedreno/a20x: Enable rendering to RGBA/RGBX
Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2017-10-15 12:09:14 -04:00
Wladimir J. van der Laan
c10eeb454d freedreno/a20x: Fix rendering to BGRX
Make sure that BGRX rendering is swapped the correct way around.

Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2017-10-15 12:09:03 -04:00
Brian Paul
c7a81dcea9 mesa: minor simplification in test_attachment_completeness()
We already have a pointer to the texture object.  Use it here.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-10-14 10:30:27 -06:00
Lucas Stach
4daee6733f etnaviv: rework TS enable to be a derived state
Draw operations should not use the TS if the TS buffer content is invalid,
as this leads to wrong rendering or even GPU hangs. As the TS valid status
can change between draws (clear operations changing it to valid, blits using
the RS to the color or ZS buffer changing it to invalid), the TS_MEM_CONFIG
must be updated before each draw if the status has changed.

This fixes the remaining TS related piglit failures (regressions of a
standard run against a piglit run with TS completely disabled).

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-10-14 16:40:08 +02:00
Lucas Stach
34360ac6ed etnaviv: skip unused vertex attributes when assigning VS inputs
When not all of the vertex attributes are actually used in the shader,
we end up with some inputs without an assigned reg. Those are marked
as invalid and must be skipped when assigning the inputs, as those would
overwrite other valid inputs otherwise.

Fixes piglit drawpixels and a bunch of other tests using the st_draw path.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-10-14 16:39:46 +02:00
Samuel Pitoiset
0c1aecf177 radv: do not allocate CMASK for non-MSSA images with 128 bit formats
This saves some useless CMASK initializations/eliminations in
the Vulkan SSAO demo.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-14 12:25:48 +02:00
Samuel Pitoiset
a4c08c8cd5 radv: set correct INDEX_TYPE for indexed indirect draws on GFX9
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-14 12:05:19 +02:00
Samuel Pitoiset
3e5f27faf3 radv: add the draw count buffer to the list of buffers
My guess is that the GPU is going to report VM faults if
vkCmdDrawIndirectCountAMD() (and friends) are used.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-14 12:05:19 +02:00
Jason Ekstrand
1cec500c69 blob: Use intptr_t instead of ssize_t
ssize_t is a GNU extension and is not available on Windows or MacOS.
Instead, we use intptr_t which should be effectively equivalent and is
part of the C standard.  This should fix the Windows and Mac OS builds.

Fixes: 3af1c82989
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103253
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
2017-10-13 15:02:34 -07:00
Kenneth Graunke
77d3d71f23 i965: Rename brw->no_batch_wrap to intel_batchbuffer::no_wrap
This really makes more sense in the intel_batchbuffer struct.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-13 11:16:41 -07:00
Kenneth Graunke
d22bc4ba52 i965: Delete dead brw_context fields.
fast_clear_op is leftover from the meta-fast-clear days.
No idea what the other thing was for, but it isn't used now.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-13 11:16:41 -07:00
Emil Velikov
9b753e8ca3 mapi/shared-glapi/test: rework glapitable.h handling
Currently all the build systems but Meson generate the header in
src/mapi/glapi. Meson cannot do that since:
 - it does not allow user control over the location of output files
 - moving the generation rule(s) causes explosion due to the unusual
structure of glapi and friends
 - copying the file into the correct location is a non-trivial task

To workaround the above deficiency in the least invasive way, let's
adjust the #include directive and add a few -I flags to the autotools
build.

Note: both builddir and srcdir, should be used. Otherwise building from
a release tarball fails badly.

Cc: Dylan Baker <dylanx.c.baker@intel.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2017-10-13 11:12:08 -07:00
Dylan Baker
142dc8b9de meson: fix blob test includes
Since blob.h moved up to src/compiler the test should include that
instead of src/compiler/glsl

fixes: 0e3bd56c6e ("compiler: Move blob up a level")
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-13 10:40:23 -07:00
Emil Velikov
ee779c93d5 Revert "make: Fix test to be meson compatible"
This reverts commit fc48ad2427.

There commit reference the previous commit as it justification of
changing behaviour. Although unlike the said commit, there's nothing
obviously wrong there.

I'll take a look close why Meson fails to pick the file, but in the
interim reverting this commit fixes the normal distcheck target.
2017-10-13 14:57:33 +01:00
Mark Thompson
e7f24859ca st/dri: Add definitions to allow importing 16-bit surfaces
Necessary to support P010/P016 surfaces for video.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Acked-by: Leo Liu <leo.liu@amd.com>
2017-10-13 08:11:47 -04:00
Mario Kleiner
556037f131 i965: Complete 'expose RGBA visuals only on Android'
Commit 731ba6924a
"expose RGBA visuals only on Android" replaced
ARRAY_SIZE(formats) by num_formats, but there are
3 loops which add configs, and only one was updated
to num_formats.

Also update loops for configs with accumulation buffer
and multisample configs.

Fixes: 731ba6924a "i965: expose RGBA visuals only on Android"
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-10-13 12:56:13 +01:00
Emil Velikov
df3a430180 configure.ac: add missing LLVM components for OpenCL
Coverage and LTO seems to be hard requirements for Clang, while
coroutines is needed as of LLVM/Clang 4.0.

Mark the last one as "optional" so we handle every case.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tobias Droste <tdroste@gmx.de>
2017-10-13 12:56:13 +01:00
Emil Velikov
36d6d1e931 configure.ac: add llvm_add_optional_component helper
We want to add "optional" components, which have been added with later
LLVM versions.

One such in-tree example is inteljitevents. Others are to follow
shortly.

v2: Use the correct function, add blank line between functions (Tobias)

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tobias Droste <tdroste@gmx.de>
2017-10-13 12:56:13 +01:00
Emil Velikov
a7ecf7b86f Travis: add binutils 2.26 for a few more LLVM 3.9 builds
Otherwise we error out at link stage as follows:

/usr/lib/llvm-3.9/lib/libLLVMAMDGPUCodeGen.a(R600OptimizeVectorRegisters.cpp.o):
unrecognized relocation (0x2a) in section
`.text._ZNK12_GLOBAL__N_119R600VectorRegMerger16getAnalysisUsageERN4llvm13AnalysisUsageE'
/usr/bin/ld: final link failed: Bad value

Cc: mesa-stable@lists.freedesktop.org
Cc: Jan Vesely <jan.vesely@rutgers.edu
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-10-13 12:56:13 +01:00
Emil Velikov
13a53c4f5c configure.ac: rework llvm libs handling for 3.9+
Earlier versions need different quirks, but as of LLVM 3.9 llvm-config
provides --link-shared/link-static toggles.

The output of which seems to be reliable - looking at LLVM 3.9, 4.0 and
5.0.

Note that there are earlier code will be used for pre LLVM 3.9 and is
unchanged.

This effectively fixes LLVM static linking, while providing a clearer
and more robust solution for future versions.

Mildly interesting side notes:

 - build-mode (introduced with 3.8) was buggy with 3.8
It shows "static" when build with -DLLVM_LINK_LLVM_DYLIB=ON, yet it was
consistent with --libs. The latter shows the static libraries.

 - libnames and libfiles are broken with LVM 3.9
The library prefix and extension is printed twice liblibLLVM-3.9.so.so

v2: Invoke llvm-config twice, instead of using sed, to combine the two
lines into one (Tobias)

Cc: mesa-stable@lists.freedesktop.org
Cc: Dieter Nützel <Dieter@nuetzel-hh.de>
Cc: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tobias Droste <tdroste@gmx.de>
2017-10-13 12:56:12 +01:00
Emil Velikov
98fdff7247 configure.ac: factor out detection for old and buggy llvm
As of LLVM 3.9 one could use consistent ways to handle the component.
Factor out the current handling, as it will be used for older versions.

Cc: mesa-stable@lists.freedesktop.org
Cc: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tobias Droste <tdroste@gmx.de>
2017-10-13 12:56:12 +01:00
Emil Velikov
9032e2cdcc configure.ac: remove no longer necessary llvm-config --libs check
Prior to the refactor/cleanup by Tobias one could add an invalid
component to LLVM_COMPONENTS.

Since that's no longer the case we can drop the current check.

Cc: Tobias Droste <tdroste@gmx.de>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tobias Droste <tdroste@gmx.de>
2017-10-13 12:56:12 +01:00
Emil Velikov
66ebdfbd44 eglmesaext: add forward declaration for struct wl_buffers
The user does not need to know the specifics of the struct, as only a
pointer to it is used.

Just forward declare the struct making the header self-contained.

v2: Remove deprecation warning text/bugzilla - patch does no help there.

Cc: Greg V <greg@unrelenting.technology>
Fixes: 5cddb1ce3c ("wayland: Add an extension to create wl_buffers from
EGLImages")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1)
2017-10-13 12:56:12 +01:00
Emil Velikov
a14ecdab16 configure.ac: bump Clover LLVM requirement to 3.9
The only driver that utilises Clover already depends on LLVM 3.9.
Close to every supported distribution has said version.

Additionally libclc also requires LLVM 3.9.

With this in mind, we can safely bump the requirement.

There is a handful of dead code that we could remove, which will be
resolved with later commits.

Note: this drops the LLVM 3.6 build from the Travis build. LLVM 3.9 (and
later) are already covered in there.

https://lists.freedesktop.org/archives/mesa-dev/2017-September/170028.html

v2: Add reference to discussion thread (Eric), adjust libclc LLVM req.
(Jan).

Cc: Aaron Watry <awatry@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Acked-by: Vedran Miletić <vedran@miletic.net>
Acked-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Francisco Jerez <currojerez@riseup.net>
2017-10-13 12:56:12 +01:00
Emil Velikov
acb84ffbc7 wayland-drm: constify the callbacks struct, take 2
Now that wayland-drm (correctly) keeps a local copy of the callbacks,
this should not longer cause explosions.

After all the symbol is a local, constant data.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Tested-by: Derek Foreman <derekf@osg.samsung.com>
2017-10-13 12:56:12 +01:00