platform/upstream/mesa.git
3 years agoaco: Declare num_reduce_ops for array size
James Park [Fri, 27 Nov 2020 06:04:29 +0000 (22:04 -0800)]
aco: Declare num_reduce_ops for array size

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7785>

3 years agoaco: Remove nonstandard parentheses
James Park [Fri, 27 Nov 2020 06:03:27 +0000 (22:03 -0800)]
aco: Remove nonstandard parentheses

Remove parentheses in cases where a parenthesized type is followed by an
initializer list.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7785>

3 years agoaco: Add missing C++ includes
James Park [Fri, 27 Nov 2020 05:33:11 +0000 (21:33 -0800)]
aco: Add missing C++ includes

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7785>

3 years agoaco: Fix warnings about unsafe integer/bool mix
James Park [Fri, 27 Nov 2020 05:31:30 +0000 (21:31 -0800)]
aco: Fix warnings about unsafe integer/bool mix

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7785>

3 years agoaco: Define NOMINMAX in Meson build file
James Park [Fri, 27 Nov 2020 05:29:13 +0000 (21:29 -0800)]
aco: Define NOMINMAX in Meson build file

Fix conflicts between std::min/max and Win32 min/max.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7785>

3 years agoaco: use FALLTHROUGH macro
Rhys Perry [Tue, 1 Dec 2020 09:54:31 +0000 (09:54 +0000)]
aco: use FALLTHROUGH macro

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7844>

3 years agoradv: use FALLTHROUGH macro
Rhys Perry [Tue, 1 Dec 2020 09:54:18 +0000 (09:54 +0000)]
radv: use FALLTHROUGH macro

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7844>

3 years agoradv/llvm,aco: always split typed vertex buffer loads on GFX6 and GFX10+
Samuel Pitoiset [Tue, 24 Nov 2020 13:56:55 +0000 (14:56 +0100)]
radv/llvm,aco: always split typed vertex buffer loads on GFX6 and GFX10+

To avoid any alignment issues that triggers memory violations and
eventually a GPU. This can happen if the stride (static or dynamic)
is unaligned and also if the VBO offset is aligned to scalar
(eg. stride is 8 and VBO offset is 2 for R16G16B16A16_SNORM).

The AMD Windows driver also always splits typed vertex fetches.

fossils-db (Sienna Cichlid):
Totals from 56508 (40.54% of 139391) affected shaders:
SGPRs: 2643545 -> 2664516 (+0.79%); split: -0.19%, +0.98%
VGPRs: 2007472 -> 1995408 (-0.60%); split: -0.74%, +0.13%
CodeSize: 70596372 -> 73913312 (+4.70%); split: -0.00%, +4.70%
MaxWaves: 772653 -> 774916 (+0.29%); split: +0.37%, -0.08%
Instrs: 14074162 -> 14567072 (+3.50%); split: -0.00%, +3.51%
Cycles: 69281276 -> 71253252 (+2.85%); split: -0.00%, +2.85%
VMEM: 22047039 -> 25554196 (+15.91%); split: +17.20%, -1.29%
SMEM: 4120370 -> 4360820 (+5.84%); split: +7.41%, -1.58%
VClause: 416913 -> 438361 (+5.14%); split: -1.86%, +7.01%
SClause: 536739 -> 542637 (+1.10%); split: -0.33%, +1.43%
Copies: 977194 -> 970015 (-0.73%); split: -2.43%, +1.69%
Branches: 241205 -> 241193 (-0.00%); split: -0.06%, +0.06%
PreVGPRs: 1505645 -> 1505379 (-0.02%)

This fixes GPU hangs with bin/draw-vertices from Piglit on GFX10+
with Zink.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7751>

3 years agozink: allow the backend to optimise shaders.
Dave Airlie [Mon, 30 Nov 2020 23:15:10 +0000 (09:15 +1000)]
zink: allow the backend to optimise shaders.

I can't think of any reason for ever requesting this here,
maybe in some future with parallel threads optimised compiles
and where vulkan drivers respect this bit.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7840>

3 years agoglx: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:38:41 +0000 (11:38 +0100)]
glx: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agotgsi: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:38:18 +0000 (11:38 +0100)]
tgsi: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agoegl: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:38:11 +0000 (11:38 +0100)]
egl: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agoamd/ac: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:38:05 +0000 (11:38 +0100)]
amd/ac: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agonir/ntt: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:30:08 +0000 (11:30 +0100)]
nir/ntt: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agogallivm: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:30:01 +0000 (11:30 +0100)]
gallivm: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agollvmpipe: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:29:49 +0000 (11:29 +0100)]
llvmpipe: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agoradeon: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:29:45 +0000 (11:29 +0100)]
radeon: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agogallium: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:29:35 +0000 (11:29 +0100)]
gallium: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agosoftpipe: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:29:26 +0000 (11:29 +0100)]
softpipe: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agogallium/util: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:29:09 +0000 (11:29 +0100)]
gallium/util: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agovbo: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:28:57 +0000 (11:28 +0100)]
vbo: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agogallium/winsys: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:28:49 +0000 (11:28 +0100)]
gallium/winsys: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agoradeonsi: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:28:07 +0000 (11:28 +0100)]
radeonsi: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agocompiler/spirv: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:15:59 +0000 (11:15 +0100)]
compiler/spirv: update fallthrough comments

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agosrc/mesa: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:04:00 +0000 (11:04 +0100)]
src/mesa: update fallthrough comments

clang doesn't support /* fallthrough */ so switch to fallthrough
attribute.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agoxxhash: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:03:46 +0000 (11:03 +0100)]
xxhash: update fallthrough comments

clang doesn't support /* fallthrough */ so switch to fallthrough
attribute.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agogallium: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:03:20 +0000 (11:03 +0100)]
gallium: update fallthrough comments

clang doesn't support /* fallthrough */ so switch to fallthrough
attribute.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agonir: update fallthrough comments
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 10:02:00 +0000 (11:02 +0100)]
nir: update fallthrough comments

clang doesn't support /* fallthrough */ so switch to fallthrough
attribute.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agoutil: add a FALLTROUGH macro
Pierre-Eric Pelloux-Prayer [Tue, 24 Nov 2020 17:02:49 +0000 (18:02 +0100)]
util: add a FALLTROUGH macro

Not all compilers support __atttribute__((fallthrough)) so use a macro.

v2: use C++17 / C18 standard attribute (Tony Wasserka)

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>

3 years agospirv: add support for KHR_fragment_shading_rate
Lionel Landwerlin [Tue, 20 Oct 2020 07:41:48 +0000 (10:41 +0300)]
spirv: add support for KHR_fragment_shading_rate

v2: Use VARYING (Samuel)

v3: Only allow VERTEX & GEOMETRY stages (Samuel)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7795>

3 years agocompiler/nir: introduce a new helper to get varying name
Lionel Landwerlin [Fri, 27 Nov 2020 10:26:34 +0000 (12:26 +0200)]
compiler/nir: introduce a new helper to get varying name

As we now reuse the enums to remain within 64 values, we need to get
the proper name using the stage.

v2: Use enum type for parameter (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7795>

3 years agonir: wire shading rate variables
Lionel Landwerlin [Tue, 20 Oct 2020 07:41:00 +0000 (10:41 +0300)]
nir: wire shading rate variables

v2: Fixup comment about bits in nir_intrinsics.py

v3: Use varying for primitive shading rate builtin (samuel)

v4: Reoder switch alphabetically
    Make divergence of frag_shading_rate an option

v5: Remove stage check for frag_shading_rate in divergence (Samuel)

v6: s/frag_shading_rate_per_subgroup/single_frag_shading_rate_per_subgroup/ (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7795>

3 years agovulkan/util: Consolidate typed_memcpy
James Park [Mon, 30 Nov 2020 10:00:48 +0000 (02:00 -0800)]
vulkan/util: Consolidate typed_memcpy

Collapse typed_memcpy definitions into one header.

Use do/while(0) pattern to fix MSVC compilation.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7830>

3 years agoutil: Add os_localtime
James Park [Mon, 30 Nov 2020 08:57:55 +0000 (00:57 -0800)]
util: Add os_localtime

MSVC does not have localtime_r, so add abstraction.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7829>

3 years agonir/algebraic: Avoid creating new fp64 ops when using softfp64
Kenneth Graunke [Tue, 1 Dec 2020 00:14:55 +0000 (16:14 -0800)]
nir/algebraic: Avoid creating new fp64 ops when using softfp64

In commit 00b28a50b2c492eee25ef3f75538aabe1e569ff1, Marek extended
a number of optimizations that had been 32-bit specific to work on
other bit-sizes.

Most optimizations preserve the data type across the transformation.
In other words, an optimization which generates e.g. fp64 operations
only does so when the source expression also contains fp64 operations.
These transformations are fine with respect to lowering, because we
will lower away all expressions that would trigger the search portion
of the expression, and so we'd never apply those rules.

However, a few of the rules create new operations that run afoul of
lowering passes.  For example,

    ('bcsel', a, 1.0, 0.0) => ('b2f', a)

where the result is a double would simply be a selection between two
different 64-bit constants.  The replacement expression, on the other
hand, involves a nir_op_b2f64 ALU operation.  If we're run after
nir_lower_doubles, then it may not be legal to generate such an
expression anymore (at least without running lowering again, which we
don't do today).

Regressions due to this are blocking the 20.3 release, so for now, we
take the easy route and simply disallow those few rules when doing full
softfp64 lowering, which fixes the immediate problem.  But it doesn't
solve the long-term problem in an extensible manner.

In the future, we may want to add a `lowered_alu_ops` bitfield to the
NIR shader, and as lowering passes are run, mark them as taboo.  Then,
we could have each algebraic transformation track which operations it
creates in the replacement expression.  With both of those in place,
nir_replace_instr could compare the transformation's list of ALU ops
against `lowered_alu_ops` and implicitly skip rules that generate
forbidden ALU operations.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3504
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7841>

3 years agomesa: Use os_get_option() for MESA_*_OVERRIDE
Rob Clark [Wed, 25 Nov 2020 00:54:52 +0000 (16:54 -0800)]
mesa: Use os_get_option() for MESA_*_OVERRIDE

This will allow for overriding via setprop mesa.*.override on android.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7763>

3 years agoutil: Add property_get() fallback for android
Rob Clark [Tue, 24 Nov 2020 20:38:47 +0000 (12:38 -0800)]
util: Add property_get() fallback for android

Environment variables aren't the easiest thing to use on android.  So
add a fallback to android's property mechanism for os_get_option().

This is slightly complicated by the fact that the assumption that the
return value of os_get_option() need not be freed.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7763>

3 years agointel/fs: DISCARD_JUMP does not have side-effects
Jason Ekstrand [Mon, 30 Nov 2020 20:02:06 +0000 (14:02 -0600)]
intel/fs: DISCARD_JUMP does not have side-effects

This accidentally snuck into 75209d5bd1f6e93 due to a rebase fail.

Fixes: 75209d5bd1f6e93 "intel/fs: Add and implement intel-specific..."
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3897
Tested-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7839>

3 years agonir: Use the right argument order for load_scratch_base_ptr
Jason Ekstrand [Mon, 30 Nov 2020 16:41:35 +0000 (10:41 -0600)]
nir: Use the right argument order for load_scratch_base_ptr

Fixes: c9bcad25737 "nir: add generated intrinsic builders"
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7836>

3 years agov3dv: check return value of drmGetMagic
Iago Toral Quiroga [Mon, 30 Nov 2020 06:44:28 +0000 (07:44 +0100)]
v3dv: check return value of drmGetMagic

Fixes coverty issue:

** CID 1470345: Error handling issues (CHECKED_RETURN)
/src/broadcom/vulkan/v3dv_device.c: 407 in v3dv_drm_handle_device()
Calling "drmGetMagic" without checking return value (as is done
elsewhere 5 out of 6 times).

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7828>

3 years agov3dv: expand format coverage in TFU path for buffer to image copies
Iago Toral Quiroga [Mon, 30 Nov 2020 09:15:57 +0000 (10:15 +0100)]
v3dv: expand format coverage in TFU path for buffer to image copies

Just like we do for image copies, since we are not doing any pixel
format conversions, we can translate the image format to a compatible
format that is supported by the TFU.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7809>

3 years agov3dv: fix base layer for 3D blits in the TFU path
Iago Toral Quiroga [Fri, 27 Nov 2020 10:13:26 +0000 (11:13 +0100)]
v3dv: fix base layer for 3D blits in the TFU path

We were always using baseArrayLayer from the image subresource, but
for 3D images we should use the Z offset of the region.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7809>

3 years agov3dv: add a TFU path for image copies
Iago Toral Quiroga [Fri, 27 Nov 2020 10:56:37 +0000 (11:56 +0100)]
v3dv: add a TFU path for image copies

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7809>

3 years agov3dv: add a format parameter to emit_tfu_job
Iago Toral Quiroga [Fri, 27 Nov 2020 10:52:17 +0000 (11:52 +0100)]
v3dv: add a format parameter to emit_tfu_job

We will be using the new parameter in an upcomig change. The TFU
unit has a limited list of supported formats, so for cases where
we don't want to do any pixel format conversions and we are just
copying raw image data, we want to be able to rewrite the underlying
image format to use a compatible format. We will be using this
in a follow-up patch that adds a TFU path for image copies. For this
purpose, we also, move the function definition up in the file
so it is available for that upcoming TFU path without having to
put its prototype earlier in the file.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7809>

3 years agov3dv: support compressed formats with TFU unit
Iago Toral Quiroga [Thu, 26 Nov 2020 11:34:52 +0000 (12:34 +0100)]
v3dv: support compressed formats with TFU unit

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7809>

3 years agov3dv: remove obsolete disabled code
Iago Toral Quiroga [Thu, 26 Nov 2020 11:51:22 +0000 (12:51 +0100)]
v3dv: remove obsolete disabled code

We are successfully using TFU blits for existing CTS tests covering
1D and 3D images.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7809>

3 years agoradv: disable WGP_MODE for NGG on GFX10.3
Samuel Pitoiset [Thu, 26 Nov 2020 06:46:11 +0000 (07:46 +0100)]
radv: disable WGP_MODE for NGG on GFX10.3

Ported from RadeonSI, reducing the CU mask probably broke WGP mode.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7769>

3 years agoradv: only mask 1 CU for GS/VS waves on GFX10.3
Samuel Pitoiset [Wed, 25 Nov 2020 07:16:14 +0000 (08:16 +0100)]
radv: only mask 1 CU for GS/VS waves on GFX10.3

Ported from Radeonsi and PAL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7769>

3 years agoradv: only disable CU2 & CU3 when NGG is enabled
Samuel Pitoiset [Wed, 25 Nov 2020 07:13:29 +0000 (08:13 +0100)]
radv: only disable CU2 & CU3 when NGG is enabled

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7769>

3 years agoradv: enable NGG on GFX10.3 APUs by default
Samuel Pitoiset [Wed, 25 Nov 2020 07:09:59 +0000 (08:09 +0100)]
radv: enable NGG on GFX10.3 APUs by default

According to Radeonsi, VanGogh benefits.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7769>

3 years agoci: Make test-docs job depend on sanity job
Michel Dänzer [Fri, 20 Nov 2020 10:05:56 +0000 (11:05 +0100)]
ci: Make test-docs job depend on sanity job

Without this, the test-docs job could end up waiting for manual action
after the sanity job failed, which prevented the pipeline as a whole
from having failed status.

(This means the test-docs job will no longer exist in one corner case
where it did before, when pushing directly to a non-master branch of
the main repository. That should be fine, since the docs are only
deployed from master.)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7676>

3 years agoci: Squash "check mr/commits" jobs into a single sanity job
Michel Dänzer [Wed, 18 Nov 2020 17:48:47 +0000 (18:48 +0100)]
ci: Squash "check mr/commits" jobs into a single sanity job

The "check commits" job can work again with current ci-templates, but
there's no need to keep it as a separate job.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7676>

3 years agoci: Move sanity stage to the beginning of the pipeline
Michel Dänzer [Wed, 18 Nov 2020 17:32:05 +0000 (18:32 +0100)]
ci: Move sanity stage to the beginning of the pipeline

This is possible now that it uses the external ci-fairy docker image.

This allows dropping the "check mr" job from needs: of other jobs, the
container stage jobs will only become available once the sanity stage
has passed.

This also allows simplifying the "check mr" job rules and script, since
the job only needs to exist in pre-merge pipelines for MRs anymore.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7676>

3 years agoci: Use ci-fairy docker image instead of local git_archive one
Michel Dänzer [Wed, 18 Nov 2020 17:23:29 +0000 (18:23 +0100)]
ci: Use ci-fairy docker image instead of local git_archive one

The ci-fairy image contains pip and ci-fairy.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7676>

3 years agoci: Update to current ci-templates
Michel Dänzer [Wed, 18 Nov 2020 17:55:28 +0000 (18:55 +0100)]
ci: Update to current ci-templates

The 64-bit ARM architecture suffix was changed from arm64v8 to aarch64.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7676>

3 years agoci: Drop ci-templates-sha anchor
Michel Dänzer [Tue, 24 Nov 2020 16:02:13 +0000 (17:02 +0100)]
ci: Drop ci-templates-sha anchor

As of GitLab 13.6, multiple files can be included for a single ref.

Suggested-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7676>

3 years agovulkan: Portable wsi_common_get_current_time()
James Park [Fri, 27 Nov 2020 03:42:54 +0000 (19:42 -0800)]
vulkan: Portable wsi_common_get_current_time()

Use os_time_get_nano(), which has a Windows implementation.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7783>

3 years agovulkan: Replace pthread mutex with mtx_t
James Park [Fri, 27 Nov 2020 03:42:19 +0000 (19:42 -0800)]
vulkan: Replace pthread mutex with mtx_t

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7783>

3 years agovulkan: Remove GCC pragmas by fixing warnings
James Park [Fri, 27 Nov 2020 03:41:32 +0000 (19:41 -0800)]
vulkan: Remove GCC pragmas by fixing warnings

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7783>

3 years agoradv: save and dump vertex descriptors during GPU hang detection
Samuel Pitoiset [Fri, 20 Nov 2020 15:55:41 +0000 (16:55 +0100)]
radv: save and dump vertex descriptors during GPU hang detection

It might be useful to know if the VA is valid and if other info
like the stride seems correct.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7753>

3 years agoradv: fix using bitfields for debug/perftest options
Samuel Pitoiset [Tue, 24 Nov 2020 07:41:54 +0000 (08:41 +0100)]
radv: fix using bitfields for debug/perftest options

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7753>

3 years agomesa/st_vdpau: set surface winsys handle modifier
Leo Liu [Thu, 26 Nov 2020 18:34:14 +0000 (13:34 -0500)]
mesa/st_vdpau: set surface winsys handle modifier

The VDPAU interop was broken without setting it explicitly

Fixes: c786150d ("radeonsi: Add modifier support")
Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7803>

3 years agoamd/common: Check with_tests before adding test
James Park [Sat, 28 Nov 2020 07:35:51 +0000 (23:35 -0800)]
amd/common: Check with_tests before adding test

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7819>

3 years agor600/sfn: remove leftover debug message
Gert Wollny [Sat, 28 Nov 2020 15:36:23 +0000 (16:36 +0100)]
r600/sfn: remove leftover debug message

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7823>

3 years agor600/sfn: remove unused file
Gert Wollny [Sat, 28 Nov 2020 15:39:28 +0000 (16:39 +0100)]
r600/sfn: remove unused file

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7823>

3 years agor600/sfn: Fix a few warnings in release builds
Gert Wollny [Sat, 28 Nov 2020 09:58:53 +0000 (10:58 +0100)]
r600/sfn: Fix a few warnings in release builds

[1083/1142] Compiling C++ object src/gallium/drivers/r600/libr600.a.p/sfn_sfn_nir_lower_fs_out_to_vector.cpp.o
../src/gallium/drivers/r600/sfn/sfn_nir_lower_fs_out_to_vector.cpp: In member function ‘nir_ssa_def* r600::NirLowerFSOutToVector::create_combined_vector(nir_builder*, nir_ssa_def**, int, int)’:
../src/gallium/drivers/r600/sfn/sfn_nir_lower_fs_out_to_vector.cpp:442:48: warning: ‘op’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 nir_alu_instr * instr = nir_alu_instr_create(b->shader, op);
      |                            ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~

[1092/1142] Compiling C++ object src/gallium/drivers/r600/libr600.a.p/sfn_sfn_nir.cpp.o
../src/gallium/drivers/r600/sfn/sfn_nir.cpp: In function ‘int r600_shader_from_nir(r600_context*, r600_pipe_shader*, r600_shader_key*)’:
../src/gallium/drivers/r600/sfn/sfn_nir.cpp:859:24: warning: unused variable ‘func’ [-Wunused-variable]
  859 |    const nir_function *func = reinterpret_cast<const nir_function *>(exec_list_get_head_const(&sel->nir->functions));
      |                        ^~~~

[1118/1142] Compiling C++ object src/gallium/drivers/r600/libr600.a.p/sfn_sfn_shader_base.cpp.o
../src/gallium/drivers/r600/sfn/sfn_shader_base.cpp: In member function ‘void r600::ShaderFromNirProcessor::add_array_deref(nir_deref_instr*)’:
../src/gallium/drivers/r600/sfn/sfn_shader_base.cpp:300:18: warning: unused variable ‘var’ [-Wunused-variable]
  300 |    nir_variable *var = nir_deref_instr_get_variable(instr);

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7820>

3 years agor600/sfn: fix definition of priority queue
Gert Wollny [Sat, 28 Nov 2020 09:27:48 +0000 (10:27 +0100)]
r600/sfn: fix definition of priority queue

Closes #3889

Fixes: b8fdcffc4c755241d645c62385729ee14dd8620b
   r600/sfn: Fix vertex stage export to accomodate IO lowering

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7820>

3 years agor600/sfn: correct error signalling in switch default case
Gert Wollny [Sat, 28 Nov 2020 09:12:21 +0000 (10:12 +0100)]
r600/sfn: correct error signalling in switch default case

This is unreachable, and in release mode it should also indicated that
the function will not return something useful here. Also add a default
return value just in case a compiler doesn't support the "unreachable"
Thanks Dieter Nützel for pointing this error out.

Fixes: b6c17e2965621a46eb07ba2605d9f9e221a400b
  r600/sfn: lower IO for FS inputs and handle interpolation accordingly

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7820>

3 years agoamd: Fix declaration mismatch
James Park [Fri, 27 Nov 2020 04:44:50 +0000 (20:44 -0800)]
amd: Fix declaration mismatch

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7791>

3 years agoamd: Fix signature mismatch
James Park [Fri, 27 Nov 2020 04:44:26 +0000 (20:44 -0800)]
amd: Fix signature mismatch

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7791>

3 years agoamd: Work around MSVC limit for string literals
James Park [Fri, 27 Nov 2020 04:43:29 +0000 (20:43 -0800)]
amd: Work around MSVC limit for string literals

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7791>

3 years agoamd: Replace vasprintf with vfprintf
James Park [Fri, 27 Nov 2020 04:41:35 +0000 (20:41 -0800)]
amd: Replace vasprintf with vfprintf

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7791>

3 years agoamd: Stub sections that don't have _WIN32 support
James Park [Fri, 27 Nov 2020 04:41:08 +0000 (20:41 -0800)]
amd: Stub sections that don't have _WIN32 support

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7791>

3 years agoamd: Remove bitfield sizes from enum values
James Park [Fri, 27 Nov 2020 04:38:58 +0000 (20:38 -0800)]
amd: Remove bitfield sizes from enum values

Fixes negative indexing on MSVC.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7791>

3 years agoamd: Cast to int for %d snprintf argument
James Park [Fri, 27 Nov 2020 04:35:36 +0000 (20:35 -0800)]
amd: Cast to int for %d snprintf argument

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7791>

3 years agoamd: Simplify ac_addrlib_create
James Park [Fri, 27 Nov 2020 12:14:19 +0000 (04:14 -0800)]
amd: Simplify ac_addrlib_create

Rework ac_addrlib_create to rely solely on radeon_info without
amdgpu_gpu_info.

No longer need <amdgpu.h> to create ac_addrlib instance.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7811>

3 years agomesa/st: choose S/D format depending on gl_format passed for readpixels
Tapani Pälli [Fri, 20 Nov 2020 09:31:16 +0000 (11:31 +0200)]
mesa/st: choose S/D format depending on gl_format passed for readpixels

This makes sure we create correct type of a sampler view for reading.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3775
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7707>

3 years agov3dv/pipeline: avoid unused warning on release build
Alejandro Piñeiro [Fri, 27 Nov 2020 12:14:47 +0000 (13:14 +0100)]
v3dv/pipeline: avoid unused warning on release build

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7812>

3 years agodocs: grammar fixes
Theogen Ratkin [Thu, 26 Nov 2020 22:38:16 +0000 (18:38 -0400)]
docs: grammar fixes

Signed-off-by: Theogen Ratkin <feogenratkin@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7804>

3 years agoradv: Deal with unused attachments in mip flush
Bas Nieuwenhuizen [Fri, 27 Nov 2020 14:07:17 +0000 (15:07 +0100)]
radv: Deal with unused attachments in mip flush

Fixes: 4cce4d22a72 ("radv: Fix a hang on CB change by adding flushes.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7813>

3 years agofreedreno/a6xx: add support for ARB_shader_stencil_export
Danylo Piliaiev [Thu, 26 Nov 2020 17:57:26 +0000 (19:57 +0200)]
freedreno/a6xx: add support for ARB_shader_stencil_export

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7810>

3 years agoradv: disable SQTT support for unsupported GPUs
Samuel Pitoiset [Thu, 26 Nov 2020 09:39:23 +0000 (10:39 +0100)]
radv: disable SQTT support for unsupported GPUs

Like GFX10.3 which is currently broken.

Cc: 20.2 20.3
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7786>

3 years agoaco: use binding chasing helpers
Rhys Perry [Fri, 23 Oct 2020 10:54:08 +0000 (11:54 +0100)]
aco: use binding chasing helpers

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7291>

3 years agoac/nir: use binding chasing helpers
Rhys Perry [Fri, 23 Oct 2020 10:46:25 +0000 (11:46 +0100)]
ac/nir: use binding chasing helpers

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7291>

3 years agonir/opt_load_store_vectorize: use resource binding chasing helpers
Rhys Perry [Fri, 23 Oct 2020 10:37:42 +0000 (11:37 +0100)]
nir/opt_load_store_vectorize: use resource binding chasing helpers

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7291>

3 years agonir: add helpers for chasing resource bindings
Rhys Perry [Fri, 23 Oct 2020 10:22:48 +0000 (11:22 +0100)]
nir: add helpers for chasing resource bindings

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7291>

3 years agoCI: Re-enable MSVC build
Daniel Stone [Thu, 26 Nov 2020 17:30:52 +0000 (17:30 +0000)]
CI: Re-enable MSVC build

Trying this again after reworking the virtualised network setup on the
Windows runner.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7537>

3 years agoCI: Build d3d12 Gallium driver and CLC framework on MSVC
Daniel Stone [Thu, 26 Nov 2020 19:02:45 +0000 (19:02 +0000)]
CI: Build d3d12 Gallium driver and CLC framework on MSVC

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7537>

3 years agoCI: Update Windows build for current Meson options
Daniel Stone [Thu, 26 Nov 2020 19:01:40 +0000 (19:01 +0000)]
CI: Update Windows build for current Meson options

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7537>

3 years agoCI: Remove ludicrous Windows container build timeout
Daniel Stone [Thu, 26 Nov 2020 19:03:47 +0000 (19:03 +0000)]
CI: Remove ludicrous Windows container build timeout

The full end-to-end job now completes in around 45min, which is far more
reasonable than the previous 3.5h.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7537>

3 years agoCI: Windows: Use 32 vCPUs for Mesa build
Daniel Stone [Thu, 26 Nov 2020 18:10:27 +0000 (18:10 +0000)]
CI: Windows: Use 32 vCPUs for Mesa build

The physical machine has 64, and the bottleneck is mostly I/O and
network, so let's just go ahead and smash the CPUs to bits.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7537>

3 years agoCI: Add Windows libclc and SPIRV-LLVM-Translator builds
Daniel Stone [Thu, 26 Nov 2020 17:47:38 +0000 (17:47 +0000)]
CI: Add Windows libclc and SPIRV-LLVM-Translator builds

We need these builds in Windows in order to build the microsoft-clc
parts.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7537>

3 years agomicrosoft/clc: Disable broken f32 -> i64/u64 test
Daniel Stone [Thu, 26 Nov 2020 23:42:13 +0000 (23:42 +0000)]
microsoft/clc: Disable broken f32 -> i64/u64 test

Saturated conversions from f32 -> i64/u64 need to be reworked in the
upstream tree. Disable this test until we've done so, since it doesn't
pass currently.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7537>

3 years agomicrosoft/clc: Allow building with Clang git
Daniel Stone [Thu, 26 Nov 2020 19:25:32 +0000 (19:25 +0000)]
microsoft/clc: Allow building with Clang git

clang's version argument will return '1.2.3git' when built from a
non-release source tree, but the resource directory will be '1.2.3'.
Strip the 'git' suffix if it's there.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7537>

3 years agod3d12: remove hand-written intrinsic builders
Rhys Perry [Fri, 27 Nov 2020 10:13:49 +0000 (10:13 +0000)]
d3d12: remove hand-written intrinsic builders

These are no longer necessary and break the build.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: c9bcad25737 ("nir: add generated intrinsic builders")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7808>

3 years agonir: fix nir_builder.h on MSVC C++ and GCC7.
Rhys Perry [Fri, 27 Nov 2020 09:56:50 +0000 (09:56 +0000)]
nir: fix nir_builder.h on MSVC C++ and GCC7.

MSVC C++ can't do designated initializers without /std:c++latest. These
helpers will likely be removed soon anyway, so just don't use the
intrinsic builders here.

This should also fix the GCC7 build, which doesn't implement non-trivial
designated initializers.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: c9bcad25737 ("nir: add generated intrinsic builders")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7808>

3 years agonir: fix intrinsic builders on MSVC C++
Rhys Perry [Fri, 27 Nov 2020 09:55:11 +0000 (09:55 +0000)]
nir: fix intrinsic builders on MSVC C++

Fix this error:
error C4576: a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: c9bcad25737 ("nir: add generated intrinsic builders")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7808>

3 years agor600/sfn: lower all IO in one pass
Gert Wollny [Thu, 26 Nov 2020 16:30:34 +0000 (17:30 +0100)]
r600/sfn: lower all IO in one pass

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7715>

3 years agor600/sfn: simplify IO lowering and fix TESS IO lowering
Gert Wollny [Wed, 25 Nov 2020 19:44:13 +0000 (20:44 +0100)]
r600/sfn: simplify IO lowering and fix TESS IO lowering

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7715>

3 years agor600/sfn: lower GS IO
Gert Wollny [Tue, 24 Nov 2020 19:55:07 +0000 (20:55 +0100)]
r600/sfn: lower GS IO

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7715>