platform/upstream/mesa.git
2 years agonir, ac, aco: Add index src to load_buffer_amd/store_buffer_amd.
Timur Kristóf [Wed, 20 Apr 2022 15:20:00 +0000 (17:20 +0200)]
nir, ac, aco: Add index src to load_buffer_amd/store_buffer_amd.

Also modify all existing uses to pass a zero to this new src.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> (nir)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17551>

2 years agoaco: Cleanup load_vmem_mubuf and store_vmem_mubuf functions.
Timur Kristóf [Wed, 20 Apr 2022 09:23:42 +0000 (11:23 +0200)]
aco: Cleanup load_vmem_mubuf and store_vmem_mubuf functions.

Remove unused arguments, clean up allow_combining vs. swizzled etc.

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

2 years agonir, ac, aco: Add ACCESS intrinsic index to load/store_buffer_amd.
Timur Kristóf [Tue, 19 Apr 2022 11:50:43 +0000 (13:50 +0200)]
nir, ac, aco: Add ACCESS intrinsic index to load/store_buffer_amd.

Previously, we always treated these as coherent, but now let's make
this configurable. Also set all current users to ACCESS_COHERENT.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> (nir)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17551>

2 years agost: Remove st_api_type because ST_API_OPENVG is not an option anymore
Yonggang Luo [Thu, 20 Oct 2022 02:50:24 +0000 (10:50 +0800)]
st: Remove st_api_type because ST_API_OPENVG is not an option anymore

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19186>

2 years agonir/algebraic: optimize b<<a + c<<a
Rhys Perry [Mon, 17 Oct 2022 19:24:23 +0000 (20:24 +0100)]
nir/algebraic: optimize b<<a + c<<a

fossil-db (navi21):
Totals from 248 (0.18% of 135636) affected shaders:
Instrs: 85836 -> 85611 (-0.26%); split: -0.27%, +0.00%
CodeSize: 481304 -> 480332 (-0.20%); split: -0.21%, +0.00%
Latency: 9596559 -> 9596152 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 1423707 -> 1423670 (-0.00%)
SClause: 3872 -> 3874 (+0.05%)
PreSGPRs: 5034 -> 5038 (+0.08%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19137>

2 years agoturnip: Be sure we blit depth, not stencil, for Z32FS8 -> Z32F resolves.
Emma Anholt [Thu, 20 Oct 2022 00:02:26 +0000 (17:02 -0700)]
turnip: Be sure we blit depth, not stencil, for Z32FS8 -> Z32F resolves.

Fixes: #7143
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19181>

2 years agorusticl: remove blit code
Karol Herbst [Thu, 20 Oct 2022 03:10:21 +0000 (05:10 +0200)]
rusticl: remove blit code

I never ended up using it

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19184>

2 years agoglx: Adot #ifdef GLX_USE_WINDOWSGL in #if defined(GLX_DIRECT_RENDERING) && !defined...
Yonggang Luo [Thu, 22 Sep 2022 09:49:34 +0000 (17:49 +0800)]
glx: Adot #ifdef GLX_USE_WINDOWSGL in #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)

glx_direct and glx_accel are guard by #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18749>

2 years agoglx: Adopt guard of glx_direct and glx_accel in #if defined(GLX_DIRECT_RENDERING...
Yonggang Luo [Thu, 22 Sep 2022 09:46:49 +0000 (17:46 +0800)]
glx: Adopt guard of glx_direct and glx_accel in #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18749>

2 years agoglx: Remove redundant #ifndef GLX_USE_APPLEGL in glx/glxext.c
Yonggang Luo [Thu, 22 Sep 2022 09:19:49 +0000 (17:19 +0800)]
glx: Remove redundant #ifndef GLX_USE_APPLEGL in glx/glxext.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18749>

2 years agoglx: Trim trailing spaces in in glx/glxext.c
Yonggang Luo [Thu, 22 Sep 2022 09:22:40 +0000 (17:22 +0800)]
glx: Trim trailing spaces in in glx/glxext.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18749>

2 years agoglx: Guard usage of infer_zink && !explicit_zink in glxext.c
Yonggang Luo [Thu, 22 Sep 2022 09:43:08 +0000 (17:43 +0800)]
glx: Guard usage of infer_zink && !explicit_zink in glxext.c

Fixes: 2569215f43f ("egl/glx: add fallback for zink loading")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18749>

2 years agozink: start on some type docs
Mike Blumenkrantz [Wed, 19 Oct 2022 12:32:15 +0000 (08:32 -0400)]
zink: start on some type docs

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19165>

2 years agozink: delete unused descriptor struct field
Mike Blumenkrantz [Wed, 19 Oct 2022 12:23:06 +0000 (08:23 -0400)]
zink: delete unused descriptor struct field

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19165>

2 years agozink: delete/cleanup some descriptor #defines
Mike Blumenkrantz [Wed, 19 Oct 2022 12:07:09 +0000 (08:07 -0400)]
zink: delete/cleanup some descriptor #defines

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19165>

2 years agozink: add docs for zink_batch.c
Mike Blumenkrantz [Wed, 19 Oct 2022 12:05:48 +0000 (08:05 -0400)]
zink: add docs for zink_batch.c

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19165>

2 years agoradv: add lowering for nir_intrinsic_load_ring_attr_{offset}_amd
Samuel Pitoiset [Wed, 11 May 2022 13:15:11 +0000 (15:15 +0200)]
radv: add lowering for nir_intrinsic_load_ring_attr_{offset}_amd

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

2 years agonir: add nir_intrinsic_load_ring_attr_{offset}_amd
Samuel Pitoiset [Wed, 11 May 2022 13:14:36 +0000 (15:14 +0200)]
nir: add nir_intrinsic_load_ring_attr_{offset}_amd

These intrinsics will be used to lower NGG attributes to memory on
GFX11.

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

2 years agoradv: declare shader arguments for attributes via memory
Samuel Pitoiset [Wed, 11 May 2022 11:21:07 +0000 (13:21 +0200)]
radv: declare shader arguments for attributes via memory

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

2 years agoradv: create and configure the ring BO for attributes
Samuel Pitoiset [Wed, 11 May 2022 11:50:01 +0000 (13:50 +0200)]
radv: create and configure the ring BO for attributes

It currently uses a pretty large size but it will be tweaked later.

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

2 years agoradv: add RADEON_FLAG_DISCARDABLE
Samuel Pitoiset [Thu, 20 Oct 2022 05:26:38 +0000 (05:26 +0000)]
radv: add RADEON_FLAG_DISCARDABLE

For big pages.

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

2 years agodzn: Use ID3D12DeviceConfiguration for root signature serialization
Jesse Natalie [Mon, 29 Aug 2022 20:18:14 +0000 (13:18 -0700)]
dzn: Use ID3D12DeviceConfiguration for root signature serialization

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18306>

2 years agodzn: Attempt to use the Agility SDK
Jesse Natalie [Mon, 29 Aug 2022 20:09:22 +0000 (13:09 -0700)]
dzn: Attempt to use the Agility SDK

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18306>

2 years agodzn: Use architecture props to return correct device type
Jesse Natalie [Mon, 29 Aug 2022 19:59:52 +0000 (12:59 -0700)]
dzn: Use architecture props to return correct device type

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18306>

2 years agodzn: Support device factories in addition to global device creation
Jesse Natalie [Mon, 29 Aug 2022 19:57:41 +0000 (12:57 -0700)]
dzn: Support device factories in addition to global device creation

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18306>

2 years agodzn: Store the d3d12 module reference on the instance
Jesse Natalie [Mon, 29 Aug 2022 19:45:14 +0000 (12:45 -0700)]
dzn: Store the d3d12 module reference on the instance

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18306>

2 years agozink: set default spec constant value to 1
Mike Blumenkrantz [Mon, 17 Oct 2022 12:23:38 +0000 (08:23 -0400)]
zink: set default spec constant value to 1

this is less illegal

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

2 years agozink: move spec constant emission to the types/consts block
Mike Blumenkrantz [Mon, 17 Oct 2022 12:22:18 +0000 (08:22 -0400)]
zink: move spec constant emission to the types/consts block

spec constants are used as constants, so emitting them in the instructions
block can create mismatched ordering of the constant usage with other types

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

2 years agointel/compiler: run nir_opt_idiv_const before nir_lower_idiv
Tapani Pälli [Wed, 19 Oct 2022 08:48:38 +0000 (11:48 +0300)]
intel/compiler: run nir_opt_idiv_const before nir_lower_idiv

Integer div lowering can potentially create a lot of code that is
not removed later on. Running const lowering pass first can be used
to eliminate that code.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19157>

2 years agoradv: drop the ES vertex count requirement on GFX11
Samuel Pitoiset [Tue, 18 Oct 2022 01:11:26 +0000 (01:11 +0000)]
radv: drop the ES vertex count requirement on GFX11

Ported from RadeonSI.

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

2 years agoradv: do not use memory for waiting for cache flushes on GFX11
Samuel Pitoiset [Mon, 17 Oct 2022 09:03:50 +0000 (09:03 +0000)]
radv: do not use memory for waiting for cache flushes on GFX11

There is a different mechanism with an internal counter.
Ported from RadeonSI.

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

2 years agoradv: use correct VGT_TESS_DISTRIBUTION settings on GFX11
Samuel Pitoiset [Mon, 17 Oct 2022 08:20:30 +0000 (08:20 +0000)]
radv: use correct VGT_TESS_DISTRIBUTION settings on GFX11

Ported from RadeonSI.

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

2 years agoradv: set SAMPLE_MASK_TRACKER_WATERMARK to 15 on GFX11
Samuel Pitoiset [Mon, 17 Oct 2022 08:14:34 +0000 (08:14 +0000)]
radv: set SAMPLE_MASK_TRACKER_WATERMARK to 15 on GFX11

Ported from RadeonSI.

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

2 years agoradeonsi,radv/ci: Increase coverage
Tomeu Vizoso [Wed, 12 Oct 2022 06:46:17 +0000 (08:46 +0200)]
radeonsi,radv/ci: Increase coverage

12 more machines with Stoney Ridge have been added to Collabora's lab.

Use the new ones for testing more of RadeonSI, and repurpose the freed
ones for more RADV coverage.

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

2 years agoci: Run RadeonSI jobs on changes to src/amd/ci
Tomeu Vizoso [Wed, 12 Oct 2022 07:11:36 +0000 (09:11 +0200)]
ci: Run RadeonSI jobs on changes to src/amd/ci

Now that RadeonSI jobs are defined in src/amd/ci, make sure that those
jobs are run on changes to that directory.

Fixes: a1d34d8c9577 ("ci/amd: move radeonsi in amd directory")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19161>

2 years agoac/nir/ngg: use nir_load_provoking_vtx_in_prim_amd in ngg lower
Qiang Yu [Sun, 12 Jun 2022 10:27:21 +0000 (18:27 +0800)]
ac/nir/ngg: use nir_load_provoking_vtx_in_prim_amd in ngg lower

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

2 years agonir,ac/llvm,radv: add nir_intrinsic_load_provoking_vtx_in_prim_amd
Qiang Yu [Sun, 12 Jun 2022 09:57:00 +0000 (17:57 +0800)]
nir,ac/llvm,radv: add nir_intrinsic_load_provoking_vtx_in_prim_amd

For radeonsi which load this from arg.

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

2 years agoradv/ci: run two jobs in parallel to reduce the execution time
Martin Roukala (né Peres) [Tue, 18 Oct 2022 13:30:50 +0000 (16:30 +0300)]
radv/ci: run two jobs in parallel to reduce the execution time

This should bring the overall execution time at around 15 minutes \o/,
but it exposes more issues in the driver:

 - [...].linear_interpolation.no_offset_8_samples (#7220)
 - Timeouts on some dedicated_alloc.image.full.1048577.* tests
 - Timeout on memory.pipeline_barrier.host_read_host_write

More performance improvements should come later, as the load average
remains in the [12, 16] range when running on my machine on a navi22
gets me a 31 load average and a lower execution time by a couple of
minutes.

References: #7220
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19111>

2 years agoradv/ci: bump the job count on navi21
Martin Roukala (né Peres) [Mon, 17 Oct 2022 10:44:16 +0000 (13:44 +0300)]
radv/ci: bump the job count on navi21

We got shiny new hosts for our navi21 which sport twice as many cores
as the previous hosts. Let's try to keep them fed!

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19111>

2 years agor600/sfn: Initialize TestInstrFromString member m_instr_factory.
Vinson Lee [Sun, 16 Oct 2022 18:36:38 +0000 (11:36 -0700)]
r600/sfn: Initialize TestInstrFromString member m_instr_factory.

Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member m_instr_factory is not
initialized in this constructor nor in any functions that it calls.

Fixes: e840645bb79 ("r600/sfn:explicitly initialize the memory pool")
Suggested-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19098>

2 years agoutil: Move the function implementation from u_thread.h to u_thread.c
Yonggang Luo [Fri, 14 Oct 2022 16:48:34 +0000 (00:48 +0800)]
util: Move the function implementation from u_thread.h to u_thread.c

Move the platform dependent functions from u_thread.h to u_thread.c,
so that avoid pull unneeded headers when using u_thread.h, including the big windows.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>

2 years agoutil: Remove include of windows.h in rwlock.h
Yonggang Luo [Sat, 3 Sep 2022 10:04:49 +0000 (18:04 +0800)]
util: Remove include of windows.h in rwlock.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>

2 years agoutil: Remove include of windows.h in memstream.h
Yonggang Luo [Sat, 3 Sep 2022 09:21:58 +0000 (17:21 +0800)]
util: Remove include of windows.h in memstream.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>

2 years agollvmpipe: #include <windows.h> in lp_rast.c
Yonggang Luo [Sat, 3 Sep 2022 10:22:53 +0000 (18:22 +0800)]
llvmpipe: #include <windows.h> in lp_rast.c

It's accessed GetExitCodeThread

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>

2 years agoutil: #include <windows.h> in disk_cache_os.c
Yonggang Luo [Sat, 3 Sep 2022 10:13:56 +0000 (18:13 +0800)]
util: #include <windows.h> in disk_cache_os.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>

2 years agoc11: Getting the macro guard of HAVE_PTHREAD in c11/threads.h to be consistence with...
Yonggang Luo [Thu, 15 Sep 2022 14:53:03 +0000 (22:53 +0800)]
c11: Getting the macro guard of HAVE_PTHREAD in c11/threads.h to be consistence with util/u_uthread.h

The macro guard of #if defined(_WIN32) && !defined(__CYGWIN__) is comes from yohhoy's implementation
and that's not consistence with util/u_uthread.h, this caused it's hard to understand.
Now we change the behavior that's always rely on how meson detecting HAVE_PTHREAD.

So we always disable detecting of threads on Win32 as it's always included in the kernel32 library to
avoid detecting pthreads in mingw.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>

2 years agoutil: Remove the guard WIN32_WINNT >= 0x0600 in u_thread.h
Yonggang Luo [Tue, 6 Sep 2022 09:39:28 +0000 (17:39 +0800)]
util: Remove the guard WIN32_WINNT >= 0x0600 in u_thread.h

We already require Windows Vista or later before this commit;
No need check WIN32_WINNT >= 0x0600

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>

2 years agomeson/mesa/wide: define WIN32_LEAN_AND_MEAN with pre_args
Yonggang Luo [Tue, 6 Sep 2022 09:32:29 +0000 (17:32 +0800)]
meson/mesa/wide: define WIN32_LEAN_AND_MEAN with pre_args

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>

2 years agoc11: Remove the code for Windows XP
Yonggang Luo [Sat, 3 Sep 2022 10:40:26 +0000 (18:40 +0800)]
c11: Remove the code for Windows XP

We already require Windows Vista or later before this commit;
So the code for Windows XP can be removed.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>

2 years agoutil: #include "util/macros.h" in u_cpu_detect.h for ATTRIBUTE_CONST
Yonggang Luo [Sat, 3 Sep 2022 10:13:24 +0000 (18:13 +0800)]
util: #include "util/macros.h" in u_cpu_detect.h for ATTRIBUTE_CONST

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>

2 years agoutil: #include "c11/threads.h" when necessary in simple_mtx.h
Yonggang Luo [Tue, 23 Aug 2022 19:32:57 +0000 (03:32 +0800)]
util: #include "c11/threads.h" when necessary in simple_mtx.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>

2 years agoanv: adding parsetab.py to the .gitignore for grl
Luis Felipe Strano Moraes [Wed, 19 Oct 2022 02:16:14 +0000 (19:16 -0700)]
anv: adding parsetab.py to the .gitignore for grl

This file is autogenerated by python's ply package and is used during
compilation to cache tables built by it for quicker parsing.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19153>

2 years agoanv: added proper handling for input argument in intel_clc
Luis Felipe Strano Moraes [Wed, 19 Oct 2022 00:48:55 +0000 (17:48 -0700)]
anv: added proper handling for input argument in intel_clc

That was previously listed on the getopt_long struct but not actually
being used. This makes intel_clc argument processing easier as now
all of its arguments are handled with getopt and anything after the
special argument '--' is passed along to clang to form the final build
command.

Thanks to Dylan Baker for help with changes to the meson file.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19153>

2 years agoanv: fixing typo on description of output flag for intel_clc
Luis Felipe Strano Moraes [Wed, 19 Oct 2022 00:09:29 +0000 (17:09 -0700)]
anv: fixing typo on description of output flag for intel_clc

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19153>

2 years agoanv: add missing separator to help for intel_clc
Luis Felipe Strano Moraes [Wed, 19 Oct 2022 00:06:52 +0000 (17:06 -0700)]
anv: add missing separator to help for intel_clc

intel_clc relies on the special argument '--' for getopt to be given so
it knows when to start expecting purely input files or clang arguments.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19153>

2 years agoanv: reword info flag in intel_clc's getopt to avoid clash
Luis Felipe Strano Moraes [Wed, 19 Oct 2022 00:01:51 +0000 (17:01 -0700)]
anv: reword info flag in intel_clc's getopt to avoid clash

The info keyword was using the same short description that
was listed for input files on the struct for long_options.

Rewording it to 'v' and 'verbose' to be more in line with
expectations.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19153>

2 years agomesa: Use util_call_once_data instead of mtx_t init_once_lock
Yonggang Luo [Tue, 23 Aug 2022 20:00:04 +0000 (04:00 +0800)]
mesa: Use util_call_once_data instead of mtx_t init_once_lock

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>

2 years agoegl/dri2: Use util_call_once_data to replace usage of mtx_t glFlushMutex
Yonggang Luo [Tue, 23 Aug 2022 20:07:20 +0000 (04:07 +0800)]
egl/dri2: Use util_call_once_data to replace usage of mtx_t glFlushMutex

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>

2 years agoegl/wgl: Use util_call_once_data to replace usage of mtx_t glFlushMutex
Yonggang Luo [Tue, 23 Aug 2022 20:07:00 +0000 (04:07 +0800)]
egl/wgl: Use util_call_once_data to replace usage of mtx_t glFlushMutex

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>

2 years agogallium/auxiliary: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPL...
Yonggang Luo [Tue, 6 Sep 2022 15:02:41 +0000 (23:02 +0800)]
gallium/auxiliary: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_MTX_INITIALIZER

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>

2 years agomapi: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_MTX_INITIAL...
Yonggang Luo [Tue, 6 Sep 2022 15:00:34 +0000 (23:00 +0800)]
mapi: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_MTX_INITIALIZER in stub.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>

2 years agomapi: Use util_call_once to init exec_mem and mutex instead _MTX_INITIALIZER_NP
Yonggang Luo [Mon, 17 Oct 2022 18:36:42 +0000 (02:36 +0800)]
mapi: Use util_call_once to init exec_mem and mutex instead _MTX_INITIALIZER_NP

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>

2 years agoutil: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_M in u_debu...
Yonggang Luo [Tue, 6 Sep 2022 14:15:16 +0000 (22:15 +0800)]
util: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_M in u_debug_refcnt.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>

2 years agoutil: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_MTX_INITIAL...
Yonggang Luo [Tue, 6 Sep 2022 14:12:45 +0000 (22:12 +0800)]
util: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_MTX_INITIALIZER in u_debug_memory.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>

2 years agoutil: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_MTX_INITIAL...
Yonggang Luo [Tue, 6 Sep 2022 14:09:29 +0000 (22:09 +0800)]
util: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_MTX_INITIALIZER in u_debug_stack_android.cpp

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>

2 years agoutil: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_MTX_INITIAL...
Yonggang Luo [Tue, 6 Sep 2022 14:09:05 +0000 (22:09 +0800)]
util: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_MTX_INITIALIZER in u_debug_symbol.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>

2 years agoutil: Call function mtx_init on exit_mutex to replace the usage of _MTX_INITIALIZER_N...
Yonggang Luo [Tue, 6 Sep 2022 13:55:23 +0000 (21:55 +0800)]
util: Call function mtx_init on exit_mutex to replace the usage of _MTX_INITIALIZER_NP in u_queue.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>

2 years agoutil: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_MTX_INITIAL...
Yonggang Luo [Tue, 23 Aug 2022 19:08:48 +0000 (03:08 +0800)]
util: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_MTX_INITIALIZER in u_debug_stack.c

This removed the thread-unsafe function initialize_backtrace_mutex.
And remove the _MTX_INITIALIZER_NP that's doesn't belong to c11

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>

2 years agomeson: add dep_valgrind dependency for 'dxil_compiler'
Yonggang Luo [Thu, 22 Sep 2022 15:59:46 +0000 (23:59 +0800)]
meson: add dep_valgrind dependency for 'dxil_compiler'

The error when include simple_mtx.h in glsl_types.h:
../src/microsoft/compiler/dxil_function.c
In file included from ../src/compiler/glsl_types.h:37,
                 from ../src/compiler/nir_types.h:36,
                 from ../src/compiler/nir/nir.h:44,
                 from ../src/microsoft/compiler/dxil_signature.h:28,
                 from ../src/microsoft/compiler/dxil_module.h:37,
                 from ../src/microsoft/compiler/dxil_function.h:48,
                 from ../src/microsoft/compiler/dxil_function.c:24:
../src/util/simple_mtx.h:37:12: fatal error: valgrind.h: No such file or directory
   37 | #  include <valgrind.h>

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>

2 years agod3d12: Release sharing contract in flush_frontbuffer
Jesse Natalie [Mon, 29 Aug 2022 19:17:37 +0000 (12:17 -0700)]
d3d12: Release sharing contract in flush_frontbuffer

Just a leak I happened to notice.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18305>

2 years agod3d12: Use ID3D12DeviceConfiguration for root signature serialization
Jesse Natalie [Sun, 28 Aug 2022 13:40:23 +0000 (06:40 -0700)]
d3d12: Use ID3D12DeviceConfiguration for root signature serialization

If we were able to create a device factory from a DLL-local D3D12Core,
we want to use that one to do root signature serialization, instead of
going to the globally-configured D3D12Core.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18305>

2 years agod3d12: Attempt to use the Agility SDK
Jesse Natalie [Sun, 28 Aug 2022 13:34:31 +0000 (06:34 -0700)]
d3d12: Attempt to use the Agility SDK

The ideal would be to use a D3D12Core.dll next to the GL DLL, via
ID3D12SDKConfiguration1, but this requires a new D3D12.dll to be
present on the machine, which only very new OSes will currently have.
For older OSes, we can at least try to use ID3D12SDKConfiguration to
set a global Agility SDK override, but that only works in developer
mode and requires the DLL to be at a relative path from the app EXE,
so only try that if we have environment variables telling us to do so.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18305>

2 years agod3d12: Support device factories in addition to global device creation
Jesse Natalie [Sun, 28 Aug 2022 13:32:36 +0000 (06:32 -0700)]
d3d12: Support device factories in addition to global device creation

As explained in a comment, a device factory allows modification of state
like debug layer enablement without touching global state / triggering
device removal on a singleton device, and can even create devices that are
not singletons if the driver supports that.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18305>

2 years agod3d12: Store the d3d12 module reference on the screen
Jesse Natalie [Mon, 29 Aug 2022 19:33:25 +0000 (12:33 -0700)]
d3d12: Store the d3d12 module reference on the screen

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18305>

2 years agod3d12: Move some things from screen late-init to early-init
Jesse Natalie [Mon, 29 Aug 2022 19:32:48 +0000 (12:32 -0700)]
d3d12: Move some things from screen late-init to early-init

The GLSL singleton ref was too late, and we could end up with an un-paired
dec-ref if screen init failed. Also the transfer slab init was in the wrong
init function, so we'd re-init that struct if the screen was re-initialized.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18305>

2 years agodeps: Update DirectX-Headers req to 1.606.4
Jesse Natalie [Wed, 31 Aug 2022 19:32:33 +0000 (12:32 -0700)]
deps: Update DirectX-Headers req to 1.606.4

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18305>

2 years agoanv: enable rayTraversalPrimitiveCulling feature
Iván Briano [Wed, 21 Sep 2022 19:03:28 +0000 (12:03 -0700)]
anv: enable rayTraversalPrimitiveCulling feature

It is mandatory if VK_KHR_ray_query is supported.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19152>

2 years agoanv: support VK_PIPELINE_CREATE_RAY_TRACING_SKIP_*
Iván Briano [Mon, 26 Sep 2022 20:26:36 +0000 (13:26 -0700)]
anv: support VK_PIPELINE_CREATE_RAY_TRACING_SKIP_*

VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR and
VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR, when specified,
make TraceRay behave as if the corresponding shader flags were set, but
without affecting the value of IncomingRayFlags in shaders.

v2 (Lionel): Improve comments

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19152>

2 years agoac/llvm: add missing nir_intrinsic_bindless_image_atomic_{fmin,fmax}
Samuel Pitoiset [Tue, 18 Oct 2022 07:04:19 +0000 (09:04 +0200)]
ac/llvm: add missing nir_intrinsic_bindless_image_atomic_{fmin,fmax}

Fix various atomic operations.

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

2 years agorusticl/api: Interpret `lengths` as a slice of Option<NonZeroUsize>
LingMan [Wed, 5 Oct 2022 21:59:14 +0000 (23:59 +0200)]
rusticl/api: Interpret `lengths` as a slice of Option<NonZeroUsize>

So far `lengths` as been interpreted as a slice of usize. However, 0 is specified as a sentinel
value signalling that the corresponding string is nul terminated. Since checking for sentinel
values is frequently forgotten, Option types should be preferred if possible.

Option<NonZeroUsize> is layout compatible with usize. The None variant is then represented as 0,
which is exaclty what we need here.

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

2 years agorusticl/api: Don't check the program source for nul bytes needlessly
LingMan [Wed, 5 Oct 2022 21:36:53 +0000 (23:36 +0200)]
rusticl/api: Don't check the program source for nul bytes needlessly

At this point we already know that the Vec we've constructed cannot contain a nul byte. Avoid the
needless scan.

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

2 years agorusticl/api: Shrink unsafe block
LingMan [Wed, 5 Oct 2022 21:07:08 +0000 (23:07 +0200)]
rusticl/api: Shrink unsafe block

There's only two unsafe operations left here, so shrink the unsafe block to make them obvious.

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

2 years agorusticl/api: Factor pushing to the Vec out of the if
LingMan [Fri, 7 Oct 2022 17:56:34 +0000 (19:56 +0200)]
rusticl/api: Factor pushing to the Vec out of the if

Both branches do the same here.

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

2 years agorusticl/api: Fix creating a program if a nul byte is within the specified string...
LingMan [Wed, 5 Oct 2022 20:00:56 +0000 (22:00 +0200)]
rusticl/api: Fix creating a program if a nul byte is within the specified string length

The code assumed that if the length of a string was specified and greater than zero, the string
would not contain a nul byte.
Legal or not, there are apparently applications which violate that assumption. Since the spec
doesn't say anything about this case, take the likely most compatible route and treat a nul byte as
terminating the string early.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7408
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18978>

2 years agorusticl/api: Drop UTF-8 conversion of input source
LingMan [Wed, 5 Oct 2022 20:49:44 +0000 (22:49 +0200)]
rusticl/api: Drop UTF-8 conversion of input source

The spec doesn't define any charset for the source code. While the vast majority of inputs are
likely to be ASCII (which a subset of UTF-8), it is better not to make assumptions.
As a nice side effect this should be a minor speedup.

`CString`s can't currently be pushed to, so use a `Vec` as intermediate.

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

2 years agorusticl/api: Use iterators in create_program_with_source
LingMan [Wed, 5 Oct 2022 17:43:22 +0000 (19:43 +0200)]
rusticl/api: Use iterators in create_program_with_source

This replaces several instances of unsafe pointer arithmetic and dereferencing with a single unsafe
creation of a slice, which we then use normal iterators on.
The spec mandates that a null pointer is to be interpreted as if a slice filled with zeros had been
given. That case is represented by an infinite iterator returning only zero.

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

2 years agor300: fix generation of invalid swizzles in regalloc
Pavel Ondračka [Wed, 19 Oct 2022 08:23:11 +0000 (10:23 +0200)]
r300: fix generation of invalid swizzles in regalloc

rc_adjust_channels is inteded for moving the swizzles to a new channels
when rewriting the writemask of an instruction. However for readers one
needs to keep the swizzles in the old channels but rather convert to the
new values, so use the proper helper rc_rewrite_swizzle.

With the new swizzle fixed, we should properly detect that it would be
invalid and thus we can select the proper register class to prevent the
writemask rewrite in the regalloc.

Documentation was added to rc_adjust_channels to make it more clear what
it actually does.

Fixes a bunch of dEQP tests.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7521
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19158>

2 years agonir2dxil: Use native helper lane intrinsic on SM >= 6.6
Pedro J. Estébanez [Wed, 19 Oct 2022 16:33:20 +0000 (18:33 +0200)]
nir2dxil: Use native helper lane intrinsic on SM >= 6.6

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

2 years agoaco: Pre-split result of bvh64_intersect_ray_amd.
Bas Nieuwenhuizen [Tue, 18 Oct 2022 21:56:31 +0000 (23:56 +0200)]
aco: Pre-split result of bvh64_intersect_ray_amd.

Avoids  later moves with extractions from the vector.

Reduces VALU operation in the raytrace loop by ~6%, increasing
the RT performance in Q2RTX on a 6800 XT by about ~1.3%.

Suggested by Georg.

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

2 years agoutil/indicies: convert u_unfilled_gen.py to write a file
Dylan Baker [Wed, 12 Oct 2022 22:25:02 +0000 (15:25 -0700)]
util/indicies: convert u_unfilled_gen.py to write a file

Which avoids meson needing to wrap the generator to capture the output,
and makes it faster

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19058>

2 years agoutil/indicies: use itertools.product in u_unfilled_gen.py
Dylan Baker [Wed, 12 Oct 2022 22:13:19 +0000 (15:13 -0700)]
util/indicies: use itertools.product in u_unfilled_gen.py

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19058>

2 years agoutil/indicies: simplify some of u_indicies_gen.py
Dylan Baker [Wed, 12 Oct 2022 21:54:25 +0000 (14:54 -0700)]
util/indicies: simplify some of u_indicies_gen.py

v2:
  - Give variable more descriptive name to avoid shadowing

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
and avoid shadowing

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

2 years agoutil/indicies: write a file with u_indicies_gen.py
Dylan Baker [Wed, 12 Oct 2022 21:32:01 +0000 (14:32 -0700)]
util/indicies: write a file with u_indicies_gen.py

This avoids meson creating a wrapper to redirect stdout, and makes the
generator faster

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19058>

2 years agoutil/indicies: use itertools.product instead of deeply nested loops
Dylan Baker [Wed, 12 Oct 2022 20:46:07 +0000 (13:46 -0700)]
util/indicies: use itertools.product instead of deeply nested loops

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19058>

2 years agoutil/indicies: move common static functions to private header
Dylan Baker [Tue, 11 Oct 2022 21:08:17 +0000 (14:08 -0700)]
util/indicies: move common static functions to private header

less duplication is good

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19058>

2 years agodocs: Extend calendar entries for 22.2 by 2 releases.
Dylan Baker [Wed, 19 Oct 2022 17:11:43 +0000 (10:11 -0700)]
docs: Extend calendar entries for 22.2 by 2 releases.

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

2 years agodocs: update calendar and link releases notes for 22.2.2
Dylan Baker [Wed, 19 Oct 2022 17:10:41 +0000 (10:10 -0700)]
docs: update calendar and link releases notes for 22.2.2

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

2 years agodocs: Add sha256 sum for 22.2.2
Dylan Baker [Wed, 19 Oct 2022 17:06:27 +0000 (10:06 -0700)]
docs: Add sha256 sum for 22.2.2

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

2 years agodocs: add release notes for 22.2.2
Dylan Baker [Wed, 19 Oct 2022 16:50:22 +0000 (09:50 -0700)]
docs: add release notes for 22.2.2

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

2 years agofrontends/va: fixed an av1 decoding image corruption issue.
Ruijing Dong [Tue, 18 Oct 2022 20:33:42 +0000 (16:33 -0400)]
frontends/va: fixed an av1 decoding image corruption issue.

problem:
When playing back some clips with loop restoration parameters
enabled, the display image could be corrupted.

solution:
correct loop restoration unit size logic in vaapi interface.

CC: 22.2 <mesa-stable>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19146>