116141 Commits

Author SHA1 Message Date
Dylan Baker
fe8f8981d0 meson: don't error on formaters with mingw
MSVC is generally happy, but mingw errors. I've spent as much time
(several days) trying to squash all of these warnings and I'm done with
it, just leave them as warnings with MinGW.

Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
1e2c05b82a meson: add msvc compat args to swr
This has always been present in the scons build, so it should be in
the meson build as well.

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
63f5aee694 meson: maintain names of shared API libraries
Mesa uses the lib prefix, and doesn't use a version for it's dynamic
libraries, which meson defaults to.

v2: - this patch

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
e1dbf10749 meson: don't build or run mesa-sha1 test on windows
It crashes hard (pop-up window and all).

v2: - Change comment to FIXME

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
b6b59813c3 meson: disable graw tests on mingw
I can't figure out why symbols are being exposed that shouldn't.

v2: - change comment to FIXME

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
56db696875 meson: don't build gallium trivial tests on windows
They require the pipe-loaders, which require xmlconfig, which doesn't
build with msvc.

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
880ca3c964 meson: Set visibility and compat args for graw
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
095bdbda2b meson: Add msvc compat args to util/tests
To keep this building with msvc

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
00fca07c3b meson: Add idep_getopt for tests
There are quite a few tests that require getopt, when using MSVC we need
to use the bundled version of getopt since there isn't a system version.

Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
8eee724b73 meson: don't define USE_ELF_TLS for windows
Because the macros for exporting dll symbols and using TLS are mutually
exclusive.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
3740ffb59c meson: add switches for SWR with MSVC
This makes two changes for SWR,

The first is that it reorders the arguments to try to put the ICL ones
first. This is required to support older versions of meson that don't
add enough "error in this case" switches to ICL, which causes it to
happy accept -mavx (for example) even though it doesn't support them,
resulting in compilation failures.

The second is to fix the names of the libraries, setting the soversion
to '' will result in <lib>.dll, instead of <lib>-0.dll. Since these are
not versioned dll's, but implement an internal API we should communicate
that. It's also what scons does.

Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
d2cb0a59ce meson: disable sse4.1 optimizations with msvc
There isn't an obvious command line switch here, /arch:AVX *might* be
the right thing, but meson doesn't know what to do here either and
leaves the -msse4.1 and -mstackrealign.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
150aec5d1f meson: force inclusion of inttypes.h for glcpp with msvc
Because we provide a copy if MSVC doesn't, and we need it to make flex
do what we want.

Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
8b19c5b145 meson: Add support for using win_flex and win_bison on windows
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
81d44c01ee meson: don't look for rt on windows
v6: - Minor refactor

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
e3f5c3232c meson: fix pipe-loader compilation for windows
v2: - Add missing D to pound define
    - Simply define the variable rather than set it to 1 (mirrors
      android.mk not scons)

Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
474d6f8e08 util/xmlconfig: include strndup.h for windows
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
7ef85a0d92 meson: Don't check for posix_memalign on windows
There's a mingw bug for this, it exports __builtin_posix_memalign but
not posix_memalign, so the check will succeed, but compiling will fail.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
597a063551 meson: fix gallium-osmesa to build for windows
v2: - set so_version to '' (only affects windows)
    - always set lib prefix to 'lib', even on msvc
v5: - key NO_EXPORTS on shared glapi instead of gles.

Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
b97a341017 meson: build graw-gdi target
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
a2c79cc3cb meson: build libgl-gdi target
v4: - Fix check for broken mingw (should be for x86 not x86_64)
    - Add comment about why check is needed

Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
3c8934343b meson: build wgl state tracker
v4: - Handle enable gles properly
    - Add comments about what various #defines do
v5: - key NO_EXPORTS on shared glapi instead of gles.

Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
560cdabebe meson: build gallium gdi winsys
v6: - use null_dep instead of []

Reviewed-by: Eric Anholt <eric@anholt.net> (v5)
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
2a53a06793 meson: Add necessary defines for mesa_gallium on windows
v4: - Retain scons comments for windows specific defines
v5: - key GLAPI_NO_EXPORTS off of shared-glapi instead of gles

Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
2e17348600 meson: Add windows defines to glapi
These are needed to control the export or symbols due to differences
between the way windows and *nix handle symbol exports.

Reviewed-by: Eric Anholt <eric@anholt.net> (v2)
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>

v5: - key NO_EXPORT off of shared-glapi instead of gles
2019-10-10 16:33:04 -07:00
Dylan Baker
3aee462781 meson: add windows compiler checks and libraries
v4: - Fix typo in warning code (4246 -> 4267)
    - Copy comments from scons for what MSVC warnings codes do
    - Merge linker argument changes into this commit
v5: - Add /GR- on windows if LLVM is build without rtti (equivalent to
      GCc's -fno-rtti')
    - Add /wd4291, which is catching the same hting that
    -Wno-non-virtual-dtor is on GCC/Clang

Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Dylan Baker
16bc3073cb util: use _WIN32 instead of WIN32
MinGW defines only _WIN32, but doesn't have fcntl, so we need to use the
windows path.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-10 16:33:04 -07:00
Rob Clark
f1fe656a92 freedreno/ir3: handle multi component alu src when propagating shifts
Signed-off-by: Rob Clark <robdclark@chromium.org>
2019-10-10 23:12:05 +00:00
Rob Clark
61a0a86d28 freedreno/ir3: drop unused param
Signed-off-by: Rob Clark <robdclark@chromium.org>
2019-10-10 23:12:05 +00:00
Marek Olšák
c38c8d012e clover: fix the nir_serialize build failure
Fixes: dd4cc56ebd0 "nir: add a strip parameter to nir_serialize"
2019-10-10 18:44:40 -04:00
Dave Airlie
1b221f4e7b llvmpipe/draw: handle UBOs that are < 16 bytes.
Not sure if this is a bug in the user or not, but some CTS
tests fail due to using an 8 byte constant buffer.

Fixes: KHR-GLES31.core.layout_binding.block_layout_binding_block_VertexShader

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-10-10 21:52:20 +00:00
Dave Airlie
744b8936df llvmpipe/draw: fix image sizes for vertex/geometry shaders.
since images are a single level, minify before passing the w/h
to draw.

Fixes: KHR-GLES31.core.shader_image_size.basic-nonMS-vs-*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-10-10 21:52:20 +00:00
Dave Airlie
7cac880831 llvmpipe: make texture buffer offset alignment == 16
Due to use vmovdqa instructions in the asm, which require 16-byte
aligned buffers.

This fixes a crash in
KHR-GLES31.core.texture_buffer.texture_buffer_texture_buffer_range

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-10-10 21:52:20 +00:00
Eric Engestrom
34ba363ab0 meson: skip installation of GLVND-provided headers
Fixes: 93df862b6affb6b8507e ("meson: re-add incorrect pkg-config files with GLVND for backward compatibility")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1846
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-10 22:33:09 +01:00
Eric Engestrom
1a7e9652c4 meson: split Mesa headers as a separate installation
Fixes: 93df862b6affb6b8507e ("meson: re-add incorrect pkg-config files with GLVND for backward compatibility")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-10 22:33:05 +01:00
Eric Engestrom
daae003f47 meson: split headers one per line
Fixes: 93df862b6affb6b8507e ("meson: re-add incorrect pkg-config files with GLVND for backward compatibility")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-10 22:21:00 +01:00
Eric Engestrom
b9a5fb1f05 meson: move a couple of include installs around
Preparation for a later commit.

Fixes: 93df862b6affb6b8507e ("meson: re-add incorrect pkg-config files with GLVND for backward compatibility")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-10 22:18:04 +01:00
Eric Engestrom
b57fa7ca49 meson: rename glvnd_missing_pc_files to not glvnd_has_headers_and_pc_files
This reflects better what is provided by glvnd or not.

Fixes: 93df862b6affb6b8507e ("meson: re-add incorrect pkg-config files with GLVND for backward compatibility")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-10 22:18:04 +01:00
Eric Engestrom
a0829cf23b GL: drop symbols mangling support
SCons and Meson have never supported that feature, and Autotools was
deleted over 6 months ago and no-one complained yet, so it's pretty
obvious nobody cares about it.

Fixes: 95aefc94a941701616fd ("Delete autotools")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-10 21:40:48 +01:00
Rhys Perry
2026ff5165 aco: update print_ir
Mostly adds GFX10 stuff.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
2019-10-10 20:02:36 +00:00
Rhys Perry
283eda71cf aco: rework scratch resource code
Fix compute, cleanup and add GFX10 support.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
2019-10-10 20:02:36 +00:00
Rhys Perry
f64b1a3454 aco/gfx10: disable GFX9 1D texture workarounds
Navi added back support for 1D textures.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
2019-10-10 20:02:36 +00:00
Rhys Perry
de0748c42e aco/gfx10: fix inline uniform blocks
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
2019-10-10 20:02:36 +00:00
Rhys Perry
ba71be228f radv/aco: disable NGG when ACO is used
Note that radv_device.c still has to be modified to use ACO with Navi.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
2019-10-10 20:02:36 +00:00
Marek Olšák
b7fc082b28 ac/nir: add back nir_op_fmod
radeonsi doesn't lower it for doubles.

This partially reverts commit d861401554b52b2c2fc6721c69bdfe1697ee608f.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-10 15:57:50 -04:00
Marek Olšák
09e0e4c93c gallium: remove PIPE_SHADER_CAP_SCALAR_ISA
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-10 15:49:19 -04:00
Marek Olšák
1f718bfc78 tgsi_to_nir: use nir_shader_compiler_options::lower_to_scalar
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-10 15:49:19 -04:00
Marek Olšák
e4f7d2576e st/mesa: use nir_shader_compiler_options::lower_to_scalar
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-10 15:49:19 -04:00
Marek Olšák
cebc38ff60 nir: add nir_shader_compiler_options::lower_to_scalar
This will replace PIPE_SHADER_CAP_SCALAR_ISA.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-10 15:49:18 -04:00
Marek Olšák
7fc5919793 tgsi_to_nir: add #ifdef header guards
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-10 15:49:18 -04:00