platform/upstream/mesa.git
2 years agocrocus: take a reference to memobj bo in crocus_resource_from_memobj
Tapani Pälli [Wed, 28 Jul 2021 07:21:52 +0000 (10:21 +0300)]
crocus: take a reference to memobj bo in crocus_resource_from_memobj

This is the same fix as commit 2d87ea31665 for iris driver.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10609>

2 years agoi915g: Reapply clang-format.
Emma Anholt [Fri, 6 Aug 2021 18:30:19 +0000 (11:30 -0700)]
i915g: Reapply clang-format.

Missed this in 2008ec8a432c ("i915g: Fix writemasking of SEQ/SNE/SSG.")

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

2 years agoi915g: Use the devmaster quadratic approximation for sin/cos.
Emma Anholt [Thu, 5 Aug 2021 22:41:04 +0000 (15:41 -0700)]
i915g: Use the devmaster quadratic approximation for sin/cos.

11 instructions, but now processes up to 4 channels at once (since TGSI
splits to scalar for these math ops) while being higher accuracy.
Previously we used 6 instructions per channel, but it didn't look like a
sine wave.  i915c managed it in 9 instructions per scalar channel, thanks
to avoiding an extra mov we do for the fabs (should be fixable), and
avoiding an extra MUL (maybe just needs reassociation of our immediates?).
But, the ALU count win from doing 4 channels at once will be way more
important for making sure that programs compile than those 2 ALU ops, plus
now we do it in NIR instead of assembly.

Closes: #4981
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12250>

2 years agofreedreno/regs: add bit to control continuous clock with 7nm PHYs
Dmitry Baryshkov [Mon, 7 Jun 2021 13:14:39 +0000 (16:14 +0300)]
freedreno/regs: add bit to control continuous clock with 7nm PHYs

7nm PHYs need another special bit set in DSI_LANE_CTRL to enable
continuous DSI clock. Document this bit.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11219>

2 years agodocs: make most important part of bugs.rst easier to find
Filip Gawin [Thu, 29 Jul 2021 10:29:14 +0000 (10:29 +0000)]
docs: make most important part of bugs.rst easier to find

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

2 years agopps: Restore documentation
Antonio Caggiano [Tue, 13 Jul 2021 12:13:26 +0000 (14:13 +0200)]
pps: Restore documentation

Restore part of the perfetto documentation deleted by mistake.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11846>

2 years agofrontends/va/postproc: Keep track of deinterlacing method being used
Thong Thai [Fri, 6 Aug 2021 18:42:44 +0000 (14:42 -0400)]
frontends/va/postproc: Keep track of deinterlacing method being used

When transcoding a video, the context used by decode/postproc process
might be different from that of the encoder, but we encoder needs to
know if deinterlacing was used.

Fixes: c5088b49729 ("gallium: Fix VAAPI postproc blit")
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12251>

2 years agogallium/util: add half texel offset param to util_compute_blit
Thong Thai [Fri, 6 Aug 2021 14:42:00 +0000 (10:42 -0400)]
gallium/util: add half texel offset param to util_compute_blit

Fixes an issue where the video image is blurry after blitting.

Fixes: c5088b49729 ("gallium: Fix VAAPI postproc blit")
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12251>

2 years agogallium/auxiliary/vl: Add additional deinterlace enum and tracking
Thong Thai [Fri, 6 Aug 2021 18:32:40 +0000 (14:32 -0400)]
gallium/auxiliary/vl: Add additional deinterlace enum and tracking

Add additional deinterlace enums and a deinterlace field to the
vl_compositor struct, so we can keep track of which deinterlacing
algorithm is currently being used, if any.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12251>

2 years agoutil/fossilize_db: Add extra flock mutex.
Bas Nieuwenhuizen [Sat, 7 Aug 2021 21:31:00 +0000 (23:31 +0200)]
util/fossilize_db: Add extra flock mutex.

The flock is per-fd, not per thread, and we do it outside of the main mutex. This was
done to avoid having to wait in the mutex, but we can get a case where one ends up running
the body with the flock unlocked.

Fix this by adding a mutex that doesn't need to be locked for reads.

Fixes: 4f0f8133a35 "util/fossilize_db: Do not lock the fossilize db permanently."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12266>

2 years agoutil/fossilize_db: Unlock the cache file if the entry already exists.
Bas Nieuwenhuizen [Sat, 7 Aug 2021 21:23:56 +0000 (23:23 +0200)]
util/fossilize_db: Unlock the cache file if the entry already exists.

Fixes: 4f0f8133a35 "util/fossilize_db: Do not lock the fossilize db permanently."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12266>

2 years agoutil/fossilize_db: Use uint64_t for file size.
Bas Nieuwenhuizen [Sat, 7 Aug 2021 21:20:13 +0000 (23:20 +0200)]
util/fossilize_db: Use uint64_t for file size.

For those 32-bit systems with 4G of cache.

Fixes: 2ec1bff0f3a "util/fossilize_db: Split out reading the index."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12266>

2 years agoutil/fossilize_db: Only allocate entries after full read.
Bas Nieuwenhuizen [Wed, 4 Aug 2021 23:43:01 +0000 (01:43 +0200)]
util/fossilize_db: Only allocate entries after full read.

Should void leaking entries on read failure.

Fixes: 2ec1bff0f3a "util/fossilize_db: Split out reading the index."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12204>

2 years agoutil/fossilize_db: Be conservative about header length check for locking.
Bas Nieuwenhuizen [Wed, 4 Aug 2021 23:30:25 +0000 (01:30 +0200)]
util/fossilize_db: Be conservative about header length check for locking.

Don't anticipate seeing any partial written headers but just in case we
should probably wait on the lock to make sure whatever header was being
written is finished being written.

Fixes: 4f0f8133a35 "util/fossilize_db: Do not lock the fossilize db permanently."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12204>

2 years agoutil/fossilize_db: Flush files after header write.
Bas Nieuwenhuizen [Wed, 4 Aug 2021 23:29:04 +0000 (01:29 +0200)]
util/fossilize_db: Flush files after header write.

We should probably flush before we unlock the file again.

Fixes: 4f0f8133a35 "util/fossilize_db: Do not lock the fossilize db permanently."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12204>

2 years agoutil/fossilize_db: Reset file position to parsed_offset on cache_offset read failure.
Bas Nieuwenhuizen [Thu, 5 Aug 2021 01:03:48 +0000 (03:03 +0200)]
util/fossilize_db: Reset file position to parsed_offset on cache_offset read failure.

Otherwise we might restart reading from the middle of the entry.

Fixes: 2ec1bff0f3a "util/fossilize_db: Split out reading the index."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12204>

2 years agoutil/fossilize_db: Update parsed_offset correctly.
Bas Nieuwenhuizen [Wed, 4 Aug 2021 23:26:15 +0000 (01:26 +0200)]
util/fossilize_db: Update parsed_offset correctly.

If things went perfectly parsed_offset was never updated for the
final entry and we'd seek_set to the start of the last entry. Is
fun when appending to the file next.

Fixes: 2ec1bff0f3a "util/fossilize_db: Split out reading the index."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12204>

2 years agospirv_to_dxil: Fix missing-prototypes build error.
Vinson Lee [Sat, 7 Aug 2021 05:55:58 +0000 (22:55 -0700)]
spirv_to_dxil: Fix missing-prototypes build error.

../src/microsoft/spirv_to_dxil/spirv_to_dxil.c: At top level:
../src/microsoft/spirv_to_dxil/spirv_to_dxil.c:200:1: error: no previous prototype for ‘spirv_to_dxil_get_version’ [-Werror=missing-prototypes]
  200 | spirv_to_dxil_get_version()
      | ^~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 92b0cf8e773 ("spirv_to_dxil: expose version number")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12264>

2 years agoci/freedreno: Add jobs to manually do a full VK on freedreno.
Emma Anholt [Fri, 30 Jul 2021 22:21:20 +0000 (15:21 -0700)]
ci/freedreno: Add jobs to manually do a full VK on freedreno.

Building toward scheduled nightly runs, add a button to do a full VK run
when you think you're changing test expectations.

Be gentle with the play button on this, 4 people doing this at once
would block marge for everyone else for a while.

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

2 years agoci/freedreno: Skip the slow dEQP-VK.ubo.random.all_shared_buffer.48 in CI.
Emma Anholt [Fri, 30 Jul 2021 19:33:13 +0000 (12:33 -0700)]
ci/freedreno: Skip the slow dEQP-VK.ubo.random.all_shared_buffer.48 in CI.

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

2 years agoci/freedreno: Clean up and fill out the tess timeout annotations.
Emma Anholt [Fri, 30 Jul 2021 19:35:27 +0000 (12:35 -0700)]
ci/freedreno: Clean up and fill out the tess timeout annotations.

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

2 years agoci/freedreno: Generalize the spirv_ids_abuse skips.
Emma Anholt [Fri, 30 Jul 2021 19:33:13 +0000 (12:33 -0700)]
ci/freedreno: Generalize the spirv_ids_abuse skips.

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

2 years agoci/freedreno: Organize, fill out, and document our VK xfails.
Emma Anholt [Fri, 30 Jul 2021 20:10:52 +0000 (13:10 -0700)]
ci/freedreno: Organize, fill out, and document our VK xfails.

This is the full set of xfails for 1.2.7.0 currently.

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

2 years agovenus: free queues after vkDestroyDevice is emitted
Chia-I Wu [Fri, 6 Aug 2021 18:50:41 +0000 (11:50 -0700)]
venus: free queues after vkDestroyDevice is emitted

Otherwise, another thread might reuse their object ids for other
objects.  For example,

  T1: free queue with object id X
  T2: reuse id X
  T2: emit vkCreateFoo with id X
  T1: emit vkDestroyDevice

virglrenderer happily accepts that which leads to double frees of the
queue: once when X is updated to point to another object and once when
vkDestroyDevice is executed.  virglrenderer should be fixed to catch
such invalid object id reuse as well.

Fixes
dEQP-VK.api.object_management.multithreaded_shared_resources.device_group.

Fixes: ddd75330559 ("venus: initial support for queue/fence/semaphore")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12252>

2 years agofreedreno: Device matching based on chip_id
Rob Clark [Sun, 1 Aug 2021 17:37:06 +0000 (10:37 -0700)]
freedreno: Device matching based on chip_id

Add support for device matching based on chip_id instead of gpu_id, to
handle newer GPUs

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

2 years agofreedreno: Make chip_id 64b
Rob Clark [Thu, 5 Aug 2021 22:36:05 +0000 (15:36 -0700)]
freedreno: Make chip_id 64b

In the UABI it is already 64b, but userspace ignored the upper 32b.  But
it looks like we will start needing the upper 32b.  So before we start
actually *using* chip_id, lets make sure everything is treating it as
64b.

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

2 years agofreedreno/all: Introduce fd_dev_id
Rob Clark [Sat, 31 Jul 2021 20:46:50 +0000 (13:46 -0700)]
freedreno/all: Introduce fd_dev_id

Move away from using gpu_id as the primary means to identify which
adreno we are running on, as future GPUs (starting with 7c3) stop
providing a gpu_id as a new naming scheme is introduced.

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

2 years agofreedreno/ir3/lower_io_offsets: Drop gpu_id param
Rob Clark [Sat, 31 Jul 2021 19:35:57 +0000 (12:35 -0700)]
freedreno/ir3/lower_io_offsets: Drop gpu_id param

It was unused.

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

2 years agofreedreno/ir3: Reduce use of compiler->gpu_id
Rob Clark [Sat, 31 Jul 2021 19:32:28 +0000 (12:32 -0700)]
freedreno/ir3: Reduce use of compiler->gpu_id

For the same reason as previous patch.  Mostly we only care about the
generation, so convert things to use compiler->gen instead.

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

2 years agofreedreno: Reduce use of screen->gpu_id
Rob Clark [Sat, 31 Jul 2021 18:27:04 +0000 (11:27 -0700)]
freedreno: Reduce use of screen->gpu_id

Newer GPU's are moving away from using gpu_id, including the code
landing upstream for "7c Gen 3".  But most of the places in the gallium
driver where we were looking at gpu_id, we only cared about the major
generation.  So convert those to use screen->gen instead.

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

2 years agofreedreno: Drop device_id
Rob Clark [Sat, 31 Jul 2021 18:12:10 +0000 (11:12 -0700)]
freedreno: Drop device_id

This wasn't actually used for anything.

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

2 years agofreedreno: Move generated device table to .h
Rob Clark [Sat, 31 Jul 2021 16:54:35 +0000 (09:54 -0700)]
freedreno: Move generated device table to .h

We only need it in a single .c file, so we can make the device table
static.  Also rename the struct for device table entries, as I want
to re-use the name 'fd_dev_id'

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

2 years agonine: enable tc
Mike Blumenkrantz [Tue, 27 Jul 2021 18:22:45 +0000 (14:22 -0400)]
nine: enable tc

Acked-by: <Axel Davy davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11866>

2 years agonine: track bound sampler count to optimize unbinds
Mike Blumenkrantz [Tue, 13 Jul 2021 23:56:42 +0000 (19:56 -0400)]
nine: track bound sampler count to optimize unbinds

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

2 years agonine: update bound sampler mask directly during texture updates
Mike Blumenkrantz [Fri, 6 Aug 2021 15:48:45 +0000 (11:48 -0400)]
nine: update bound sampler mask directly during texture updates

Reviewed-by: <Axel Davy davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11865>

2 years agonine: split enabled/dummy texture binds into separate iterators
Mike Blumenkrantz [Fri, 6 Aug 2021 15:00:20 +0000 (11:00 -0400)]
nine: split enabled/dummy texture binds into separate iterators

this removes a conditional from the loops

Reviewed-by: <Axel Davy davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11865>

2 years agonine: optimize texture binds a bit
Mike Blumenkrantz [Tue, 13 Jul 2021 20:38:12 +0000 (16:38 -0400)]
nine: optimize texture binds a bit

this can just iterate over the mask of active textures instead of always
iterating over and rebinding all textures

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

2 years agotu: Raise maxDescriptorSetUpdateAfterBindUniformBuffersDynamic to 16
Matt Turner [Tue, 3 Aug 2021 21:49:34 +0000 (14:49 -0700)]
tu: Raise maxDescriptorSetUpdateAfterBindUniformBuffersDynamic to 16

... and reduce maxDescriptorSetUpdateAfterBindStorageBuffersDynamic from 12 to
8.

MAX_DYNAMIC_BUFFERS is MAX_DYNAMIC_UNIFORM_BUFFERS +
MAX_DYNAMIC_STORAGE_BUFFERS. We set

maxDescriptorSetUniformBuffersDynamic = MAX_DYNAMIC_UNIFORM_BUFFERS
maxDescriptorSetStorageBuffersDynamic = MAX_DYNAMIC_STORAGE_BUFFERS
maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = MAX_DYNAMIC_BUFFERS / 2
maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = MAX_DYNAMIC_BUFFERS / 2

The CTS test checks that

maxDescriptorSetUpdateAfterBindUniformBuffersDynamic
- is at least 8; and
- is at least maxDescriptorSetUniformBuffersDynamic
maxDescriptorSetUpdateAfterBindStorageBuffersDynamic
- is at least 4; and
- and is at least maxDescriptorSetStorageBuffersDynamic

Prior to this patch maxDescriptorSetUpdateAfterBindUniformBuffersDynamic was 12
but maxDescriptorSetUniformBuffersDynamic was 16, thus causing the CTS failure
in
  dEQP-VK.api.info.vulkan1p2_limits_validation.ext_descriptor_indexing

By raising maxDescriptorSetUpdateAfterBindUniformBuffersDynamic to the same
value as maxDescriptorSetUniformBuffersDynamic, we bring the limits into the
appropriate ranges. We do the same thing for
maxDescriptorSetUpdateAfterBindStorageBuffersDynamic by assigning it the same
value as maxDescriptorSetStorageBuffersDynamic.

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

2 years agomesa: Add EXT_texture_mirror_clamp_to_edge to extension table
Gert Wollny [Mon, 19 Apr 2021 12:22:17 +0000 (14:22 +0200)]
mesa: Add EXT_texture_mirror_clamp_to_edge to extension table

This is the OpenGL ES version of ARB_texture_mirror_clamp_to_edge.

v2: fix TexParameter validation (Erik)
v3: Use modernized extension test (Erik)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10325>

2 years agomesa: Add support for EXT_clear_texture
Gert Wollny [Mon, 19 Apr 2021 11:59:30 +0000 (13:59 +0200)]
mesa: Add support for EXT_clear_texture

This extension implements a subset of ARB_clear_texture (i.e.
only the features that are not available in OpenGL ES have been
dropped).

v2: Move call declarations from function to offsets  (Emil)

v3: Update llvmpipe and softpipe expectations

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10325>

2 years agolavapipe: remove duplicate xfail with typo
Erik Faye-Lund [Fri, 6 Aug 2021 08:47:09 +0000 (10:47 +0200)]
lavapipe: remove duplicate xfail with typo

Seems there's a rogue "time" in here, causing it to look like a new
failure. But if we remove that and resort the list, we'll see that this
failure was already listed.

Fixes: dfccbdff981 ("ci: update to VK-GL-CTS 1.2.7.0")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12233>

2 years agonine: set CSO_NO_USER_VERTEX_BUFFERS for main cso context
Mike Blumenkrantz [Wed, 14 Jul 2021 17:29:14 +0000 (13:29 -0400)]
nine: set CSO_NO_USER_VERTEX_BUFFERS for main cso context

this skips vbuf for radeonsi and saves some cpu

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

2 years agonine: don't memset sampler state during conversion
Mike Blumenkrantz [Wed, 14 Jul 2021 17:35:47 +0000 (13:35 -0400)]
nine: don't memset sampler state during conversion

this ends up having pretty huge overhead

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

2 years agoir3: Document RA-related register flags better
Connor Abbott [Thu, 5 Aug 2021 14:54:17 +0000 (16:54 +0200)]
ir3: Document RA-related register flags better

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

2 years agogbm: add GBM_FORMAT_R16
Simon Zeni [Wed, 28 Jul 2021 13:40:44 +0000 (09:40 -0400)]
gbm: add GBM_FORMAT_R16

Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12101>

2 years agoradv: Write RSRC2_GS for NGGC when pipeline is dirty but not emitted.
Timur Kristóf [Fri, 6 Aug 2021 09:07:54 +0000 (11:07 +0200)]
radv: Write RSRC2_GS for NGGC when pipeline is dirty but not emitted.

The radv_emit_ngg_culling_state function won't write the
SPI_SHADER_PGM_RSRC2_GS register when it knows in advance that
radv_emit_graphics_pipeline will overwrite it anyway.

However, there is an unhandled case:

radv_emit_graphics_pipeline will not emit anything (including this
register) when the pipeline is already emitted. Hence, improve
the check in radv_emit_ngg_culling_state to consider this.

Fixes: 9a95f5487f5ab83fa44bea12afa30cf1a25fc9db
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/12237>

2 years agost/pbo: add a fast pbo download code-path
Pierre-Eric Pelloux-Prayer [Fri, 23 Jul 2021 16:42:28 +0000 (18:42 +0200)]
st/pbo: add a fast pbo download code-path

Based on the glReadPixels code.

pbobench piglit benchmark reports identical/similar results on about 50% of
the test cases. The other test cases get a 2x-50x speedup.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5084
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1030
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12096>

2 years agost/pbo: set nir_tex_instr::is_array field
Pierre-Eric Pelloux-Prayer [Fri, 23 Jul 2021 16:20:47 +0000 (18:20 +0200)]
st/pbo: set nir_tex_instr::is_array field

Otherwise the layer argument won't be used.

Fixes: a01ad311 ("st/mesa: Add NIR versions of the PBO upload/download shaders. ")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12096>

2 years agost/pbo: only use x coord when reading a PIPE_TEXTURE_1D
Pierre-Eric Pelloux-Prayer [Fri, 23 Jul 2021 16:20:26 +0000 (18:20 +0200)]
st/pbo: only use x coord when reading a PIPE_TEXTURE_1D

This fixes the following NIR validation error in the
st/pbo download FS:

vec2 32 ssa_14 = mov ssa_4.xy
vec2 32 ssa_15 = f2i32 ssa_14
vec1 32 ssa_16 = deref_var &tex (uniform sampler1D)
vec4 32 ssa_17 = (float32)txf ssa_16 (texture_deref), ssa_16 (sampler_deref), ssa_15 (coord)
error: nir_src_num_components(instr->src[i].src) == instr->coord_components (../src/compiler/nir/nir_validate.c:839)

With this change, the FS becomes:

vec4 32 ssa_2 = intrinsic load_frag_coord () ()
vec1 32 ssa_3 = f2i32 ssa_2.x
[...]
vec1 32 ssa_9 = deref_var &tex (uniform sampler1D)
vec4 32 ssa_10 = (float32)txf ssa_9 (texture_deref), ssa_9 (sampler_deref), ssa_3 (coord), ssa_0 (lod)

Fixes: a01ad311 ("st/mesa: Add NIR versions of the PBO upload/download shaders. ")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12096>

2 years agogallivm: handle fisfinite/fisnormal
Dave Airlie [Thu, 5 Aug 2021 21:22:59 +0000 (07:22 +1000)]
gallivm: handle fisfinite/fisnormal

lower one, do the other.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12207>

2 years agonir: add fisnormal lowering
Dave Airlie [Thu, 5 Aug 2021 21:19:27 +0000 (07:19 +1000)]
nir: add fisnormal lowering

just lower the 32-bit version for now.

Thanks to alyssa for this suggested lowering.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12207>

2 years agonir: add 32-bit bool of fisfinite
Dave Airlie [Mon, 2 Aug 2021 10:38:27 +0000 (20:38 +1000)]
nir: add 32-bit bool of fisfinite

Add the bool lowering as well.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12207>

2 years agovtn: add support for atomic flag test/set/clear
Dave Airlie [Tue, 24 Nov 2020 20:34:42 +0000 (06:34 +1000)]
vtn: add support for atomic flag test/set/clear

This adds support for SpvOpAtomicFlag operations.

This is just a simple implementation that lowers
Clear to Store 0
and
TestAndSet to Cas (0, -1)

There are likely platforms/hw that will want to
lower this all the way through NIR and into their
backend, but this will do for now.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12229>

2 years agonir/libclc: handle null callee name when lowering
Dave Airlie [Thu, 5 Aug 2021 20:02:48 +0000 (06:02 +1000)]
nir/libclc: handle null callee name when lowering

fixes a crash in the CTS spirv_new get_program_il test

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12230>

2 years agomicrosoft/compiler: Add support for local_invocation_index
Enrico Galli [Thu, 5 Aug 2021 20:42:05 +0000 (13:42 -0700)]
microsoft/compiler: Add support for local_invocation_index

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12228>

2 years agomicrosoft/spirv_to_dxil: Enable support for shared memory
Enrico Galli [Thu, 5 Aug 2021 20:39:39 +0000 (13:39 -0700)]
microsoft/spirv_to_dxil: Enable support for shared memory

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12228>

2 years agoci/a5xx: Skip some piglit stress tests that destabilize CI.
Emma Anholt [Wed, 4 Aug 2021 23:14:32 +0000 (16:14 -0700)]
ci/a5xx: Skip some piglit stress tests that destabilize CI.

Previously, most piglit GL manual runs on a5xx would get a bunch of
failures in random tests around the same time in the run, with a
characteristic OUT_OF_MEMORY in the logs.  With this, that instability
seems to have gone away.

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

2 years agospirv_to_dxil: expose version number
Michael Tang [Thu, 5 Aug 2021 19:55:19 +0000 (12:55 -0700)]
spirv_to_dxil: expose version number

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12227>

2 years agoanv: don't try to access Android swapchains
Lionel Landwerlin [Thu, 5 Aug 2021 15:10:15 +0000 (18:10 +0300)]
anv: don't try to access Android swapchains

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5180
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12217>

2 years agolavapipe: remove stale xfails
Erik Faye-Lund [Thu, 5 Aug 2021 16:14:00 +0000 (18:14 +0200)]
lavapipe: remove stale xfails

These were fixed already in !10219, but a bad conflict resolution added
them back again. And because the CI doesn't actually end up running
these tests, this went unnoticed.

Fixes: dfccbdff981 ("ci: update to VK-GL-CTS 1.2.7.0")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12220>

2 years agogallivm: use lp_build_log2_safe for pow
Erik Faye-Lund [Tue, 27 Jul 2021 12:28:44 +0000 (14:28 +0200)]
gallivm: use lp_build_log2_safe for pow

lp_build_log2 isn't robust enough to handle special cases for pow, so
let's use lp_build_log2_safe instead.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11800>

2 years agotu, freedreno/a6xx: Fix setting PC_XS_OUT_CNTL::PRIMITVE_ID
Connor Abbott [Mon, 2 Aug 2021 09:56:15 +0000 (11:56 +0200)]
tu, freedreno/a6xx: Fix setting PC_XS_OUT_CNTL::PRIMITVE_ID

This is supposed to be set when that stage needs the PrimID sysval
preloaded, except for the VS which doesn't have this bit and instead
infers it from the HS or GS bit (depending on whether tess/GS is
enabled). Therefore for HS, GS, and DS we should set it whenever the
corresponding sysval is there. This includes adding a missing
PC_HS_OUT_CNTL, which I confirmed is set when the HS reads PrimID from
the VS. Note that the DS sysval is currently always enabled whenever
there's a GS, if we were to fix that then we should also change the
logic here.

This doesn't fix anything that I know of, but aligns us more with what
the blob does.

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

2 years agotu, freedreno/a6xx, ir3: Rewrite tess PrimID handling
Connor Abbott [Mon, 2 Aug 2021 09:55:15 +0000 (11:55 +0200)]
tu, freedreno/a6xx, ir3: Rewrite tess PrimID handling

The previous handling conflated RelPatchID and PrimID, which would
result in incorrect gl_PrimitiveID when doing draw splitting and didn't
work with PrimID passthrough which fills the VPC slot with the "correct"
PrimID value from the tess factor BO which we left 0. Replace PrimID in
the tess lowering pass with a new RelPatchID sysval, and relace PrimID
with RelPatchID in the VS input code in turnip/freedreno at the same
time so that there is no net change in the tess lowering code. However,
now we have to add new mechanisms for getting the user-level PrimID:

- In the TCS it comes from the VS, just like gl_PrimitiveIDIn in the GS.
  This means we have to add another register to our VS->TCS ABI. I
  decided to put PrimID in r0.z, after the TCS header and RelPatchID,
  because it might not be read in the TCS.
- If any stage after the TCS uses PrimID, the TCS stores it in the first
  dword of the tess factor BO, and it is read by the fixed-function
  tessellator and accessed in the TES via the newly-uncovered DSPRIMID
  field. If we have tess and GS, the TES passes this value through to
  the GS in the same way as the VS does. PrimID passthrough for reading
  it in the FS when there's tess but no GS also "just works" once we
  start storing it in the TCS. In particular this fixes
  dEQP-VK.pipeline.misc.primitive_id_from_tess which tests exactly that.

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

2 years agofreedreno: Rename and document tess primid-related sysvals
Connor Abbott [Thu, 29 Jul 2021 15:40:17 +0000 (17:40 +0200)]
freedreno: Rename and document tess primid-related sysvals

DSPATCHID and HSPATCHID, which we mapped gl_PrimitiveID to, are actually
relative to the current subdraw. Subdraws aren't supported yet by turnip
but they are by freedreno for indirect draws.

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

2 years agotu: disable gmem in primary cmdbuffer if secondary has it disabled
Danylo Piliaiev [Thu, 5 Aug 2021 15:45:40 +0000 (18:45 +0300)]
tu: disable gmem in primary cmdbuffer if secondary has it disabled

If secondary command buffer is emitted within a subpass it may have
barriers which forces us to disable gmem for current renderpass.

Fixes: 20547a110edb7913fc1176b9605498a58e691cb5 "tu: delay decision of forcing sysmem due to subpass self-dependencies"

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

2 years agoci: Drop "success" job
Michel Dänzer [Wed, 4 Aug 2021 15:41:46 +0000 (17:41 +0200)]
ci: Drop "success" job

It was added to make sure every pipeline for a merge request has at
least one job which passes (otherwise it's not possible to merge the
MR). Now the "sanity" job always exists in such pipelines, so this
isn't needed anymore.

Fixes: 4c41d1900e58 "ci: Add jobs running ci-fairy checks"
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12198>

2 years agoaco: calculate correct register demand for branch instructions
Rhys Perry [Mon, 26 Jul 2021 16:55:48 +0000 (17:55 +0100)]
aco: calculate correct register demand for branch instructions

Since copies for the successor's linear phis are inserted before the
branch, we should consider the definitions and operands of the successor's
linear phis.

Fixes a Detroit: Become Human spilling failure with GCM+GVN.

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

2 years agoci/v3dv: update expected results
Juan A. Suarez Romero [Mon, 2 Aug 2021 12:00:55 +0000 (14:00 +0200)]
ci/v3dv: update expected results

v1:
 - Include CTS fix comment (Juan)

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12168>

2 years agomicrosoft/compiler: harmonize num_psv_inputs with outputs
Erik Faye-Lund [Wed, 4 Aug 2021 12:13:15 +0000 (14:13 +0200)]
microsoft/compiler: harmonize num_psv_inputs with outputs

This doesn't seems to make a practical difference, but it seems better
to do it the same way as we do for outputs, as well as what DXC does.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12197>

2 years agomicrosoft/compiler: fix psv-output calculation
Erik Faye-Lund [Wed, 4 Aug 2021 11:49:35 +0000 (13:49 +0200)]
microsoft/compiler: fix psv-output calculation

Rather surprisingly, the value stored in the NumVectors field of the
DXIL PSV header isn't the number of vectors, but rather the *maximum*
vector used.

This makes a difference when we're not writing to the first element of
an array, where we would previously generate a validation error.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12197>

2 years agofreedreno/ci: Add a manual job for tracking performance
Antonio Caggiano [Wed, 28 Apr 2021 14:16:42 +0000 (16:16 +0200)]
freedreno/ci: Add a manual job for tracking performance

Use Piglit's replay profile to measure and store the time that frames
take to render in the GPU.

This job won't run automatically in regular pipelines, but will be
triggered automatically by a script for every successful pre-merge
pipeline.

This is because we want to generate performance data for every relevant
commit merged in main, but we don't want to keep a device busy during
the pre-merge run.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12185>

2 years agoclover/llvm: turn off optional CL 3 features.
Dave Airlie [Wed, 7 Jul 2021 04:05:06 +0000 (14:05 +1000)]
clover/llvm: turn off optional CL 3 features.

We don't support these with clover yet, so turn them off to get
clang back to the older llvm 12 behaviour.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11752>

2 years agoac/surface: implement CmaskAddrFromCoord in NIR on GFX10+
Samuel Pitoiset [Tue, 3 Aug 2021 11:35:25 +0000 (13:35 +0200)]
ac/surface: implement CmaskAddrFromCoord in NIR on GFX10+

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

2 years agoac/surface: add tests for CmaskAddrFromCoord on GFX10+
Samuel Pitoiset [Tue, 3 Aug 2021 11:29:52 +0000 (13:29 +0200)]
ac/surface: add tests for CmaskAddrFromCoord on GFX10+

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

2 years agoamd/addrlib: expose CMASK address equations to drivers on GFX10+
Samuel Pitoiset [Tue, 3 Aug 2021 11:26:33 +0000 (13:26 +0200)]
amd/addrlib: expose CMASK address equations to drivers on GFX10+

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

2 years agoci: Update canvas_text trace
Tomeu Vizoso [Wed, 4 Aug 2021 06:31:51 +0000 (08:31 +0200)]
ci: Update canvas_text trace

The previous one had all rendering and setup in a single frame, so
repeatedly replaying it for performance tracking was reaching OOM due to
the repeated creation of resources that weren't being released.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12195>

2 years agobin/gen_release_notes: Fix commits with multiple Closes:
Dylan Baker [Wed, 4 Aug 2021 18:37:12 +0000 (11:37 -0700)]
bin/gen_release_notes: Fix commits with multiple Closes:

Currently we'd only handle the last one, not all of them. Which is
clearely not correct.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12201>

2 years agobin/gen_release_notes: Don't consider issues for other projects
Dylan Baker [Wed, 4 Aug 2021 18:32:19 +0000 (11:32 -0700)]
bin/gen_release_notes: Don't consider issues for other projects

We have enough commits in mesa that have external dependencies that we
need to be sure that a Closes: https://... is actually for mesa and not
for another project.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12201>

2 years agobin/gen_release_notes: Add basic tests for parsing issues
Dylan Baker [Wed, 4 Aug 2021 18:26:53 +0000 (11:26 -0700)]
bin/gen_release_notes: Add basic tests for parsing issues

Since test coverage here is pretty important for a heuristic like this.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12201>

2 years agodocs: Add calendar entries for 21.2 release.
Dylan Baker [Wed, 4 Aug 2021 19:10:05 +0000 (12:10 -0700)]
docs: Add calendar entries for 21.2 release.

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

2 years agodocs: update calendar and link releases notes for 21.2.0
Dylan Baker [Wed, 4 Aug 2021 19:09:26 +0000 (12:09 -0700)]
docs: update calendar and link releases notes for 21.2.0

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

2 years agodocs: update calendar for 21.2.0-rc3
Dylan Baker [Wed, 4 Aug 2021 19:09:23 +0000 (12:09 -0700)]
docs: update calendar for 21.2.0-rc3

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

2 years agodocs: update calendar for 21.2.0-rc2
Dylan Baker [Wed, 4 Aug 2021 19:09:21 +0000 (12:09 -0700)]
docs: update calendar for 21.2.0-rc2

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

2 years agodocs: add release notes for 21.2.0
Dylan Baker [Wed, 4 Aug 2021 18:44:30 +0000 (11:44 -0700)]
docs: add release notes for 21.2.0

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

2 years agozink: simplify else clause for mem info gathering
Mike Blumenkrantz [Wed, 4 Aug 2021 16:05:04 +0000 (12:05 -0400)]
zink: simplify else clause for mem info gathering

it doesn't matter if this is host-visible, it just has to not be device-local

Fixes: 73f6bff07f1 ("zink: fix mem info query to be more permissive")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12199>

2 years agozink: sum available memory heaps instead of assigning
Mike Blumenkrantz [Wed, 4 Aug 2021 15:44:28 +0000 (11:44 -0400)]
zink: sum available memory heaps instead of assigning

this is supposed to accumulate now

Fixes: 73f6bff07f1 ("zink: fix mem info query to be more permissive")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12199>

2 years agoci/freedreno: Mark border_color as passing on a5xx.
Emma Anholt [Wed, 4 Aug 2021 00:27:38 +0000 (17:27 -0700)]
ci/freedreno: Mark border_color as passing on a5xx.

They're marked as flaky, but they're all passing on my board, and maybe in
CI too.  Let's see if CI still sees them as flaky once the expectations
are right.

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

2 years agofreedreno/a5xx: Don't try to emit FS images in binning command streams.
Emma Anholt [Wed, 4 Aug 2021 00:01:26 +0000 (17:01 -0700)]
freedreno/a5xx: Don't try to emit FS images in binning command streams.

We don't have a compiled FS in that case, so the shader deref fails.  We
don't need the state, anyway.

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

2 years agofreedreno/a5xx: Disable TF when pausing or transitioning to non-TF.
Emma Anholt [Tue, 3 Aug 2021 19:45:57 +0000 (12:45 -0700)]
freedreno/a5xx: Disable TF when pausing or transitioning to non-TF.

This is not as clean as on a6xx where we just re-emit the SO state, but it
cleans up our dEQP results a ton.

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

2 years agoci/freedreno: Clear out TF API errors xfails.
Emma Anholt [Tue, 3 Aug 2021 21:20:19 +0000 (14:20 -0700)]
ci/freedreno: Clear out TF API errors xfails.

These tests are flaky and sometimes segfault in CI, but usually pass.  We
hadn't noticed their change due to the test being marked as flaky.

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

2 years agoac: Remove deprecated use_late_alloc field as nobody uses it anymore.
Timur Kristóf [Thu, 15 Jul 2021 09:54:33 +0000 (11:54 +0200)]
ac: Remove deprecated use_late_alloc field as nobody uses it anymore.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/11905>

2 years agoradv: Use ac_compute_late_alloc in radv_pipeline.
Timur Kristóf [Thu, 15 Jul 2021 09:48:25 +0000 (11:48 +0200)]
radv: Use ac_compute_late_alloc in radv_pipeline.

This aligns RADV with RadeonSI in how it handles late alloc,
making it easier for us to deal with deadlocks and such.

Also move setting the RSRC3 registers for VS, GS and NGG
into radv_pipeline.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/11905>

2 years agoradv: Don't toggle PC oversubscription for NGG culling.
Timur Kristóf [Thu, 15 Jul 2021 09:51:32 +0000 (11:51 +0200)]
radv: Don't toggle PC oversubscription for NGG culling.

We are going to add this directly to the pipeline.
If a pipeline has such a shader, NGG culling is turned on
most of the time, so it's not useful to toggle this setting.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/11905>

2 years agoaco: Use Navi 10 empty NGG output workaround on NGG culling shaders.
Timur Kristóf [Mon, 2 Aug 2021 14:48:41 +0000 (16:48 +0200)]
aco: Use Navi 10 empty NGG output workaround on NGG culling shaders.

Navi 10 can hang when an NGG workgroup has no output,
so we work around that by always exporting a single zero-area
triangle with a single vertex that has all-NaN coordinates.

Thus far, we only employed this for NGG GS, because on all
other stages, the output can't be empty.

However, with NGG culling, the output can be empty, so let's
apply the same workaround there too.

Cc: mesa-stable
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/12169>

2 years agoaco: use image_dim and image_array intrinsic indices
Rhys Perry [Tue, 3 Aug 2021 18:04:48 +0000 (19:04 +0100)]
aco: use image_dim and image_array intrinsic indices

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

2 years agoradv: set image_dim and image_array intrinsic indices
Rhys Perry [Fri, 30 Jul 2021 12:25:26 +0000 (13:25 +0100)]
radv: set image_dim and image_array intrinsic indices

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

2 years agoci: bump to latest virglrenderer for anisotropic support
Dave Airlie [Mon, 2 Aug 2021 07:01:56 +0000 (17:01 +1000)]
ci: bump to latest virglrenderer for anisotropic support

Update ci results

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

2 years agovirgl: add support for anisotropic texture filtering
Dave Airlie [Sun, 18 Jul 2021 20:36:01 +0000 (06:36 +1000)]
virgl: add support for anisotropic texture filtering

This is the guest side for adding correct anisotropic filtering support

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

2 years agovirgl: disable anisotropic filtering.
Dave Airlie [Sun, 18 Jul 2021 19:58:48 +0000 (05:58 +1000)]
virgl: disable anisotropic filtering.

virgl doesn't yet support anisotropic filtering so don't advertise it.

Fixes: a8987b88ff1d ("virgl: add driver for virtio-gpu 3D (v2)")
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11944>

2 years agoiris: Fix Null pointer dereferences
Sergii Melikhov [Mon, 2 Aug 2021 12:15:34 +0000 (15:15 +0300)]
iris: Fix Null pointer dereferences

Fix the error from Coverity report: CID 1489765

Signed-off-by: Sergii Melikhov <sergii.v.melikhov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12179>