mesa.git
3 years agoiris: Simplify iris_batch_prepare_noop().
Francisco Jerez [Fri, 29 May 2020 23:54:35 +0000 (16:54 -0700)]
iris: Simplify iris_batch_prepare_noop().

This makes iris_batch_prepare_noop() return a boolean instead of
passing through the relevant set of dirty flags.  It will make it
easier to change the representation of dirty flags.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5279>

3 years agonir/lower_tex: fixes for fp16 yuv lowering
Rob Clark [Wed, 3 Jun 2020 18:34:09 +0000 (11:34 -0700)]
nir/lower_tex: fixes for fp16 yuv lowering

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3079
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5318>

3 years agonir/builder: add bitsize conversion helpers
Rob Clark [Wed, 3 Jun 2020 19:12:54 +0000 (12:12 -0700)]
nir/builder: add bitsize conversion helpers

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5318>

3 years agonir: extract out convert_to_bitsize() helper
Rob Clark [Wed, 3 Jun 2020 19:09:59 +0000 (12:09 -0700)]
nir: extract out convert_to_bitsize() helper

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5318>

3 years agonir: get_base_type() should return enum type
Rob Clark [Wed, 3 Jun 2020 19:07:52 +0000 (12:07 -0700)]
nir: get_base_type() should return enum type

Needed by the next patch, for c++ code which is more strict about
conversions between integers and enums.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5318>

3 years agopanfrost: Handle writes_memory correctly
Alyssa Rosenzweig [Tue, 2 Jun 2020 18:12:29 +0000 (14:12 -0400)]
panfrost: Handle writes_memory correctly

We need to pass it thru to EARLY_Z and WRITES_GLOBAL instead of ignoring
and assuming respectively. Nontrivial performance fix.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5300>

3 years agopanfrost: Document MALI_WRITES_GLOBAL bit
Alyssa Rosenzweig [Tue, 2 Jun 2020 18:05:34 +0000 (14:05 -0400)]
panfrost: Document MALI_WRITES_GLOBAL bit

We've been setting this unconditionally -- oops!

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5300>

3 years agopanfrost: Update MALI_EARLY_Z description
Alyssa Rosenzweig [Tue, 2 Jun 2020 18:03:58 +0000 (14:03 -0400)]
panfrost: Update MALI_EARLY_Z description

Via the ES3.1 early-z testing force, I've confirmed this bit is e-z.
I've also confirmed e-z must be disabled for global writes, as expected.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5300>

3 years agoiris: remove unused iris_bo->swizzle_mode
Marcin Ślusarz [Wed, 3 Jun 2020 15:00:38 +0000 (17:00 +0200)]
iris: remove unused iris_bo->swizzle_mode

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5313>

3 years agoaco: sign-extend input/identity for 16-bit subgroup ops on GFX6-GFX7
Samuel Pitoiset [Tue, 26 May 2020 14:21:44 +0000 (16:21 +0200)]
aco: sign-extend input/identity for 16-bit subgroup ops on GFX6-GFX7

16-bit subgroup ops are implemented with 32-bit instructions
on GFX6-GFX7.

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/5227>

3 years agoaco: fix subdword copies on GFX6-GFX7
Samuel Pitoiset [Tue, 26 May 2020 07:38:27 +0000 (09:38 +0200)]
aco: fix subdword copies on GFX6-GFX7

SDWA is only GFX8+. Use v_mov_b32 since the upper 16 bits don't matter.

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/5227>

3 years agoaco: implement 16-bit nir_intrinsic_quad_* on GFX6-GFX7
Samuel Pitoiset [Tue, 26 May 2020 14:06:14 +0000 (16:06 +0200)]
aco: implement 16-bit nir_intrinsic_quad_* on GFX6-GFX7

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/5227>

3 years agoaco: implement 16-bit reduce operations on GFX6-GFX7
Samuel Pitoiset [Mon, 25 May 2020 17:59:57 +0000 (19:59 +0200)]
aco: implement 16-bit reduce operations on GFX6-GFX7

No fp16 on GFX6-GFX7.

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/5227>

3 years agopan/bi: Handle vectorized load_const
Alyssa Rosenzweig [Tue, 2 Jun 2020 23:30:56 +0000 (19:30 -0400)]
pan/bi: Handle vectorized load_const

In preparation for 16-bit vectors.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5307>

3 years agopan/bi: Passthrough second argument of F32_TO_F16
Alyssa Rosenzweig [Tue, 2 Jun 2020 23:29:25 +0000 (19:29 -0400)]
pan/bi: Passthrough second argument of F32_TO_F16

At the NIR level this is a second vector source of the first (only)
argument; at the BIR level this is a pair of scalars.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5307>

3 years agopan/bi: Pack second argument of F32_TO_F16
Alyssa Rosenzweig [Tue, 2 Jun 2020 23:28:55 +0000 (19:28 -0400)]
pan/bi: Pack second argument of F32_TO_F16

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5307>

3 years agopan/bi: Fix SEL.16 swizzle
Alyssa Rosenzweig [Tue, 2 Jun 2020 23:28:03 +0000 (19:28 -0400)]
pan/bi: Fix SEL.16 swizzle

2 scalar arguments, not 1 vector.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5307>

3 years agopan/bi: Handle SEL with vec3 16-bit
Alyssa Rosenzweig [Tue, 2 Jun 2020 23:27:47 +0000 (19:27 -0400)]
pan/bi: Handle SEL with vec3 16-bit

Otherwise we end up with a missing argument.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5307>

3 years agopanfrost: Passthrough NATIVE loads/stores
Alyssa Rosenzweig [Mon, 25 May 2020 18:00:17 +0000 (14:00 -0400)]
panfrost: Passthrough NATIVE loads/stores

Now that we handle load_output directly, this works for e.g. RGB565 on
Midgard.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>

3 years agopan/mdg: Handle regular nir_intrinsic_load_output
Alyssa Rosenzweig [Mon, 1 Jun 2020 18:14:33 +0000 (14:14 -0400)]
pan/mdg: Handle regular nir_intrinsic_load_output

Instead of the vendored version. Only for blend shaders at the moment,
frag shaders fb_fetch has a lot more going on.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>

3 years agopan/mdg: Allow f2u8 and friends thru
Alyssa Rosenzweig [Mon, 25 May 2020 18:46:53 +0000 (14:46 -0400)]
pan/mdg: Allow f2u8 and friends thru

Now that we can handle destination sizes directly, this keeps us from
needing to chew through so many conversions.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>

3 years agopan/mdg: Handle f2u8
Alyssa Rosenzweig [Mon, 25 May 2020 18:46:40 +0000 (14:46 -0400)]
pan/mdg: Handle f2u8

This is similar to f2u16.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>

3 years agopan/mdg: Fold roundmode into applicable instructions
Alyssa Rosenzweig [Mon, 25 May 2020 18:19:24 +0000 (14:19 -0400)]
pan/mdg: Fold roundmode into applicable instructions

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>

3 years agopan/mdg: Implement *_rtz conversions with roundmode
Alyssa Rosenzweig [Mon, 25 May 2020 18:19:11 +0000 (14:19 -0400)]
pan/mdg: Implement *_rtz conversions with roundmode

Use rte as the canonical type.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>

3 years agopan/mdg: Lower roundmodes
Alyssa Rosenzweig [Mon, 25 May 2020 18:11:04 +0000 (14:11 -0400)]
pan/mdg: Lower roundmodes

So now we can use the IR field semantically.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>

3 years agopan/mdg: Add opcode roundmode property
Alyssa Rosenzweig [Mon, 1 Jun 2020 18:06:44 +0000 (14:06 -0400)]
pan/mdg: Add opcode roundmode property

When the output is rounded in a specified direction.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>

3 years agopan/mdg: Add roundmode enum
Alyssa Rosenzweig [Mon, 25 May 2020 18:05:34 +0000 (14:05 -0400)]
pan/mdg: Add roundmode enum

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>

3 years agopan/mdg: Distinguish blend shaders in internal shader-db
Alyssa Rosenzweig [Mon, 25 May 2020 17:19:43 +0000 (13:19 -0400)]
pan/mdg: Distinguish blend shaders in internal shader-db

Since these shaders are purely internal, the optimization criteria are a
bit different, so it's worth calling attention to this when dumping.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>

3 years agopanfrost: Only use AFBC YTR with RGB and RGBA
Icecream95 [Tue, 2 Jun 2020 02:14:12 +0000 (14:14 +1200)]
panfrost: Only use AFBC YTR with RGB and RGBA

The "lossless colorspace transform" is lossy for R and RG formats.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5293>

3 years agopanfrost: Decode AFBC flag bits
Icecream95 [Tue, 2 Jun 2020 02:13:03 +0000 (14:13 +1200)]
panfrost: Decode AFBC flag bits

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5293>

3 years agoglsl: when NIR linker enable use it to resize uniform arrays
Timothy Arceri [Tue, 5 May 2020 04:24:46 +0000 (14:24 +1000)]
glsl: when NIR linker enable use it to resize uniform arrays

Here we turn on uniform array resizing in the NIR linker and disable
the GLSL IR resizing pass when the NIR linker is enabled.

This will potentially make uniform arrays smaller due to NIR
optimising away more uniform uses.

Shader-db results (SKL):

total instructions in shared programs: 14947192 -> 14944093 (-0.02%)
instructions in affected programs: 138088 -> 134989 (-2.24%)
helped: 822
HURT: 4

total cycles in shared programs: 324868402 -> 324794597 (-0.02%)
cycles in affected programs: 3904170 -> 3830365 (-1.89%)
helped: 2333
HURT: 1485

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4910>

3 years agoglsl: gather uniform dereference info before main linking loop
Timothy Arceri [Tue, 5 May 2020 04:22:04 +0000 (14:22 +1000)]
glsl: gather uniform dereference info before main linking loop

We want to gather information for all stages here before the main
linking loop. In the following patch we will use to information
to reduce the size of uniform arrays where possible.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4910>

3 years agoglsl: add update_array_sizes() helper to the NIR uniform linker
Timothy Arceri [Tue, 5 May 2020 04:18:23 +0000 (14:18 +1000)]
glsl: add update_array_sizes() helper to the NIR uniform linker

This will be used to reduce the size of uniform arrays and replace
the current glsl ir pass. Doing this in NIR allows us to better
optimise the size of uniform arrays.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4910>

3 years agoglsl: add struct to gather more info about uniform array access
Timothy Arceri [Tue, 5 May 2020 04:13:51 +0000 (14:13 +1000)]
glsl: add struct to gather more info about uniform array access

This will be used in the following patches to allow the linker
to resize uniform arrays based on array dereferences.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4910>

3 years agoutil: add BITSET_LAST_BIT() helper
Timothy Arceri [Wed, 29 Apr 2020 04:15:12 +0000 (14:15 +1000)]
util: add BITSET_LAST_BIT() helper

This is the reverse of BITSET_FFS()

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4910>

3 years agoi965: call brw_nir_lower_uniforms() after uniform linking is complete
Timothy Arceri [Wed, 6 May 2020 04:01:41 +0000 (14:01 +1000)]
i965: call brw_nir_lower_uniforms() after uniform linking is complete

i965 currently uses the NIR uniform linker for spirv support. Until
now the only reason there has been no issue with calling the
lowering pass before the linker is because no garbage collection
is done between the calls.

An upcoming change to the linker will add an optimisation to resize
unform arrays where possible. Because lowering causes the array
defs to no longer be used the new optimisation ends up resizing the
arrays to 0. To fix this we move the lowering call after the
linking calls.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4910>

3 years agogbm: document that gbm_bo_map exposes a linear view
Simon Ser [Thu, 28 May 2020 10:27:07 +0000 (12:27 +0200)]
gbm: document that gbm_bo_map exposes a linear view

Drivers (Gallium, i965) expose a linear view of the buffer via
gbm_bo_map.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5238>

3 years agoglsl: Don't replace lrp pattern with lrp if arguments are not floats
Danylo Piliaiev [Fri, 29 May 2020 13:20:45 +0000 (16:20 +0300)]
glsl: Don't replace lrp pattern with lrp if arguments are not floats

We don't have "lrp(int, int, int)" and validation of ir_triop_lrp
fails down the road.

Fixes: 8d37e991
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3059
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Tested-by: Witold Baryluk <witold.baryluk@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5257>

3 years agospirv: Use scoped barriers for SpvOpControlBarrier
Boris Brezillon [Tue, 5 May 2020 08:31:02 +0000 (10:31 +0200)]
spirv: Use scoped barriers for SpvOpControlBarrier

If use_scoped_barrier is set to true, we don't have to split the control
and memory barriers.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4900>

3 years agointel/compiler: Extract control barriers from scoped barriers
Boris Brezillon [Tue, 5 May 2020 08:18:29 +0000 (10:18 +0200)]
intel/compiler: Extract control barriers from scoped barriers

Add a lowering pass extracting all control barriers embedded in scoped
barriers into proper control barriers so we can get rid of the logic
inserting control barriers when an SpvOpControlBarrier with WorkGroup
scope is parsed in spirv_to_nir().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4900>

3 years agonir: Replace the scoped_memory barrier by a scoped_barrier
Boris Brezillon [Tue, 5 May 2020 07:13:20 +0000 (09:13 +0200)]
nir: Replace the scoped_memory barrier by a scoped_barrier

SPIRV OpControlBarrier can have both a memory and a control barrier
which some hardware can handle with a single instruction. Let's
turn the scoped_memory_barrier into a scoped barrier which can embed
both barrier types. Note that control-only or memory-only barriers can
be supported through this new intrinsic by passing NIR_SCOPE_NONE to the
unused barrier type.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Suggested-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4900>

3 years agospirv: Split the vtn_emit_scoped_memory_barrier() logic
Boris Brezillon [Thu, 23 Apr 2020 12:16:43 +0000 (14:16 +0200)]
spirv: Split the vtn_emit_scoped_memory_barrier() logic

We are about to add support for scoped control+memory barriers. Let's
move the convert from SPIRV to NIR enums logic in helpers so we can
easily re-use them.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4900>

3 years agoradv: enable zero VRAM for all VKD3D (DX12->VK) games
Samuel Pitoiset [Fri, 29 May 2020 18:26:00 +0000 (20:26 +0200)]
radv: enable zero VRAM for all VKD3D (DX12->VK) games

To fix rendering issues with Metro Exodus, RE2 and 3 and probably
more titles. It seems the default behaviour of DX12 anyways.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3064
Cc: <mesa-stable@lists.freedesktop.org>
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/5262>

3 years agoradv: enable zero VRAM for Doom Eternal
Samuel Pitoiset [Fri, 29 May 2020 18:02:49 +0000 (20:02 +0200)]
radv: enable zero VRAM for Doom Eternal

That fixes some rendering issues. Probably some unitialized data
from the game.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3064
Cc: <mesa-stable@lists.freedesktop.org>
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/5262>

3 years agogitlab-ci: bump piglit checkout commit
Timothy Arceri [Wed, 3 Jun 2020 00:23:32 +0000 (10:23 +1000)]
gitlab-ci: bump piglit checkout commit

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

3 years agoglsl/spirv: remove dead uniforms in spirv nir linker
Timothy Arceri [Mon, 4 May 2020 04:33:56 +0000 (14:33 +1000)]
glsl/spirv: remove dead uniforms in spirv nir linker

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>

3 years agoglsl: remove dead uniforms in the nir linker
Timothy Arceri [Wed, 29 Apr 2020 02:20:47 +0000 (12:20 +1000)]
glsl: remove dead uniforms in the nir linker

This is now possible as we do uniform linking via a nir based linker.

Shader-db results for IRIS (SKL):

total instructions in shared programs: 14947192 -> 14946397 (<.01%)
instructions in affected programs: 39498 -> 38703 (-2.01%)
helped: 230
HURT: 18

total cycles in shared programs: 324868402 -> 324847058 (<.01%)
cycles in affected programs: 706701 -> 685357 (-3.02%)
helped: 599
HURT: 449

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>

3 years agoglsl: add can_remove_uniform() helper to the NIR linker
Timothy Arceri [Thu, 28 May 2020 01:08:42 +0000 (11:08 +1000)]
glsl: add can_remove_uniform() helper to the NIR linker

This helper reflects the rules we follow in the GLSL IR linker when
deciding if we can remove a dead uniform. This check is required to
avoid regressions when turning on NIR dead uniform clean up in the
following patch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>

3 years agonir: add callback to nir_remove_dead_variables()
Timothy Arceri [Thu, 28 May 2020 00:59:28 +0000 (10:59 +1000)]
nir: add callback to nir_remove_dead_variables()

This allows us to do API specific checks before removing variable
without filling nir_remove_dead_variables() with API specific code.

In the following patches we will use this to support the removal
of dead uniforms in GLSL.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>

3 years agonir: add glsl_get_ifc_packing() helper
Timothy Arceri [Thu, 30 Apr 2020 03:36:02 +0000 (13:36 +1000)]
nir: add glsl_get_ifc_packing() helper

This will be used in the following patch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>

3 years agopan/mdg: Don't double-replicate blend on T720
Alyssa Rosenzweig [Tue, 2 Jun 2020 22:12:14 +0000 (18:12 -0400)]
pan/mdg: Don't double-replicate blend on T720

We already do this unconditionally in NIR.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5305>

3 years agoradv: Use common gfx10_format_table.h
Bas Nieuwenhuizen [Mon, 1 Jun 2020 23:44:52 +0000 (01:44 +0200)]
radv: Use common gfx10_format_table.h

Save some python code and build time, as well as some code duplication.

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

3 years agoradv: Include gfx10_format_table.h only from a single source file.
Bas Nieuwenhuizen [Mon, 1 Jun 2020 22:45:14 +0000 (00:45 +0200)]
radv: Include gfx10_format_table.h only from a single source file.

The radeonsi variant has everything in the header, so lets not
include it everywhere.

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

3 years agoradeonsi: Define gfx10_format in the common header.
Bas Nieuwenhuizen [Mon, 1 Jun 2020 22:55:22 +0000 (00:55 +0200)]
radeonsi: Define gfx10_format in the common header.

So we don't have to have multiple definitions of the struct when
sharing with radv.

While at it put the table properly in a C file so we don't have to
deal with multiple definitions, and the struct definition isn't
in generated source.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291>

3 years agoamd/common,radeonsi: Move gfx10_format_table to common.
Bas Nieuwenhuizen [Mon, 1 Jun 2020 21:49:22 +0000 (23:49 +0200)]
amd/common,radeonsi: Move gfx10_format_table to common.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291>

3 years agoradeonsi: Explicitly map Z16_UNORM_S8_UINT to None for GFX10.
Bas Nieuwenhuizen [Mon, 1 Jun 2020 22:34:28 +0000 (00:34 +0200)]
radeonsi: Explicitly map Z16_UNORM_S8_UINT to None for GFX10.

We should always use separate planes for textures with this format.

Fixes: 273ead81f1a "util/format: Add VK_FORMAT_D16_UNORM_S8_UINT."
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291>

3 years agoRevert "CI: Disable Panfrost T720/T760"
Daniel Stone [Tue, 2 Jun 2020 18:59:00 +0000 (19:59 +0100)]
Revert "CI: Disable Panfrost T720/T760"

Switches have been rewired, VLANs have been reconfigured, network
elements with non-functional remote management have been removed from
racks and thrown on desks in anger.

This reverts commit ae6e1aee7d1bd49ae494b8a25ca33d092a3a145a.

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

3 years agoci: bare-metal: make it possible to use a script for serial
Christian Gmeiner [Sat, 9 May 2020 19:49:52 +0000 (21:49 +0200)]
ci: bare-metal: make it possible to use a script for serial

Makes it possible to use e.g. a ser2net script to talk to the devices.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5268>

3 years agozink: Use store_dest_raw instead of storing an uint
Erik Faye-Lund [Thu, 28 May 2020 12:41:17 +0000 (14:41 +0200)]
zink: Use store_dest_raw instead of storing an uint

I cleaned up the other similar call-sites, but somehow missed this one.
There's nothing different with this, so let's also fix this.

Fixes: 16339646f03 ("zink/spirv: rename functions a bit")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5250>

3 years agoradv: Explicitly cast TIMESTAMP_NOT_READY value to uin32_t where needed.
Oschowa [Wed, 27 May 2020 10:09:20 +0000 (12:09 +0200)]
radv: Explicitly cast TIMESTAMP_NOT_READY value to uin32_t where needed.

Fixes a clang warning.

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

3 years agoaco: Use correct reference type in for-range-loop.
Oschowa [Wed, 27 May 2020 10:00:19 +0000 (12:00 +0200)]
aco: Use correct reference type in for-range-loop.

Fixes a clang warning.

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

3 years agoaco: Don't std::move temporary object.
Oschowa [Fri, 22 May 2020 10:52:05 +0000 (12:52 +0200)]
aco: Don't std::move temporary object.

Fixes the following clang warning:

mesa/src/amd/compiler/aco_optimizer.cpp:2928:15: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
   ctx.uses = std::move(dead_code_analysis(program));

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

3 years agoaco: Don't declare 'Block' as class, but define as struct.
Oschowa [Fri, 22 May 2020 10:40:29 +0000 (12:40 +0200)]
aco: Don't declare 'Block' as class, but define as struct.

Fixes clang warnings.

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

3 years agoradv: Don't take absolute value of unsigned type.
Oschowa [Fri, 22 May 2020 10:37:27 +0000 (12:37 +0200)]
radv: Don't take absolute value of unsigned type.

Fixes clang warnings.

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

3 years agoradv/aco: Always enable subgroup shuffle.
Timur Kristóf [Tue, 26 May 2020 23:31:35 +0000 (01:31 +0200)]
radv/aco: Always enable subgroup shuffle.

It is now supported by both backends on all hw.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5223>

3 years agoaco: Implement subgroup shuffle on GFX6-7.
Timur Kristóf [Tue, 26 May 2020 23:28:03 +0000 (01:28 +0200)]
aco: Implement subgroup shuffle on GFX6-7.

GFX6 and GFX7 don't have the ds_bpermute (or permute) instruction,
but we would like to support subgroup shuffle on these old GPUs.

So we introduce a new pseudio instruction which will be lowered
to an "unrolled loop" that emulates bpermute on GFX6 and GFX7
using readlane instructions, while also respecting the exec mask
thanks to v_cmpx.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5223>

3 years agoaco/gfx10: Refactor of GFX10 wave64 bpermute.
Timur Kristóf [Tue, 26 May 2020 23:22:28 +0000 (01:22 +0200)]
aco/gfx10: Refactor of GFX10 wave64 bpermute.

The emulated GFX10 wave64 bpermute no longer needs a linear_vgpr,
so we don't consider it a reduction anymore. Additionally, the
code is slightly reorganized in preparation for the GFX6 emulated
bpermute.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5223>

3 years agoradeonsi: add a hack to disable TRUNC_COORD for shadow samplers
Marek Olšák [Tue, 26 May 2020 09:39:08 +0000 (05:39 -0400)]
radeonsi: add a hack to disable TRUNC_COORD for shadow samplers

This fixes dEQP-GLES3.functional.shaders.texture_functions.textureprojlodoffset.sampler2dshadow_vertex.

This is probably a dEQP bug.

Fixes: d573d1d82524b8a2e5f56938069cabc0f0176a0e
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>

3 years agoradeonsi: pass at most 3 images and/or shader buffers via user SGPRs for compute
Marek Olšák [Thu, 21 May 2020 09:13:25 +0000 (05:13 -0400)]
radeonsi: pass at most 3 images and/or shader buffers via user SGPRs for compute

This should slightly decrease shader lifetime.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>

3 years agoradeonsi: remove const_buffers_declared hacks
Marek Olšák [Thu, 21 May 2020 08:18:19 +0000 (04:18 -0400)]
radeonsi: remove const_buffers_declared hacks

This was a bug that was uncovered by 4553fc66a5f23607c2e872d8ac8755c747bd0bd2.

Piglit: spec@arb_uniform_buffer_object@maxblocks

Fixes: 4553fc66a5f23607c2e872d8ac8755c747bd0bd2
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>

3 years agoradeonsi: remove unused leftover code for INDIRECT_BUFFER inside IBs
Marek Olšák [Sun, 24 May 2020 12:34:30 +0000 (08:34 -0400)]
radeonsi: remove unused leftover code for INDIRECT_BUFFER inside IBs

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>

3 years agonir: gather which images are MSAA
Marek Olšák [Sun, 24 May 2020 19:52:26 +0000 (15:52 -0400)]
nir: gather which images are MSAA

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>

3 years agonir: gather which images are buffers
Marek Olšák [Thu, 21 May 2020 09:13:01 +0000 (05:13 -0400)]
nir: gather which images are buffers

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>

3 years agonir: don't count samplers and images in interface blocks
Marek Olšák [Tue, 26 May 2020 08:36:33 +0000 (04:36 -0400)]
nir: don't count samplers and images in interface blocks

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>

3 years agoac/nir: support v2f16 derivatives
Marek Olšák [Mon, 11 May 2020 07:01:50 +0000 (03:01 -0400)]
ac/nir: support v2f16 derivatives

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

3 years agoac/nir: set the second v_cvt_pkrtz argument to undef if it's unused
Marek Olšák [Mon, 11 May 2020 20:31:58 +0000 (16:31 -0400)]
ac/nir: set the second v_cvt_pkrtz argument to undef if it's unused

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

3 years agoac/nir: select v_cvt_pkrtz for all conversions from f32 to f16 for radeonsi
Marek Olšák [Sun, 10 May 2020 03:00:44 +0000 (23:00 -0400)]
ac/nir: select v_cvt_pkrtz for all conversions from f32 to f16 for radeonsi

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

3 years agoac/nir: handle nir_op_[fiu]2[fiu]mp opcodes
Marek Olšák [Sun, 3 May 2020 23:30:31 +0000 (19:30 -0400)]
ac/nir: handle nir_op_[fiu]2[fiu]mp opcodes

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

3 years agoac/nir: support 16-bit data in image opcodes
Marek Olšák [Mon, 4 May 2020 13:30:40 +0000 (09:30 -0400)]
ac/nir: support 16-bit data in image opcodes

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

3 years agoac/nir: support 16-bit data in buffer_load_format opcodes
Marek Olšák [Mon, 4 May 2020 14:43:07 +0000 (10:43 -0400)]
ac/nir: support 16-bit data in buffer_load_format opcodes

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

3 years agoac/nir: remove type and num_channels args from ac_build_buffer_store_common
Marek Olšák [Mon, 4 May 2020 14:55:08 +0000 (10:55 -0400)]
ac/nir: remove type and num_channels args from ac_build_buffer_store_common

They were only used for type overloading where we can just use
the type of data.

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

3 years agoac/nir: support vector types in the type suffix of overloaded intrinsics
Marek Olšák [Mon, 4 May 2020 11:01:04 +0000 (07:01 -0400)]
ac/nir: support vector types in the type suffix of overloaded intrinsics

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

3 years agoac/nir: use more types from ac_llvm_context
Marek Olšák [Mon, 4 May 2020 13:27:49 +0000 (09:27 -0400)]
ac/nir: use more types from ac_llvm_context

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

3 years agoac: rename has_double_rate_fp16 -> has_packed_math_16bit
Marek Olšák [Sun, 3 May 2020 23:27:27 +0000 (19:27 -0400)]
ac: rename has_double_rate_fp16 -> has_packed_math_16bit

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

3 years agogallium: add shader caps INT16 and FP16_DERIVATIVES
Marek Olšák [Sun, 10 May 2020 21:05:00 +0000 (17:05 -0400)]
gallium: add shader caps INT16 and FP16_DERIVATIVES

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

3 years agoglsl: lower samplers with highp coordinates correctly
Marek Olšák [Sun, 10 May 2020 22:00:55 +0000 (18:00 -0400)]
glsl: lower samplers with highp coordinates correctly

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

3 years agoglsl: lower the precision of imageLoad
Marek Olšák [Sun, 10 May 2020 00:57:25 +0000 (20:57 -0400)]
glsl: lower the precision of imageLoad

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

3 years agoglsl: lower mediump partial derivatives
Marek Olšák [Sun, 10 May 2020 01:38:34 +0000 (21:38 -0400)]
glsl: lower mediump partial derivatives

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

3 years agoglsl: lower mediump integer types to int16 and uint16
Marek Olšák [Sat, 9 May 2020 02:42:43 +0000 (22:42 -0400)]
glsl: lower mediump integer types to int16 and uint16

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

3 years agoglsl: handle int16 and uint16 types and add instructions for mediump
Marek Olšák [Sat, 9 May 2020 02:16:42 +0000 (22:16 -0400)]
glsl: handle int16 and uint16 types and add instructions for mediump

v2: add more changes to ir_validate.cpp

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

3 years agoglsl: treat lowp as mediump when lowering builtins
Marek Olšák [Tue, 5 May 2020 01:52:09 +0000 (21:52 -0400)]
glsl: treat lowp as mediump when lowering builtins

This seems to have been missed.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

3 years agonir: add options::vectorize_vec2_16bit to limit vectorization to vec2 16
Marek Olšák [Mon, 4 May 2020 00:10:57 +0000 (20:10 -0400)]
nir: add options::vectorize_vec2_16bit to limit vectorization to vec2 16

for hardware that is scalar but can do 2 16-bit operations on low and high
16 bits of registers at once.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

3 years agonir: fix lower_wpos for 16-bit fddy
Marek Olšák [Mon, 11 May 2020 06:56:47 +0000 (02:56 -0400)]
nir: fix lower_wpos for 16-bit fddy

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

3 years agonir: lower int16 and uint16 in nir_lower_mediump_outputs
Marek Olšák [Mon, 11 May 2020 03:04:23 +0000 (23:04 -0400)]
nir: lower int16 and uint16 in nir_lower_mediump_outputs

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

3 years agonir: add int16 and uint16 type helpers
Marek Olšák [Mon, 11 May 2020 04:42:51 +0000 (00:42 -0400)]
nir: add int16 and uint16 type helpers

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

3 years agonir: add i2imp and u2ump opcodes for conversions to mediump
Marek Olšák [Sat, 9 May 2020 02:05:46 +0000 (22:05 -0400)]
nir: add i2imp and u2ump opcodes for conversions to mediump

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

3 years agonir: Fold f2f16(b2f32(x)) to b2f16(x)
Alyssa Rosenzweig [Mon, 11 May 2020 15:05:15 +0000 (11:05 -0400)]
nir: Fold f2f16(b2f32(x)) to b2f16(x)

By definition.

This reduces register pressure on freedreno so that the noubo expected
failure goes away.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

3 years agomeson: remove "empty array"/"array of an empty string" confusion
Eric Engestrom [Mon, 14 May 2018 15:40:47 +0000 (16:40 +0100)]
meson: remove "empty array"/"array of an empty string" confusion

Until Meson 0.47, setting `-D arrayoption=` was not the same as setting
`-D arrayoption=[]`; the latter cleared the array, while the former
filled it with an empty string option.

Since Meson 0.47 [1], the former maps to the latter, so empty items can
only be set by explicitly giving an array containing an empty string,
ie. `-D arrayoption="['']"`; however note that this is *not* what we
want in any of the current Mesa code anyway.

This makes the code handling array options a bit more complicated, and
a lot more error-prone, so let's get rid of the confusion by removing
the empty-string option.

[1] https://github.com/mesonbuild/meson/commit/f3a8f9c34d95d862fb4d12869a7b31cea592561f

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/386>

3 years agoturnip: fix RENDER_COMPONENTS value
Jonathan Marek [Tue, 2 Jun 2020 02:02:19 +0000 (22:02 -0400)]
turnip: fix RENDER_COMPONENTS value

This fixes render_components being 0 when mrt_count=8, because shift by 32
is UB and in arm64 it ends up shifting by 0. This fixes tests with 8 MRTs.

Fixes the 3d path sysmem CmdClearAttachments to set RENDER_COMPONENTS, as
it was previously relying on tu6_emit_mrt setting it, but it is now part of
the pipeline state.

Also switch back to the previous behavior of not setting render components
for VK_ATTACHMENT_UNUSED attachments: we don't update the MRT state for
such attachments so we definitely don't want to be trying writing to those.

Fixes: 078aa9df8daff60e52a66d8f ("tu: Move RENDER_COMPONENTS setting to pipeline state")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5292>

3 years agoCI: Disable Panfrost T720/T760
Daniel Stone [Tue, 2 Jun 2020 12:39:14 +0000 (14:39 +0200)]
CI: Disable Panfrost T720/T760

We're reconfiguring our Cambridge office lab networking and physical
setup for more scalability amongst other things. We can still run jobs
on one RK3399 at the peak outage, but we'll lose the T7x0 this morning,
so disable it until it's all back.

T820 is still disabled due to an unrelated BayLibre internal outage.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5296>