platform/upstream/mesa.git
4 years agospirv: Give atomic counters their own variable mode
Jason Ekstrand [Fri, 29 May 2020 23:39:30 +0000 (18:39 -0500)]
spirv: Give atomic counters their own variable mode

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

4 years agospirv: Drop the sampled boolean from vtn_type
Jason Ekstrand [Fri, 29 May 2020 21:36:54 +0000 (16:36 -0500)]
spirv: Drop the sampled boolean from vtn_type

It was set but never used.  We always check the glsl_type instead.

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

4 years agospirv: Add better checks for SSA value types
Jason Ekstrand [Fri, 29 May 2020 21:10:28 +0000 (16:10 -0500)]
spirv: Add better checks for SSA value types

Primarily, we check for two things:

 1. That we only ever add SSA values via vtn_push_ssa_value and
    vtn_copy_value.

 2. That the type of the SSA value matches the SPIR-V destination type.

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

4 years agospirv: Hand-roll fewer vtn_ssa_value creations
Jason Ekstrand [Sat, 30 May 2020 17:27:54 +0000 (12:27 -0500)]
spirv: Hand-roll fewer vtn_ssa_value creations

Previously, we created our vtn_ssa_value in _vtn_variable_load_store
manually as we did the recursive load/store.  Instead, we now create the
SSA value before calling into the recursive function.  This is a tiny
bit less efficient but it removes a case of hand-rolling vtn_ssa_value
creation.  For symmetry, we make _vtn_block_load_store assume the value
is already created.  Finally, we remove a trivial hand-rolled case in
vtn_composite_extract.

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

4 years agospirv: Simplify vtn_ssa_value creation
Jason Ekstrand [Sat, 30 May 2020 17:23:50 +0000 (12:23 -0500)]
spirv: Simplify vtn_ssa_value creation

For three different functions which create vtn_ssa_values, we had three
completely different implementations.  This unifies them all to roughly
the same algorithm.  While we're at it, we take advantage of the
nir_build_imm helper to avoid some extra code in vtn_const_ssa_value.

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

4 years agospirv/subgroups: Refactor to use vtn_push_ssa
Jason Ekstrand [Fri, 29 May 2020 19:40:12 +0000 (14:40 -0500)]
spirv/subgroups: Refactor to use vtn_push_ssa

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

4 years agospirv/subgroups: Stop incrementing w
Jason Ekstrand [Sat, 30 May 2020 16:07:46 +0000 (11:07 -0500)]
spirv/subgroups: Stop incrementing w

The w++ is to handle a differences between the KHR extension and Vulkan
1.1 feature where the Vulkan 1.1 instructions take an scope parameter.
While incrementing w technically works, it's really subtle and very easy
to miss when reading the code.

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

4 years agospirv/glsl450: Use vtn_push_ssa_value
Jason Ekstrand [Fri, 29 May 2020 21:04:02 +0000 (16:04 -0500)]
spirv/glsl450: Use vtn_push_ssa_value

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

4 years agospirv/alu: Use vtn_push_ssa_value
Jason Ekstrand [Fri, 29 May 2020 20:57:42 +0000 (15:57 -0500)]
spirv/alu: Use vtn_push_ssa_value

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

4 years agospirv: Refactor vtn_push_ssa
Jason Ekstrand [Fri, 29 May 2020 20:44:10 +0000 (15:44 -0500)]
spirv: Refactor vtn_push_ssa

We rename it to vtn_push_ssa_value, move it to spirv_to_nir, and remove
the unnecessary type parameter.

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

4 years agospirv: Use the new helpers in OpConvertUToPtr/PtrToU
Jason Ekstrand [Thu, 28 May 2020 23:39:45 +0000 (18:39 -0500)]
spirv: Use the new helpers in OpConvertUToPtr/PtrToU

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

4 years agospirv: Add a vtn_get_nir_ssa helper
Jason Ekstrand [Wed, 27 May 2020 23:28:18 +0000 (18:28 -0500)]
spirv: Add a vtn_get_nir_ssa helper

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

4 years agospirv/amd: Use vtn_push_nir_ssa
Jason Ekstrand [Wed, 27 May 2020 23:08:20 +0000 (18:08 -0500)]
spirv/amd: Use vtn_push_nir_ssa

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

4 years agospirv: Add a vtn_push_nir_ssa helper
Jason Ekstrand [Wed, 27 May 2020 22:49:47 +0000 (17:49 -0500)]
spirv: Add a vtn_push_nir_ssa helper

This makes it easy to write a simple NIR SSA value

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

4 years agospirv: Rename push_value_pointer to push_pointer
Jason Ekstrand [Wed, 27 May 2020 22:55:10 +0000 (17:55 -0500)]
spirv: Rename push_value_pointer to push_pointer

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

4 years agospirv: Add a helpers for getting types of values
Jason Ekstrand [Wed, 27 May 2020 23:33:47 +0000 (18:33 -0500)]
spirv: Add a helpers for getting types of values

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

4 years agospirv: Use nir_bany/ball for OpAny/All
Jason Ekstrand [Fri, 29 May 2020 04:00:21 +0000 (23:00 -0500)]
spirv: Use nir_bany/ball for OpAny/All

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

4 years agospirv: Clean up OpSignBitSet
Jason Ekstrand [Thu, 28 May 2020 22:14:30 +0000 (17:14 -0500)]
spirv: Clean up OpSignBitSet

For some reason, we were doing a signed shift vectors and an unsigned
shift for scalars.  We then plug it into i2b so it should make no
difference whatsoever.  The fact that we're doing different things for
vectors vs. scalars is bonkers.  Let's simplify the code a bit.

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

4 years agospirv: Fix indentation in vtn_handle_ptr
Jason Ekstrand [Wed, 27 May 2020 22:41:23 +0000 (17:41 -0500)]
spirv: Fix indentation in vtn_handle_ptr

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

4 years agospirv: Drop the void *ptr from vtn_value
Jason Ekstrand [Wed, 27 May 2020 21:15:39 +0000 (16:15 -0500)]
spirv: Drop the void *ptr from vtn_value

It isn't being used for anything.

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

4 years agospirv: Simplify our handling of NonUniform
Jason Ekstrand [Thu, 28 May 2020 23:32:01 +0000 (18:32 -0500)]
spirv: Simplify our handling of NonUniform

The original implementation of SPV_EXT_descriptor_indexing was extremely
paranoid about the NonUniform qualifier, trying to fetch it from every
possible location and propagate it through access chains etc.  However,
the Vulkan spec is quite nice to us on this and has very strict rules
for where the NonUniform decoration has to be placed.  For image and
texture operations, we can search for the decoration on the spot when we
process the image or texture op.  For pointers, we continue putting it
on the pointer but we don't bother trying to do anything silly like
propagate it through casts.

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

4 years agonir/vtn: Add support for 8 and 16 vector ball/bany
Jesse Natalie [Tue, 23 Jun 2020 12:44:11 +0000 (05:44 -0700)]
nir/vtn: Add support for 8 and 16 vector ball/bany

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6030>

4 years agonir: Support 8 and 16 component vectors for reduceable intrinsics
Jesse Natalie [Mon, 22 Jun 2020 23:48:43 +0000 (16:48 -0700)]
nir: Support 8 and 16 component vectors for reduceable intrinsics

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6030>

4 years agonir: Support algebraic opts on vectors larger than 4
Jesse Natalie [Mon, 22 Jun 2020 18:49:41 +0000 (11:49 -0700)]
nir: Support algebraic opts on vectors larger than 4

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6030>

4 years agonir: Support vec8/vec16 in nir_lower_bit_size
Jesse Natalie [Mon, 1 Jun 2020 22:46:03 +0000 (15:46 -0700)]
nir: Support vec8/vec16 in nir_lower_bit_size

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6030>

4 years agofreedreno: sync registers from envytools
Rob Clark [Thu, 23 Jul 2020 20:02:08 +0000 (13:02 -0700)]
freedreno: sync registers from envytools

Pull in a bunch of fixes and updates.. mostly using varset correctly,
and fixes for implicit bools.

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

4 years agotu: Enable VK_EXT_depth_clip_enable
Connor Abbott [Thu, 23 Jul 2020 09:44:40 +0000 (11:44 +0200)]
tu: Enable VK_EXT_depth_clip_enable

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

4 years agoaco: ensure readfirstlane subdword operands are always dword aligned
Daniel Schürmann [Thu, 23 Jul 2020 07:58:11 +0000 (09:58 +0200)]
aco: ensure readfirstlane subdword operands are always dword aligned

Cc: 20.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6024>

4 years agoaco: prevent infinite recursion in RA for subdword variables
Daniel Schürmann [Thu, 23 Jul 2020 07:41:07 +0000 (09:41 +0200)]
aco: prevent infinite recursion in RA for subdword variables

Cc: 20.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6024>

4 years agoaco: don't split store data if it was already split into more elements
Daniel Schürmann [Wed, 22 Jul 2020 16:41:53 +0000 (18:41 +0200)]
aco: don't split store data if it was already split into more elements

Cc: 20.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6024>

4 years agoaco: ensure to not extract more components than have been fetched
Daniel Schürmann [Wed, 22 Jul 2020 14:41:41 +0000 (16:41 +0200)]
aco: ensure to not extract more components than have been fetched

Fixes: 7015d2c249e1f7814bf5681ccd049e49e4d6495c ('aco: fix scratch loads which cross element_size boundaries')
Cc: 20.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6024>

4 years agoradv: Add timeline syncobj for timeline semaphores.
Bas Nieuwenhuizen [Thu, 16 Jul 2020 00:44:22 +0000 (02:44 +0200)]
radv: Add timeline syncobj for timeline semaphores.

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

4 years agoradv: Add winsys functions for timeline syncobj.
Bas Nieuwenhuizen [Thu, 16 Jul 2020 00:43:32 +0000 (02:43 +0200)]
radv: Add winsys functions for timeline syncobj.

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

4 years agoradv: Add winsys support for submitting timeline syncobj.
Bas Nieuwenhuizen [Thu, 16 Jul 2020 00:42:56 +0000 (02:42 +0200)]
radv: Add winsys support for submitting timeline syncobj.

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

4 years agoradv: Add thread for timeline syncobj submission.
Bas Nieuwenhuizen [Mon, 22 Jun 2020 20:07:46 +0000 (22:07 +0200)]
radv: Add thread for timeline syncobj submission.

For cross-process timelines we have to have a thread to wait
till the requested points become available.

The functions actually dealing with timeline semaphores stubbed out, to
implement in the next patch. As such the thread code shouldn't trigger
yet.

The core idea is that we still use the refcount mechanism that we use with
emulated timelines, though the native timeline syncobj don't participate
in the refcounting. This way we keep the ordering of submission in a queue
as each submission is also blocked by its predecessor.

Where we change behavior is when the number of blockers reaches 0. In the
new code we check if we need to wait for the timeline semaphores to
be available and if so we won't execute the submission immediately but
pass it to the submission thread.

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

4 years agoradv/winsys: Add binary syncobj ABI changes for timeline semaphores.
Bas Nieuwenhuizen [Sun, 21 Jun 2020 23:11:03 +0000 (01:11 +0200)]
radv/winsys: Add binary syncobj ABI changes for timeline semaphores.

To facilitate cross-process timeline semaphores we have to deal with
the fact that the syncobj signal operation might be submitted a
small finite time after the wait operation.

For that we start using DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT during
the wait operation so we properly wait instead of returning an error.

Furthermore, to make this effective for syncobjs that get reused we
actually have to reset them after the wait. Otherwise the wait before
submit would get the previous fence instead of waiting for the new
thing to submit.

The obvious choice, resetting the syncobj after the CS submission
has 2 issues though:

1) If the same semaphore is used for wait and signal we can't reset it.
   This is solvable by only resetting the semaphores that are not in the
   signal list.
2) The submitted work might be complete before we get to resetting the
   syncobj. If there is a cycle of submissions that signals it again and
   finishes before we get to the reset we are screwed.

Solution:
Copy the fence into a new syncobj and reset the old syncobj before
submission. Yes I know it is more syscalls :( At least I reduced the
alloc/free overhead by keeping a cache of temporary syncobjs.

This also introduces a syncobj_reset_count as we don't want to reset
syncobjs that are part of an emulated timeline semaphore. (yes, if
the kernel supports timeline syncobjs we should use those instead,
but those still need to be implemented and if we depend on them in
this patch ordering dependencies get hard ...)

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

4 years agoamd: Add detection of timeline semaphore support.
Bas Nieuwenhuizen [Sun, 21 Jun 2020 21:22:00 +0000 (23:22 +0200)]
amd: Add detection of timeline semaphore support.

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

4 years agonir/ lower_int_to_float: Handle umax and umin
Andreas Baierl [Thu, 23 Jul 2020 05:43:09 +0000 (07:43 +0200)]
nir/ lower_int_to_float: Handle umax and umin

8e1b75b3 introduced umax/umin in order to lower iand/ior for (n)eq zero.
That breaks the lower_int_to_float pass, because umax and umin weren't
handled there.

Tested with lima. The other users of nir_lower_int_to_float
(etnaviv, freedreno) should also have that issue.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6043>

4 years agoci: Use half as many parallel softpipe / virgl test jobs
Michel Dänzer [Tue, 21 Jul 2020 14:36:28 +0000 (16:36 +0200)]
ci: Use half as many parallel softpipe / virgl test jobs

We're now using at least twice as many CPU cores per job (on shared
runners), so they only take about half as long, and should still be
under 10 minutes.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6011>

4 years agoci: Do not mark container / pages jobs as interruptible
Michel Dänzer [Tue, 21 Jul 2020 14:13:37 +0000 (16:13 +0200)]
ci: Do not mark container / pages jobs as interruptible

If another MR was merged while these were still running for the main
project, the result could be no updated images in the main project
registry (forcing a rebuild of the new images in all forked projects) or
an outdated Mesa website.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6011>

4 years agoci: Use FDO_CI_CONCURRENT in run-shader-db.sh as well
Michel Dänzer [Tue, 21 Jul 2020 14:03:57 +0000 (16:03 +0200)]
ci: Use FDO_CI_CONCURRENT in run-shader-db.sh as well

Noticed while checking job logs for it being used elsewhere.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6011>

4 years agoci: Namespace trace artifacts to the job number
Tomeu Vizoso [Wed, 22 Jul 2020 15:39:15 +0000 (17:39 +0200)]
ci: Namespace trace artifacts to the job number

Put artifacts in a per-job folder, because if a job is retried then it
will try to upload a file to the same key and fail with the following
error:

403 Client Error: Forbidden for url:
https://minio-packet.freedesktop.org/artifacts/daenzer/mesa/180609/gl-panfrost-t860/results.yml

Also, to prevent in the future similar clashes if several trace files
share the same name, upload the images with their checksums as their
names. This will also make it easier to fetch images for comparison with
the references.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6029>

4 years agonir_ allow nir_lower_clip_halfz to run in tess eval shader
Mike Blumenkrantz [Fri, 17 Jul 2020 13:46:47 +0000 (09:46 -0400)]
nir_ allow nir_lower_clip_halfz to run in tess eval shader

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6027>

4 years agonir: allow lower_psiz_mov to run in tessellation stages
Mike Blumenkrantz [Thu, 16 Jul 2020 13:38:46 +0000 (09:38 -0400)]
nir: allow lower_psiz_mov to run in tessellation stages

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6027>

4 years agoRevert "llvmpipe: Use the default behavior of ALLOW_MAPPED_BUFFERS."
Dave Airlie [Thu, 23 Jul 2020 05:50:19 +0000 (15:50 +1000)]
Revert "llvmpipe: Use the default behavior of ALLOW_MAPPED_BUFFERS."

This reverts commit 6ec49066498097c2647d030ebe1b99a00bc38734.

This broke:
GTF-GL45.gtf21.GL3Tests.texture_lod_bias.*

not sure why but revert for now.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6042>

4 years agollvmpipe/ms: fix sign extension bug in rasterizer.
Dave Airlie [Tue, 21 Jul 2020 06:32:08 +0000 (16:32 +1000)]
llvmpipe/ms: fix sign extension bug in rasterizer.

/glcts --deqp-surface-width=1024 --deqp-surface-height=64  --deqp-case=KHR-GL45.texture_view.view_sampling  --deqp-surface-type=fbo
was failing but only for width 1024.

The test was filling a 4x4 ms texture, but leaving the viewport set to 1024x64.

This was resulting in this code incorrectly sign extending a value, and passing
it into the mask generator and getting the wrong values. Explicit cast
avoids the sign extension and fixes the above test.

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

4 years agointel/ir/gen12+: Work around FS performance regressions due to SIMD32 discard divergence.
Francisco Jerez [Sun, 31 May 2020 21:56:40 +0000 (14:56 -0700)]
intel/ir/gen12+: Work around FS performance regressions due to SIMD32 discard divergence.

This avoids some performance regressions on Gen12 platforms caused by
SIMD32 fragment shaders reported in titles like Dota2, TF2, Xonotic,
and GFXBench5 Car Chase and Aztec Ruins.

The most obvious pattern in the regressing shaders I identified among
these workloads is that they all had non-uniform discard statements,
which are handled rather optimistically by the current IR analysis
pass: No penalty is currently applied to the SIMD32 variant of the
shader in the form of differing branching weights like we do for other
control flow instructions in order to account for the greater
likelihood of divergence of a SIMD32 shader.

Simply changing that by giving the same treatment to discard
statements as we give to other branching instructions seemed to hurt
more than it helped on platforms earlier than Gen12, since it reversed
most of the improvement obtained from SIMD32 fragment shaders in
Manhattan for no measurable benefit in other workloads (Manhattan has
a handful of shaders with statically non-uniform discard statements
which actually perform better in SIMD32 mode due to their approximate
dynamic uniformity).  For that reason this change is applied to Gen12+
platforms only.

I've been running a number of tests trying to understand the
difference in behavior between Gen12 and earlier platforms, and most
of the evidence I've gathered seems to point at EU fusion being the
culprit: Unlike previous generations, on Gen12 EUs are arranged in
pairs which execute instructions in lockstep, giving an effective warp
size of 64 threads in SIMD32 mode, which seems to increase the
likelihood for control flow divergence in some of the affected shaders
significantly.

Fixes: 188a3659aea6dec9acf1 "intel/ir: Import shader performance analysis pass."
Reported-by: Caleb Callaway <caleb.callaway@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5910>

4 years agoglx: Fix build and warnings with -Dglx=dri -Dglx-direct=false
Adam Jackson [Thu, 16 Jul 2020 21:29:26 +0000 (17:29 -0400)]
glx: Fix build and warnings with -Dglx=dri -Dglx-direct=false

Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5958>

4 years agosoftpipe: Enable PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS;
Eric Anholt [Wed, 15 Jan 2020 21:07:43 +0000 (13:07 -0800)]
softpipe: Enable PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS;

tgsi_exec.c uses the generic src load path for indirects, so we don't
actually need addr regs.  Saves extra intructions.

shader-db results:
total instructions in shared programs: 3346685 -> 3249052 (-2.92%)
instructions in affected programs: 961832 -> 864199 (-10.15%)

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6018>

4 years agosoftpipe: Enable PIPE_CAP_TGSI_TEXCOORD.
Eric Anholt [Thu, 23 Jan 2020 19:43:04 +0000 (11:43 -0800)]
softpipe: Enable PIPE_CAP_TGSI_TEXCOORD.

The tgsi_exec path can handle it, and otherwise when we start using NIR
our MAX_VARYINGS value will cause us to have VARYING_SLOT_VARx above the
maximum.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6018>

4 years agosoftpipe: Add support for reporting shader-db output.
Eric Anholt [Tue, 21 Jul 2020 22:55:40 +0000 (15:55 -0700)]
softpipe: Add support for reporting shader-db output.

In doing the softpipe NIR and NIR-to-TGSI transition, I want to make sure
I don't make shaders significantly worse, so I need shader-db output.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6018>

4 years agosoftpipe: Convert to comma-separated SOFTPIPE_DEBUG for debug options.
Eric Anholt [Tue, 21 Jul 2020 22:11:56 +0000 (15:11 -0700)]
softpipe: Convert to comma-separated SOFTPIPE_DEBUG for debug options.

This makes us more like other drivers, and avoids having tons of different
names (particularly when you want to dump vs and fs in debugging).  In the
process, having a debug flag for vertex shaders just falls out.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6018>

4 years agosoftpipe: Refactor pipe_shader_state setup.
Eric Anholt [Wed, 1 Jan 2020 00:31:54 +0000 (16:31 -0800)]
softpipe: Refactor pipe_shader_state setup.

We had repeated code that I want to repeatedly change for adding
nir-to-tgsi.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6018>

4 years agollvmpipe: enable robust buffer access + GL 4.3, GLES 3.2 and robust buffer access...
Dave Airlie [Sun, 19 Jul 2020 23:22:34 +0000 (09:22 +1000)]
llvmpipe: enable robust buffer access + GL 4.3, GLES 3.2 and robust buffer access behaviour

Turning on robust buffer access enables GLES 3.2, also
finished GL 4.3 support.

The post depth coverage fail is expected, it's a test bug
This also introduce a fail in the invalid flag test that I can't reproduce out of CI.

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

4 years agollvmpipe: add device reset query context hook.
Dave Airlie [Sun, 19 Jul 2020 23:21:39 +0000 (09:21 +1000)]
llvmpipe: add device reset query context hook.

Add the device reset query hook needed for robustness

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

4 years agoglx/drisw: add robustness support
Dave Airlie [Sun, 19 Jul 2020 23:55:30 +0000 (09:55 +1000)]
glx/drisw: add robustness support

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

4 years agodrisw: add robustness extension support.
Dave Airlie [Sun, 19 Jul 2020 23:21:06 +0000 (09:21 +1000)]
drisw: add robustness extension support.

Port the code from dri2 so that drisw drivers can support the
robustness extension

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

4 years agollvmpipe/draw: handle constant buffer limits and robustness (v1.1)
Dave Airlie [Sun, 29 Dec 2019 23:59:28 +0000 (09:59 +1000)]
llvmpipe/draw: handle constant buffer limits and robustness (v1.1)

TGSI expect vec4 of constants for it's current code paths, and when
doing indirect accesses it does the comparison on vec4 indexes,
however NIR does the indexing on packed float indexes.

This also align the compute path with the other shaders, and
should improve robustness (at least under Vulkan)

Fixes:
KHR-NoContext.gl43.robust_buffer_access_behavior.uniform_buffer

v1.1:
rename variable to something more meaningful (Roland)

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

4 years agollvmpipe: enable EXT_texture_shadow_lod
Dave Airlie [Thu, 16 Jul 2020 00:50:14 +0000 (10:50 +1000)]
llvmpipe: enable EXT_texture_shadow_lod

The driver passes all the CTS tests for this.

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

4 years agonir/lower_io: Add support for global scratch addressing
Jason Ekstrand [Tue, 14 Jul 2020 18:32:19 +0000 (13:32 -0500)]
nir/lower_io: Add support for global scratch addressing

This provides an alternate lowering for scratch in which it uses global
reads/writes and bases scratch addresses on a base pointer.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5927>

4 years agonir/lower_io: Use b2b for shader and function temporaries
Jason Ekstrand [Wed, 15 Jul 2020 19:09:06 +0000 (14:09 -0500)]
nir/lower_io: Use b2b for shader and function temporaries

This way we can avoid some unnecessary conversions because there's no
need to sanitize to 0/1 for scratch.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5927>

4 years agonir/lower_io: Choose to set access based on intrinsic metadata
Jason Ekstrand [Wed, 15 Jul 2020 18:32:10 +0000 (13:32 -0500)]
nir/lower_io: Choose to set access based on intrinsic metadata

This should be far more reliable than trying to keep opcode lists
up-to-date.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5927>

4 years agonir: Allow for system values with variable numbers of destination components
Jason Ekstrand [Tue, 14 Jul 2020 18:27:53 +0000 (13:27 -0500)]
nir: Allow for system values with variable numbers of destination components

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5927>

4 years agodocs/releasing: improve wording
Eric Engestrom [Wed, 8 Jul 2020 23:26:31 +0000 (01:26 +0200)]
docs/releasing: improve wording

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

4 years agobin/gen_release_notes: automatically commit release notes
Eric Engestrom [Wed, 8 Jul 2020 23:25:39 +0000 (01:25 +0200)]
bin/gen_release_notes: automatically commit release notes

Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5833>

4 years agopost_version.py: fix relnotes links
Eric Engestrom [Wed, 15 Jul 2020 21:53:59 +0000 (23:53 +0200)]
post_version.py: fix relnotes links

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

4 years agopost_version.py: update the files in the current worktree, not the one with the scrip...
Eric Engestrom [Tue, 23 Jun 2020 00:24:00 +0000 (02:24 +0200)]
post_version.py: update the files in the current worktree, not the one with the script that we run

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

4 years agopost_version.py: stop using non-existent functions and fix commit message
Eric Engestrom [Tue, 23 Jun 2020 00:22:58 +0000 (02:22 +0200)]
post_version.py: stop using non-existent functions and fix commit message

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

4 years agopost_version.py: drop incorrect conf.py changes
Eric Engestrom [Tue, 23 Jun 2020 00:16:57 +0000 (02:16 +0200)]
post_version.py: drop incorrect conf.py changes

This needs to be done in the mesa3d.org repo; see
https://gitlab.freedesktop.org/mesa/mesa3d.org/-/merge_requests/19

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

4 years agopost_version.py: don't generate relnotes twice
Eric Engestrom [Tue, 23 Jun 2020 00:16:25 +0000 (02:16 +0200)]
post_version.py: don't generate relnotes twice

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

4 years agodocs: update calendar and link releases notes for 20.1.4
Eric Engestrom [Wed, 22 Jul 2020 21:07:14 +0000 (23:07 +0200)]
docs: update calendar and link releases notes for 20.1.4

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

4 years agodocs: add release notes for 20.1.4
Eric Engestrom [Wed, 22 Jul 2020 20:40:50 +0000 (22:40 +0200)]
docs: add release notes for 20.1.4

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

4 years agogitlab-ci: Test AMD's Raven with traces
Andres Gomez [Fri, 24 Apr 2020 16:32:42 +0000 (19:32 +0300)]
gitlab-ci: Test AMD's Raven with traces

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6014>

4 years agoi915: Remove a bunch of default handling of pipe caps.
Eric Anholt [Mon, 6 Jan 2020 23:11:35 +0000 (15:11 -0800)]
i915: Remove a bunch of default handling of pipe caps.

u_screen will return 0 for all of these, which means that this is one
less driver to see in git grep when I'm checking who exposes a cap.
The exception is the texel/gather offsets and stream output
components, which will not be exposed since we don't expose the
corresponding GLSL version.

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

4 years agosvga: Remove a bunch of default handling of pipe caps.
Eric Anholt [Mon, 6 Jan 2020 22:51:16 +0000 (14:51 -0800)]
svga: Remove a bunch of default handling of pipe caps.

u_screen will return 0 for all of these, which means that this is one
less driver to see in git grep when I'm checking who exposes a cap.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3298>

4 years agoswr: Use the default behavior of ALLOW_MAPPED_BUFFERS.
Eric Anholt [Mon, 6 Jan 2020 22:43:59 +0000 (14:43 -0800)]
swr: Use the default behavior of ALLOW_MAPPED_BUFFERS.

Since this is a software rasterizer, we really don't care whether the
buffers are "mapped" since it's just malloc.  This will drop a bit of
pointless CPU overhead to throw errors.

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3298>

4 years agoswr: Remove a bunch of default handling of pipe caps.
Eric Anholt [Mon, 6 Jan 2020 22:43:42 +0000 (14:43 -0800)]
swr: Remove a bunch of default handling of pipe caps.

u_screen will return 0 for all of these, which means that this is one
less driver to see in git grep when I'm checking who exposes a cap.

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3298>

4 years agovirgl: Remove a bunch of default handling of pipe caps.
Eric Anholt [Mon, 6 Jan 2020 22:38:50 +0000 (14:38 -0800)]
virgl: Remove a bunch of default handling of pipe caps.

u_screen will return 0 for all of these, which means that this is one
less driver to see in git grep when I'm checking who exposes a cap.

Reviewed-by Gert Wollny <gert.wollny@collabora.com>

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

4 years agosoftpipe: Use the default behavior of ALLOW_MAPPED_BUFFERS.
Eric Anholt [Mon, 6 Jan 2020 22:35:33 +0000 (14:35 -0800)]
softpipe: Use the default behavior of ALLOW_MAPPED_BUFFERS.

Since this is a software rasterizer, we really don't care whether the
buffers are "mapped" since it's just malloc.  This will drop a bit of
pointless CPU overhead to throw errors.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3298>

4 years agosoftpipe: Remove a bunch of default handling of pipe caps.
Eric Anholt [Mon, 6 Jan 2020 22:31:47 +0000 (14:31 -0800)]
softpipe: Remove a bunch of default handling of pipe caps.

u_screen will return 0 for all of these, which means that this is one
less driver to see in git grep when I'm checking who exposes a cap.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3298>

4 years agollvmpipe: Use the default behavior of ALLOW_MAPPED_BUFFERS.
Eric Anholt [Mon, 6 Jan 2020 22:25:08 +0000 (14:25 -0800)]
llvmpipe: Use the default behavior of ALLOW_MAPPED_BUFFERS.

Since this is a software rasterizer, we really don't care whether the
buffers are "mapped" since it's just malloc.  This will drop a bit of
pointless CPU overhead to throw errors.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3298>

4 years agollvmpipe: Remove a bunch of default handling of pipe caps.
Eric Anholt [Mon, 6 Jan 2020 22:22:12 +0000 (14:22 -0800)]
llvmpipe: Remove a bunch of default handling of pipe caps.

u_screen will return 0 for all of these, which means that this is one
less driver to see in git grep when I'm checking who uses a cap.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3298>

4 years agoci: Fix the overwriting of traces.yml for baremetal
Tomeu Vizoso [Tue, 21 Jul 2020 13:46:06 +0000 (15:46 +0200)]
ci: Fix the overwriting of traces.yml for baremetal

When the lava files were moved out of the container, this stopped
working which caused the traces job for Freedreno to not run any traces
at all.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Fixes: dcd171f5e9bd ("gitlab-ci: More stable URL for kernel and ramdisk artifacts, for LAVA")
Acked-by: Andres Gomez <agomez@igalia.com>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6021>

4 years agoci: Update checksums for freedreno traces.
Eric Anholt [Wed, 22 Jul 2020 16:52:07 +0000 (09:52 -0700)]
ci: Update checksums for freedreno traces.

Hand-verified by looking at our artifacts compared to an i965 capture I
had.

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

4 years agoradeon/vcn: increase render_pic_list size
Thong Thai [Tue, 21 Jul 2020 21:04:47 +0000 (17:04 -0400)]
radeon/vcn: increase render_pic_list size

Increase the maximum number of possible decoder reference picture
frames from 16 to 32.

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

4 years agoradeonsi: enable preemption if the kernel enabled it
Marek Olšák [Thu, 18 Jun 2020 05:07:04 +0000 (01:07 -0400)]
radeonsi: enable preemption if the kernel enabled it

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

4 years agoradeonsi: set up IBs for preemption
Marek Olšák [Thu, 18 Jun 2020 05:06:12 +0000 (01:06 -0400)]
radeonsi: set up IBs for preemption

- Execute cs_preamble_state as a separate IB with different flags.
- Set the PREEMPT flag for the main IB.

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

4 years agoradeonsi: don't restore states at the beginning of IBs if they're shadowed
Marek Olšák [Tue, 10 Mar 2020 22:46:17 +0000 (18:46 -0400)]
radeonsi: don't restore states at the beginning of IBs if they're shadowed

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

4 years agoradeonsi: add debug code for register shadowing
Marek Olšák [Sun, 24 May 2020 12:34:23 +0000 (08:34 -0400)]
radeonsi: add debug code for register shadowing

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

4 years agoradeonsi: add reg shadowing codepaths to GS and tess ring setup
Marek Olšák [Tue, 16 Jun 2020 18:01:16 +0000 (14:01 -0400)]
radeonsi: add reg shadowing codepaths to GS and tess ring setup

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

4 years agoradeonsi: implement CP register shadowing
Marek Olšák [Mon, 15 Jun 2020 20:34:52 +0000 (16:34 -0400)]
radeonsi: implement CP register shadowing

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

4 years agoradeonsi: reorder code in update_gs_ring_buffers and init_tess_factor_ring
Marek Olšák [Tue, 16 Jun 2020 17:57:24 +0000 (13:57 -0400)]
radeonsi: reorder code in update_gs_ring_buffers and init_tess_factor_ring

to reduce the churn when adding codepaths for shadowed registers

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

4 years agoradeonsi: make cs_preamble_state optional
Marek Olšák [Thu, 18 Jun 2020 04:51:19 +0000 (00:51 -0400)]
radeonsi: make cs_preamble_state optional

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

4 years agowinsys/amdgpu: make amdgpu_bo_unmap non-static
Marek Olšák [Thu, 18 Jun 2020 04:51:44 +0000 (00:51 -0400)]
winsys/amdgpu: make amdgpu_bo_unmap non-static

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

4 years agoac: add tables for CP register shadowing
Marek Olšák [Mon, 15 Jun 2020 20:31:43 +0000 (16:31 -0400)]
ac: add tables for CP register shadowing

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

4 years agoac: add helper ac_get_register_name
Marek Olšák [Sun, 24 May 2020 12:30:39 +0000 (08:30 -0400)]
ac: add helper ac_get_register_name

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

4 years agoradeonsi: sort registers in si_init_cs_preamble_state according to GPU gen
Marek Olšák [Tue, 7 Jul 2020 04:02:19 +0000 (00:02 -0400)]
radeonsi: sort registers in si_init_cs_preamble_state according to GPU gen

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

4 years agoradeonsi: sort registers in si_emit_initial_compute_regs according to GPU gen
Marek Olšák [Tue, 7 Jul 2020 04:02:19 +0000 (00:02 -0400)]
radeonsi: sort registers in si_emit_initial_compute_regs according to GPU gen

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

4 years agoradeonsi/gfx10: set the correct value for OFFCHIP_BUFFERING
Marek Olšák [Tue, 7 Jul 2020 03:51:25 +0000 (23:51 -0400)]
radeonsi/gfx10: set the correct value for OFFCHIP_BUFFERING

Copied from PAL. Higher values break tessellation, which I was only able
to reproduce with register shadowing enabled.

Fixes: 0bf3e6fae7f82b4f16fbcbb05a1ae47f7930e189 "radeonsi/gfx10: double the number of tessellation offchip buffers per SE"

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

4 years agoradeonsi: add missing initialization of registers
Marek Olšák [Tue, 7 Jul 2020 02:05:00 +0000 (22:05 -0400)]
radeonsi: add missing initialization of registers

(random initial gfx10 commit:)
Fixes: 78cdf9a99f0 - amd/addrlib: add gfx10 support

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