platform/upstream/mesa.git
3 years agonir: Add image atomic_fmin/fmax intrinsics
Jason Ekstrand [Thu, 27 Aug 2020 18:11:54 +0000 (13:11 -0500)]
nir: Add image atomic_fmin/fmax intrinsics

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8750>

3 years agonir: Handle deref_atomic_fadd in a couple of passes
Caio Marcelo de Oliveira Filho [Wed, 17 Mar 2021 21:20:14 +0000 (14:20 -0700)]
nir: Handle deref_atomic_fadd in a couple of passes

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8750>

3 years agospirv: Update headers and metadata from latest Khronos commit
Caio Marcelo de Oliveira Filho [Wed, 17 Mar 2021 04:20:12 +0000 (21:20 -0700)]
spirv: Update headers and metadata from latest Khronos commit

This corresponds to bcf55210f13a4fa3c3d0963b509ff1070e434c79
("Merge pull request #178 from orbea/datadir") in
https://github.com/KhronosGroup/SPIRV-Headers.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8750>

3 years agolavapipe: bump maxMemoryAllocationCount
Dave Airlie [Wed, 17 Mar 2021 03:33:14 +0000 (13:33 +1000)]
lavapipe: bump maxMemoryAllocationCount

not sure why this was so low

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9644>

3 years agost/mesa: add a driconf option to transcode ETC2 to DXTC
Marek Olšák [Wed, 24 Feb 2021 18:11:07 +0000 (13:11 -0500)]
st/mesa: add a driconf option to transcode ETC2 to DXTC

for performance analysis

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

3 years agointel/fs/vec4: add missing dependency in write-on-write fixed GRFs
Lionel Landwerlin [Wed, 17 Mar 2021 19:30:52 +0000 (21:30 +0200)]
intel/fs/vec4: add missing dependency in write-on-write fixed GRFs

If we load constant data using pull constant SENDS, and we later load
that register with some other data, we can end up in a situation where
we don't track the initial fixed register write and therefore end up
using uninitialized registers.

This tracks write-on-write of fixed GRFs like we do for normal virtual
GRFs.

v2: Fix post_alloc_reg case (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9667>

3 years agozink: Wire up ARB_post_depth_coverage
Adam Jackson [Fri, 12 Mar 2021 19:44:29 +0000 (14:44 -0500)]
zink: Wire up ARB_post_depth_coverage

Just a matter of passing the bits through in the right place.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9637>

3 years agomesa: fix parameter reservation size
Marek Olšák [Mon, 15 Mar 2021 13:58:19 +0000 (09:58 -0400)]
mesa: fix parameter reservation size

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

3 years agomesa: clear reserved parameter storage because it's stored in the shader cache
Marek Olšák [Tue, 2 Mar 2021 06:07:10 +0000 (01:07 -0500)]
mesa: clear reserved parameter storage because it's stored in the shader cache

The elements might not be initialized and we don't want random bytes
in the shader cache.

Discovered by valgrind.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9360>

3 years agomesa: don't overallocate ParameterValues 4 times (v2)
Marek Olšák [Tue, 2 Mar 2021 09:19:53 +0000 (04:19 -0500)]
mesa: don't overallocate ParameterValues 4 times (v2)

The additional memory was never used.

v2: rework

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9360>

3 years agomesa: fix a oldNum typo in reallocation in _mesa_reserve_parameter_storage
Marek Olšák [Tue, 2 Mar 2021 09:17:46 +0000 (04:17 -0500)]
mesa: fix a oldNum typo in reallocation in _mesa_reserve_parameter_storage

oldNum was incorrect. oldValNum is the correct number of elements
to copy inside realloc. (oldNum is for Parameters, not ParameterValues)

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9360>

3 years agomesa: add assertions for buffer reference counts
Marek Olšák [Tue, 2 Mar 2021 05:56:29 +0000 (00:56 -0500)]
mesa: add assertions for buffer reference counts

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9360>

3 years agomesa: fix Blender crash due to optimizations in buffer reference counting
Marek Olšák [Tue, 2 Mar 2021 06:38:26 +0000 (01:38 -0500)]
mesa: fix Blender crash due to optimizations in buffer reference counting

The problem was that I assumed that deleted zombie buffers can't have any
references in the context, so buffers were released sooner than they should
have been.

The fix is to count the non-atomic references in the new field
gl_buffer_object::CtxRefCount. When we detach the context from the buffer,
we can just add CtxRefCount to RefCount to re-enable atomic reference
counting. This also allows removing code that was doing a similar thing.

Fixes: e014e3b6be63 "mesa: don't count buffer references for the context that created them"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4259

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9360>

3 years agoradeonsi: use pipe_sampler_state::border_color_is_integer to simplify stuff
Marek Olšák [Sat, 13 Mar 2021 09:11:36 +0000 (04:11 -0500)]
radeonsi: use pipe_sampler_state::border_color_is_integer to simplify stuff

We don't need the separate integer sampler state if we know the border
color type.

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

3 years agoci: Don't run meson tests in strace for meson-mingw32-x86_64 job
Michel Dänzer [Wed, 17 Mar 2021 10:41:31 +0000 (11:41 +0100)]
ci: Don't run meson tests in strace for meson-mingw32-x86_64 job

There have been repeated timeouts:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3437#note_842273

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

3 years agoradeonsi: fix leak when the in-memory cache is full
Axel Davy [Sun, 14 Mar 2021 18:31:48 +0000 (19:31 +0100)]
radeonsi: fix leak when the in-memory cache is full

When the hw_binary is not put in the in-memory
cache it must be freed.

Fixes: 8283ed65cfd ("radeonsi: Limit the size of the in-memory shader cache")

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9587>

3 years agogbm: remove fprintf calls in gbm_dri_bo_create
Simon Ser [Wed, 17 Mar 2021 08:09:48 +0000 (09:09 +0100)]
gbm: remove fprintf calls in gbm_dri_bo_create

These errors can be handled by the caller. The caller can't guess
whether the GBM implementation supports modifiers, for instance.

Signed-off-by: Simon Ser <contact@emersion.fr>
References: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7601#note_778845
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8715>

3 years agogbm: fail early when modifier list only contains INVALID
Simon Ser [Tue, 26 Jan 2021 12:46:25 +0000 (13:46 +0100)]
gbm: fail early when modifier list only contains INVALID

The current check only accomodates for a list with a single INVALID
item. However the driver won't be able to pick any modifier if the
list only contains INVALID. This includes the following cases:

- The modifier list is empty (count == 0)
- The modifier list contains more than a single item, but all items
  are INVALID

In these cases, also fail early.

Signed-off-by: Simon Ser <contact@emersion.fr>
References: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7601#note_778845
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8715>

3 years agozink: switch to deqp-runner for piglit jobs
Mike Blumenkrantz [Tue, 16 Mar 2021 18:10:49 +0000 (14:10 -0400)]
zink: switch to deqp-runner for piglit jobs

There's a few changes in the expected results. First of all, there's a
few failures that are now interpreted as crashes. These test are:

- glx@glx-visuals-depth
- glx@glx-visuals-depth -pixmap
- glx@glx-visuals-stencil
- glx@glx-visuals-stencil -pixmap

Secondly, and more surprisingly, there's three tests that were
previously passing, but are now failing. These are all EGL-related, so
it's likely that there's some EGL interaction that is different with the
new runner. These tests are:

- spec@egl 1.4@eglterminate then unbind context
- spec@egl_khr_surfaceless_context@viewport
- spec@egl_mesa_configless_context@basic

commit log and skiplist by Erik Faye-Lund <erik.faye-lund@collabora.com>

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

3 years agoci/freedreno: Mark the rest of the glx_arb_sync_control@timing as flakes.
Eric Anholt [Wed, 17 Mar 2021 17:10:17 +0000 (10:10 -0700)]
ci/freedreno: Mark the rest of the glx_arb_sync_control@timing as flakes.

IIRC I've seen -msc-delta 2 flake set, so just complete the set.

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

3 years agoci/freedreno: Mark an a630 piglit flake from async shader compiling.
Eric Anholt [Wed, 17 Mar 2021 17:09:06 +0000 (10:09 -0700)]
ci/freedreno: Mark an a630 piglit flake from async shader compiling.

It seems that right around when we enabled piglit, some timing also
changed so this one started flaking.

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

3 years agoanv/apply_pipeline_layout: Add support for A64 descriptor access
Jason Ekstrand [Tue, 16 Mar 2021 15:08:21 +0000 (10:08 -0500)]
anv/apply_pipeline_layout: Add support for A64 descriptor access

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv: Do UBO loads with global addresses for bindless
Jason Ekstrand [Fri, 15 Jan 2021 22:44:44 +0000 (16:44 -0600)]
anv: Do UBO loads with global addresses for bindless

This makes UBO loads in the variable pointers or bindless case work just
like SSBO loads in the sense that they use A64 messages and 64-bit
global addresses.  The primary difference is that we have an
optimization in anv_nir_lower_ubo_loads which uses a (possibly
predicated) block load message when the offset is constant so we get
roughly the same performance as we would from plumbing load_ubo all the
way to the back-end.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv: Add a pass for lowering A64 UBO access
Jason Ekstrand [Fri, 15 Jan 2021 20:59:42 +0000 (14:59 -0600)]
anv: Add a pass for lowering A64 UBO access

Instead of load_global_constant_offset/bounded, we want to use the
Intel-specific block load intrinsic whenever we can.  This way we get
the same wide block loads that we usually use for constant offset UBO
pulls with a binding table.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agonir/lower_io: Support global addresses for UBOs in nir_lower_explicit_io
Jason Ekstrand [Fri, 15 Jan 2021 06:35:19 +0000 (00:35 -0600)]
nir/lower_io: Support global addresses for UBOs in nir_lower_explicit_io

For nir_address_format_64bit_global_32bit_offset and
nir_address_format_64bit_bounded_global, we use a new intrinsics which
take the base address and offset as separate parameters.  For bounds-
checked access, the bound is also included in the intrinsic.  This gives
the drive more control over the bounds checking so that UBOs don't
suddenly become massively more expensive.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv/apply_pipeline_layout: Use the new helpers for images
Jason Ekstrand [Sun, 14 Mar 2021 05:58:13 +0000 (23:58 -0600)]
anv/apply_pipeline_layout: Use the new helpers for images

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv/apply_pipeline_layout: Use the new helpers for early lowering
Jason Ekstrand [Fri, 12 Mar 2021 23:35:32 +0000 (17:35 -0600)]
anv/apply_pipeline_layout: Use the new helpers for early lowering

This also means that some of the newly added helpers need to grow a bit
to support VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_DATA_EXT.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv/apply_pipeline_layout: Rework the desc_addr_format helper
Jason Ekstrand [Fri, 12 Mar 2021 23:49:40 +0000 (17:49 -0600)]
anv/apply_pipeline_layout: Rework the desc_addr_format helper

We're about to add a new helper which is more detailed.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv/apply_pipeline_layout: Refactor all our descriptor address builders
Jason Ekstrand [Fri, 12 Mar 2021 21:25:13 +0000 (15:25 -0600)]
anv/apply_pipeline_layout: Refactor all our descriptor address builders

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv/apply_pipeline_layout: Apply dynamic offsets in load_ssbo_descriptor
Jason Ekstrand [Wed, 20 Jan 2021 21:59:23 +0000 (15:59 -0600)]
anv/apply_pipeline_layout: Apply dynamic offsets in load_ssbo_descriptor

This function has exactly two call sites.  The first is where we had
these calculations before.  The second only cares about the size of the
SSBO so all the extra code we emit will be dead.  However, NIR should
easily clean that up and this lets us consolidate things a bit better.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv: Zero out the last dword of UBO/SSBO descriptors in the shader
Jason Ekstrand [Fri, 15 Jan 2021 23:20:22 +0000 (17:20 -0600)]
anv: Zero out the last dword of UBO/SSBO descriptors in the shader

This way, NIR can constant fold it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv: Rework the 64bit_bounded_global resource index format
Jason Ekstrand [Sat, 13 Mar 2021 00:27:28 +0000 (18:27 -0600)]
anv: Rework the 64bit_bounded_global resource index format

Instead of packing the descriptor offset into the packed portion, use
that unused channel we have lying around.  This potentially allows for
larger descriptor sets.  We also re-arrange the components a bit to make
it more like the 64bit_bounded_global memory address format.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv: Use 64bit_global_32bit_offset for SSBOs
Jason Ekstrand [Wed, 20 Jan 2021 21:07:23 +0000 (15:07 -0600)]
anv: Use 64bit_global_32bit_offset for SSBOs

This has the advantage of giving us cheaper address calculations because
we can calculate in 32 bits first and then do a single 64x32 add.  It
also lets us delete a bunch of code for dealing with descriptor
dereferences (vulkan_resource_reindex, and friends) because our bindless
SSBO pointers are now vec4s regardless of whether or not we're doing
bounds checking.  This also unifies UBOs and SSBOs.  The one down-side
is that, in certain variable pointers cases, it may end up burning more
memory and/or increasing register pressure.  This seems like a worth-
while trade-off.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agonir: Add a new 64+32-bit address format
Jason Ekstrand [Wed, 20 Jan 2021 20:27:32 +0000 (14:27 -0600)]
nir: Add a new 64+32-bit address format

This is a global address format where you have a 64-bit base pointer and
a 32-bit offset.  It's intentionally identical to 64bit_bounded_global
except nir_lower_explicit_io does no bounds checking with it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv/apply_pipeline_layout: Add some switch statements
Jason Ekstrand [Thu, 21 Jan 2021 23:31:50 +0000 (17:31 -0600)]
anv/apply_pipeline_layout: Add some switch statements

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv/apply_pipeline_layout: Plumb through a UBO address format
Jason Ekstrand [Fri, 15 Jan 2021 22:40:41 +0000 (16:40 -0600)]
anv/apply_pipeline_layout: Plumb through a UBO address format

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv/apply_pipeline_layout: Move bounds checking later for index/offset
Jason Ekstrand [Tue, 9 Mar 2021 23:32:14 +0000 (17:32 -0600)]
anv/apply_pipeline_layout: Move bounds checking later for index/offset

Instead of doing the array check at the load_vulkan_resource_index
intrinsic, stuff it in the vec2 and handle it at load_vulkan_descriptor
time.  This allows the bounds check to take any re-index intrinsics into
account.  This only affects variablePointers + SSBOs + Gen7.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv/apply_pipeline_layout: Run DCE between the early and late passes
Jason Ekstrand [Fri, 12 Mar 2021 20:04:38 +0000 (14:04 -0600)]
anv/apply_pipeline_layout: Run DCE between the early and late passes

This allows us to ignore UBOs in the late code going forward.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv/apply_pipeline_layout: Lower UBO loads in the early pass
Jason Ekstrand [Fri, 15 Jan 2021 06:18:37 +0000 (00:18 -0600)]
anv/apply_pipeline_layout: Lower UBO loads in the early pass

We're about to enable bindless UBOs via A64 memory access like we do for
SSBOs.  In order to prevent 100% of UBOs from hitting that path, we
enable them in the early lowering.  This way we'll still get binding
table-based UBO access for any non-bindless ones.  In particular, we
need this for UBO pushing to work.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv/apply_pipeline_layout: Rework the early pass index/offset helpers
Jason Ekstrand [Thu, 21 Jan 2021 01:42:16 +0000 (19:42 -0600)]
anv/apply_pipeline_layout: Rework the early pass index/offset helpers

Rewrite them all to work on an index/offset vec2 instead of some only
returning the index.  This means SSBO size handling is a tiny bit more
complicated but it will also mean we can use them for descriptor buffers
properly.

This also fixes a bug where we weren't bounds-checking re-index
intrinsics because we applied the bounds check at the tail of the
recursion and not at the beginning.

Fixes: 3cf78ec2bd "anv: Lower some SSBO operations in..."
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv/apply_pipeline_layout: Refactor descriptor chasing code
Jason Ekstrand [Thu, 21 Jan 2021 00:49:26 +0000 (18:49 -0600)]
anv/apply_pipeline_layout: Refactor descriptor chasing code

This makes things a bit more generic for use in the next commit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv: Use nir_shader_instructions_pass in apply_pipeline_layout
Jason Ekstrand [Fri, 12 Mar 2021 19:00:47 +0000 (13:00 -0600)]
anv: Use nir_shader_instructions_pass in apply_pipeline_layout

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoanv: Use load_global_constant for shader constants
Jason Ekstrand [Wed, 20 Jan 2021 22:21:38 +0000 (16:21 -0600)]
anv: Use load_global_constant for shader constants

NIR can do a bit better job optimizing this version.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agointel/fs,rt: Add a predicate to load_global_const_block
Jason Ekstrand [Fri, 15 Jan 2021 00:00:00 +0000 (18:00 -0600)]
intel/fs,rt: Add a predicate to load_global_const_block

This allows us to do bounds checked A64 block load without the it being
counted as control-flow by NIR.  This means that NIR optimizations like
CSE will be able to work on these the same as a regular load.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>

3 years agoci/bare-metal: Restart a run on intermittent kernel lockups.
Eric Anholt [Wed, 17 Mar 2021 16:19:18 +0000 (09:19 -0700)]
ci/bare-metal: Restart a run on intermittent kernel lockups.

Since enabling SMP on db820c and cranking up how many tests we run, we've
been seeing lockups like this a couple of times a week.

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

3 years agofreedreno/drm: Avoid unitialized timestamp in submit fail
Rob Clark [Tue, 16 Mar 2021 22:45:38 +0000 (15:45 -0700)]
freedreno/drm: Avoid unitialized timestamp in submit fail

Saw a flood of "waiting on invalid fence" with a completely bogus
looking fence # in a log of a rather strange low-memory crash.  Not
sure if it is coming from memory corruption in userspace, but if a
submit ioctl is failing due to failed allocation (or other reason)
we would get left with random stack garbage as the fence #.  Let's
not have that as a potential problem.

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

3 years agoaco: use a single instruction for uadd32_sat() on GFX8
Rhys Perry [Mon, 15 Mar 2021 13:35:54 +0000 (13:35 +0000)]
aco: use a single instruction for uadd32_sat() on GFX8

fossil-db (GFX8):
Totals from 8 (0.01% of 147787) affected shaders:
SGPRs: 352 -> 368 (+4.55%)
CodeSize: 49576 -> 48788 (-1.59%)
Instrs: 9487 -> 9318 (-1.78%)
Latency: 49935 -> 49607 (-0.66%)
InvThroughput: 138493 -> 137443 (-0.76%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9598>

3 years agoaco: use uadd32_sat() helper for nir_op_uadd_sat
Rhys Perry [Mon, 15 Mar 2021 13:33:29 +0000 (13:33 +0000)]
aco: use uadd32_sat() helper for nir_op_uadd_sat

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9598>

3 years agoaco: implement 64-bit VGPR {u,i}find_msb
Rhys Perry [Mon, 15 Mar 2021 13:28:17 +0000 (13:28 +0000)]
aco: implement 64-bit VGPR {u,i}find_msb

This can be created by subgroupBallotFindMSB().

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4458
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9598>

3 years agoac/gpu_info: fix more non-coherent RB and GL2 combinations
Marek Olšák [Fri, 12 Mar 2021 15:26:54 +0000 (10:26 -0500)]
ac/gpu_info: fix more non-coherent RB and GL2 combinations

It ignored non-harvested chips with a non-power-of-two memory bus.

Fixes: abed921ce71 - amd: add support for Navy Flounder

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9568>

3 years agozink: fix free of ralloced pointer
Erik Faye-Lund [Wed, 17 Mar 2021 09:32:15 +0000 (10:32 +0100)]
zink: fix free of ralloced pointer

When we alloc with ralloc, we also need to free with it.

But let's take a step back here; we don't just need to use ralloc, we
also need to destroy all other screen-resources. So let's call the
destructor here instead.

Fixes: 2643f9ed284 ("zink: ralloc screen objects")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9647>

3 years agozink: fix emulation of no mipfilter
Erik Faye-Lund [Wed, 17 Mar 2021 10:36:59 +0000 (11:36 +0100)]
zink: fix emulation of no mipfilter

This approach is taken from the Vulkan spec[1], where a robust maxLod
of 0.25 is proposed instead of 0.0.

This has the effect of allowing room for both minification and
magnification filters, yet still rounding down to the right miplevel in
the end.

[1]: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSamplerCreateInfo.html#_description

Fixes: 8d46e35d16e ("zink: introduce opengl over vulkan")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9649>

3 years agoaco: Delete superfluous tess and ESGS I/O code.
Timur Kristóf [Mon, 22 Feb 2021 14:23:49 +0000 (15:23 +0100)]
aco: Delete superfluous tess and ESGS I/O code.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoradv/llvm: Delete superfluous tess and ESGS I/O code.
Timur Kristóf [Fri, 26 Feb 2021 17:49:27 +0000 (18:49 +0100)]
radv/llvm: Delete superfluous tess and ESGS I/O code.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoradv/llvm: Only store TCS outputs where they are really needed.
Timur Kristóf [Fri, 26 Feb 2021 17:49:12 +0000 (18:49 +0100)]
radv/llvm: Only store TCS outputs where they are really needed.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoradv: Use new, NIR-based I/O lowering.
Timur Kristóf [Thu, 11 Mar 2021 16:45:10 +0000 (17:45 +0100)]
radv: Use new, NIR-based I/O lowering.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoradv: Reorder some NIR optimizations in preparation for the I/O changes.
Timur Kristóf [Thu, 11 Mar 2021 16:41:55 +0000 (17:41 +0100)]
radv: Reorder some NIR optimizations in preparation for the I/O changes.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoradv: Fill some tess shader info earlier.
Timur Kristóf [Wed, 3 Mar 2021 15:29:59 +0000 (16:29 +0100)]
radv: Fill some tess shader info earlier.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoradv: Determine tcs_in_out_eq in radv_pipeline instead of the compiler.
Timur Kristóf [Thu, 18 Feb 2021 12:39:40 +0000 (13:39 +0100)]
radv: Determine tcs_in_out_eq in radv_pipeline instead of the compiler.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoradv: Calculate tess patches and LDS use outside the backend compilers.
Timur Kristóf [Wed, 17 Feb 2021 16:26:29 +0000 (17:26 +0100)]
radv: Calculate tess patches and LDS use outside the backend compilers.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoradv: Save I/O usage data to both shader infos for merged stages.
Timur Kristóf [Thu, 18 Feb 2021 10:02:30 +0000 (11:02 +0100)]
radv: Save I/O usage data to both shader infos for merged stages.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoradv: Lower IO and set driver locations earlier.
Timur Kristóf [Wed, 3 Mar 2021 15:17:55 +0000 (16:17 +0100)]
radv: Lower IO and set driver locations earlier.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoac: Add NIR passes to lower ES->GS I/O to memory accesses.
Timur Kristóf [Tue, 2 Mar 2021 14:30:58 +0000 (15:30 +0100)]
ac: Add NIR passes to lower ES->GS I/O to memory accesses.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoac: Add NIR passes to lower VS->TCS->TES I/O to memory accesses.
Timur Kristóf [Tue, 9 Feb 2021 18:19:53 +0000 (19:19 +0100)]
ac: Add NIR passes to lower VS->TCS->TES I/O to memory accesses.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoac/llvm: Emit more efficient code for load_shared.
Timur Kristóf [Mon, 22 Feb 2021 13:18:05 +0000 (14:18 +0100)]
ac/llvm: Emit more efficient code for load_shared.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoac/llvm: Add constant offset to load/store_shared.
Timur Kristóf [Mon, 22 Feb 2021 13:13:37 +0000 (14:13 +0100)]
ac/llvm: Add constant offset to load/store_shared.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoac/llvm: Make sure to always emit integer comparison for nir_op_ieq.
Timur Kristóf [Fri, 19 Feb 2021 16:30:32 +0000 (17:30 +0100)]
ac/llvm: Make sure to always emit integer comparison for nir_op_ieq.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoac/llvm: Make shared loads/stores work correctly for non-CS stages.
Timur Kristóf [Fri, 19 Feb 2021 16:30:08 +0000 (17:30 +0100)]
ac/llvm: Make shared loads/stores work correctly for non-CS stages.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoac/llvm: Implement new Geometry Shader intrinsics.
Timur Kristóf [Thu, 11 Mar 2021 15:41:38 +0000 (16:41 +0100)]
ac/llvm: Implement new Geometry Shader intrinsics.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoac/llvm: Implement the new tessellation intrinsics.
Timur Kristóf [Fri, 19 Feb 2021 16:29:00 +0000 (17:29 +0100)]
ac/llvm: Implement the new tessellation intrinsics.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoac/llvm: Implement AMD-specific buffer load/store intrinsics.
Timur Kristóf [Fri, 19 Feb 2021 16:29:25 +0000 (17:29 +0100)]
ac/llvm: Implement AMD-specific buffer load/store intrinsics.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoaco: Implement new Geometry Shader intrinsics.
Timur Kristóf [Mon, 22 Feb 2021 19:18:08 +0000 (20:18 +0100)]
aco: Implement new Geometry Shader intrinsics.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoaco: Implement the new tessellation I/O related NIR intrinsics.
Timur Kristóf [Wed, 17 Feb 2021 15:39:50 +0000 (16:39 +0100)]
aco: Implement the new tessellation I/O related NIR intrinsics.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoaco: Implement new buffer load/store intrinsics.
Timur Kristóf [Mon, 1 Feb 2021 15:25:13 +0000 (16:25 +0100)]
aco: Implement new buffer load/store intrinsics.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agonir: Add AMD-specific Geometry Shader related intrinsics.
Timur Kristóf [Mon, 22 Feb 2021 19:16:32 +0000 (20:16 +0100)]
nir: Add AMD-specific Geometry Shader related intrinsics.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agonir: Add tessellation related AMD-specific intrinsics.
Timur Kristóf [Mon, 15 Feb 2021 21:01:02 +0000 (22:01 +0100)]
nir: Add tessellation related AMD-specific intrinsics.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agonir: Add nir_opt_offsets to fold const adds into load/store offsets.
Timur Kristóf [Thu, 11 Mar 2021 11:45:31 +0000 (12:45 +0100)]
nir: Add nir_opt_offsets to fold const adds into load/store offsets.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agonir: Add AMD-specific buffer load/store intrinsics.
Timur Kristóf [Mon, 25 Jan 2021 18:12:18 +0000 (19:12 +0100)]
nir: Add AMD-specific buffer load/store intrinsics.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agonir: Add default unsigned upper bound configuration.
Timur Kristóf [Thu, 11 Mar 2021 11:43:56 +0000 (12:43 +0100)]
nir: Add default unsigned upper bound configuration.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agonir: Add unsigned upper bound for TCS load_invocation_id.
Timur Kristóf [Fri, 26 Feb 2021 15:54:04 +0000 (16:54 +0100)]
nir: Add unsigned upper bound for TCS load_invocation_id.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agonir: Shrink vectors for load_shared.
Timur Kristóf [Thu, 25 Feb 2021 09:08:18 +0000 (10:08 +0100)]
nir: Shrink vectors for load_shared.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agonir: Fix unsigned upper bound of local_invocation_index for non-CS stages.
Timur Kristóf [Fri, 26 Feb 2021 13:56:06 +0000 (14:56 +0100)]
nir: Fix unsigned upper bound of local_invocation_index for non-CS stages.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agonir: Add a few more algebraic optimizations to help address calculation.
Timur Kristóf [Fri, 26 Feb 2021 18:05:25 +0000 (19:05 +0100)]
nir: Add a few more algebraic optimizations to help address calculation.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agonir: Add nir_builder helper for I/O address offset calculations.
Timur Kristóf [Tue, 2 Mar 2021 15:00:53 +0000 (16:00 +0100)]
nir: Add nir_builder helper for I/O address offset calculations.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agonir: Add new nir_builder helpers for iadd with no_unsigned_wrap.
Timur Kristóf [Tue, 16 Feb 2021 17:18:52 +0000 (18:18 +0100)]
nir: Add new nir_builder helpers for iadd with no_unsigned_wrap.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agonir: Don't update base in vectorize_loads()
Rhys Perry [Thu, 4 Mar 2021 18:35:08 +0000 (18:35 +0000)]
nir: Don't update base in vectorize_loads()

The offset is already updated with consideration to the base above under
"/* update the offset */".

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>

3 years agoaco/tests: add test for waNsaCannotFollowWritelane
Rhys Perry [Wed, 10 Mar 2021 17:51:31 +0000 (17:51 +0000)]
aco/tests: add test for waNsaCannotFollowWritelane

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9187>

3 years agoaco: fix NSA following writelane
Rhys Perry [Wed, 10 Mar 2021 17:42:52 +0000 (17:42 +0000)]
aco: fix NSA following writelane

No fossil-db changes on GFX10.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: c353895c922 ("aco: use non-sequential addressing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9187>

3 years agoaco/tests: add test for NSAToVMEMBug
Rhys Perry [Tue, 23 Feb 2021 09:54:04 +0000 (09:54 +0000)]
aco/tests: add test for NSAToVMEMBug

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9187>

3 years agoaco: fix NSA MIMG followed by MUBUF/MTBUF
Rhys Perry [Mon, 22 Feb 2021 11:12:15 +0000 (11:12 +0000)]
aco: fix NSA MIMG followed by MUBUF/MTBUF

No fossil-db changes on GFX10.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: c353895c922 ("aco: use non-sequential addressing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9187>

3 years agofreedreno/isa: assert if field's range is out of bitset's range
Danylo Piliaiev [Tue, 16 Mar 2021 19:04:02 +0000 (21:04 +0200)]
freedreno/isa: assert if field's range is out of bitset's range

Also, update outdated comment along the way.

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

3 years agoir3: match mova1 mnemonic when writing to A1
Danylo Piliaiev [Tue, 16 Mar 2021 15:23:45 +0000 (17:23 +0200)]
ir3: match mova1 mnemonic when writing to A1

For MOV to A1 blob uses "mova1" mnemonic, which is mov.u16u16;
change s16 to u16 when creating MOV to A1 in order to match the blob.

Before, couldn't be parsed back:
 mov.s16s16 ha0.y, 0

After, could be parsed back and matches blob behaviour:
 mova1 a1.x, 0

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

3 years agoir3/isa,parser: fix encoding and parsing of bindless s2en SAM
Danylo Piliaiev [Tue, 16 Mar 2021 15:13:38 +0000 (17:13 +0200)]
ir3/isa,parser: fix encoding and parsing of bindless s2en SAM

Before, decoding showed that there is an error:
 sam.base0 (f32)(xyzw)r0.x, r0.z, a1.x   ; no field 'HAS_SAMP',
  WARNING: unexpected bits[0:7] in #cat5-samp-s2en-bindless-a1: 0x1 vs 0x0

After:
 sam.base0 (f32)(xyzw)r0.x, r0.z, s#1, a1.x

Fixes textures on the ground in TauCeti Vulkan Technology Benchmark

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

3 years agoci/vc4/v3d: run piglit testsuite against Xorg
Juan A. Suarez Romero [Tue, 9 Mar 2021 15:08:34 +0000 (16:08 +0100)]
ci/vc4/v3d: run piglit testsuite against Xorg

This increases the coverage adding tests that require an X server to
run.

Update also the expected results, and skip some flake tests.

Reviewed-by: Andres Gomez <agomez@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9562>

3 years agoci/v3dv: add flaky test in the skip list
Juan A. Suarez Romero [Mon, 15 Mar 2021 13:15:22 +0000 (14:15 +0100)]
ci/v3dv: add flaky test in the skip list

Reviewed-by: Andres Gomez <agomez@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9562>

3 years agoci/armXX: add libgl1-mesa-dev dependency
Juan A. Suarez Romero [Thu, 11 Mar 2021 08:49:51 +0000 (09:49 +0100)]
ci/armXX: add libgl1-mesa-dev dependency

Waffle building requires libgl1-mesa-dev to add support for GLX. This
package is pulled automatically in arm64 container as a suggested
package, but no in armhf. Which means we end up having support for GLX
in waffle in arm64 but not in armhf.

Thus let's install explicitly this package to have support in both
cases.

Reviewed-by: Andres Gomez <agomez@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9562>

3 years agovc4: destroy renderonly object if present
Juan A. Suarez Romero [Fri, 12 Mar 2021 14:53:47 +0000 (15:53 +0100)]
vc4: destroy renderonly object if present

When destroying the VC4 screen, check if renderonly exists before
freeing it.

This fixes for instance a segmentation fault caused when invoking
wflinfo.

Fixes: 187218395d7 ("renderonly: remove layering violations")
Reviewed-by: Andres Gomez <agomez@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9562>

3 years agov3dv: avoid some maybe-uninitialized warnings
Alejandro Piñeiro [Tue, 16 Mar 2021 23:07:12 +0000 (23:07 +0000)]
v3dv: avoid some maybe-uninitialized warnings

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

3 years agov3dv/descriptor_set: don't free individual set if not allowed
Alejandro Piñeiro [Tue, 16 Mar 2021 22:07:44 +0000 (22:07 +0000)]
v3dv/descriptor_set: don't free individual set if not allowed

If we have a host_memory_base pointer it means that we are handling
the pool memory as a whole, so each set is a sub-slice of the memory
pool. In this case we can't just free the individual set. In other
words, VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT is not set.

Note tha at that point we were able to sub-allocate an set, and we are
failing to sub-allocate the pool bo for the descripto bo. So
technically we could try to return that set to the pool (so undo the
change on host_memory_ptr before), that I assume was my intention when
(wrongly) calling vk_free there. But in practice, at that point we are
already on a out of descriptor pool situation, so in the end it
doesn't even matter.

This fixes a double free crash with the UE4 VehicleGame demo.

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

3 years agobroadcom/compiler: use nir_lower_wrmasks to simplify TMU general stores
Iago Toral Quiroga [Tue, 16 Mar 2021 08:51:45 +0000 (09:51 +0100)]
broadcom/compiler: use nir_lower_wrmasks to simplify TMU general stores

This pass splits writemaks with non-consecutive bits into multiple
store operations ensuring that each store only has consecutive
writemask bits set.

We can use this to simplify writemask handling in our backend removing
a loop solely intended to handle this case.

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