platform/upstream/mesa.git
21 months agoasahi: Implement agx_resource_get_param
Asahi Lina [Tue, 8 Nov 2022 15:32:56 +0000 (10:32 -0500)]
asahi: Implement agx_resource_get_param

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

21 months agoasahi: Implement agx_resource_get_handle
Asahi Lina [Tue, 8 Nov 2022 15:31:26 +0000 (10:31 -0500)]
asahi: Implement agx_resource_get_handle

Only useful on Linux.

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

21 months agoasahi: Implement agx_resource_from_handle
Asahi Lina [Tue, 8 Nov 2022 15:31:02 +0000 (10:31 -0500)]
asahi: Implement agx_resource_from_handle

Only used on Linux, but can compile anywhere.

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

21 months agoasahi: Stub import/export code
Asahi Lina [Tue, 8 Nov 2022 15:20:03 +0000 (10:20 -0500)]
asahi: Stub import/export code

It will be used on Linux, and it is convenient to be able to compile the same
code on macOS in the mean time.

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

21 months agoasahi: Implement dmabuf modifier queries
Asahi Lina [Tue, 8 Nov 2022 15:10:12 +0000 (10:10 -0500)]
asahi: Implement dmabuf modifier queries

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

21 months agoasahi: Support XRGB formats
Asahi Lina [Sat, 18 Jun 2022 19:02:24 +0000 (04:02 +0900)]
asahi: Support XRGB formats

Just treat them like ARGB. Not sure if this is sane, but it works for now...

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19606>

21 months agoasahi: Add renderonly to device
Asahi Lina [Tue, 8 Nov 2022 15:06:23 +0000 (10:06 -0500)]
asahi: Add renderonly to device

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

21 months agoasahi: Remove index_bias assert
Alyssa Rosenzweig [Tue, 8 Nov 2022 15:37:13 +0000 (10:37 -0500)]
asahi: Remove index_bias assert

Index bias works okay already, tested against dEQP-GLES31 on agx/next.

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

21 months agoasahi: Localize the modifier #define hack for macOS
Alyssa Rosenzweig [Tue, 8 Nov 2022 22:13:10 +0000 (17:13 -0500)]
asahi: Localize the modifier #define hack for macOS

This reduces the burden of synchronizing the values between Linux and macOS and
provides fewer ways to shoot ourselves in the foot.

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

21 months agoasahi: Use AIL tiling instead of DRM modifiers
Alyssa Rosenzweig [Tue, 8 Nov 2022 22:10:51 +0000 (17:10 -0500)]
asahi: Use AIL tiling instead of DRM modifiers

...for internal parts of the driver that are unrelated to UAPI. This makes the
ail representation canonical and the modifier a mere UAPI detail.

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

21 months agoasahi: Handle synchronized transfers better
Alyssa Rosenzweig [Tue, 8 Nov 2022 16:33:00 +0000 (11:33 -0500)]
asahi: Handle synchronized transfers better

We need to flush the appropriate batch(es in the future) before a synchronized
transfer for correct results. To do so without major performance regressions, we
need to do extra bookkeeping about which batches write which resources. We
already know about reads via the BO list.

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

21 months agoail: Add get_wsi_stride_B helper
Alyssa Rosenzweig [Tue, 8 Nov 2022 16:54:11 +0000 (11:54 -0500)]
ail: Add get_wsi_stride_B helper

Centralize the logic around WSI strides, which are a software convention made
into UAPI rather than something set in silicon.

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

21 months agomeson: Enable SSE4.1 for MSVC
Jesse Natalie [Fri, 3 Jun 2022 14:38:40 +0000 (07:38 -0700)]
meson: Enable SSE4.1 for MSVC

Modern MSVC always supports compiling with the SSE4.1 intrinsics with
no additional command line options, but doesn't have any options for
auto-vectorizing into SSE4.1.

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

21 months agoglsl: Use DETECT_CC_GCC_VERSION in glsl/builtin_functions.cpp
Yonggang Luo [Sun, 13 Nov 2022 02:41:59 +0000 (10:41 +0800)]
glsl: Use DETECT_CC_GCC_VERSION in glsl/builtin_functions.cpp

The expression "(__GNUC__ * 100) + __GNUC_MINOR" is invalid
because __GNUC_MINOR is not defined by the compiler

This can not fixes the previous version because DETECT_CC_GCC_VERSION is not available
in previous released version

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19771>

21 months agoRevert "egl/glx: add fallback for zink loading"
Michel Dänzer [Fri, 11 Nov 2022 15:33:12 +0000 (16:33 +0100)]
Revert "egl/glx: add fallback for zink loading"

This reverts commit 2569215f43f6ce71fb8eb2181b36c6cf976bce2a.

Conflicts:
src/egl/main/eglapi.c
src/glx/glxext.c

It broke the fallback to swrast in some cases where zink can't work.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7333
Fixes: 2569215f43f6 ("egl/glx: add fallback for zink loading")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19681>

21 months agodocs: update calendar and link releases notes for 22.2.4
Dylan Baker [Thu, 17 Nov 2022 00:19:14 +0000 (16:19 -0800)]
docs: update calendar and link releases notes for 22.2.4

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

21 months agodocs: Add sha256 sum for 22.2.4
Dylan Baker [Wed, 16 Nov 2022 23:22:17 +0000 (15:22 -0800)]
docs: Add sha256 sum for 22.2.4

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

21 months agodocs: add release notes for 22.2.4
Dylan Baker [Wed, 16 Nov 2022 23:02:11 +0000 (15:02 -0800)]
docs: add release notes for 22.2.4

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

21 months agodzn: Ensure SRV ResourceMinLODClamp is set to 0.0
Jesse Natalie [Fri, 4 Nov 2022 20:01:08 +0000 (13:01 -0700)]
dzn: Ensure SRV ResourceMinLODClamp is set to 0.0

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

21 months agodzn: Use cube-array views for misaligned cubes
Jesse Natalie [Fri, 4 Nov 2022 17:58:34 +0000 (10:58 -0700)]
dzn: Use cube-array views for misaligned cubes

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

21 months agodzn: Use DEPTH_STENCIL_DESC2 for front/back stencil read/write masks
Jesse Natalie [Fri, 26 Aug 2022 17:14:26 +0000 (10:14 -0700)]
dzn: Use DEPTH_STENCIL_DESC2 for front/back stencil read/write masks

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

21 months agodzn: Use ID3D12GraphicsCommandList8 for front/back stencil ref
Jesse Natalie [Fri, 26 Aug 2022 16:49:52 +0000 (09:49 -0700)]
dzn: Use ID3D12GraphicsCommandList8 for front/back stencil ref

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

21 months agodzn: Get options14
Jesse Natalie [Fri, 26 Aug 2022 17:11:53 +0000 (10:11 -0700)]
dzn: Get options14

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

21 months agodzn: Use CreateCommandList1
Jesse Natalie [Fri, 26 Aug 2022 16:47:17 +0000 (09:47 -0700)]
dzn: Use CreateCommandList1

We don't need to do the command list destroy/re-create dance if the
only reference to an allocator is a *closed* command list. Using
CreateCommandList1 gives us a closed command list to start with,
which better matches the semantics of Vulkan's begin/end for
command buffers.

Now that dzn's cmdbuf reset logic puts the cmdbuf back to the
*initial* state, move the command list reset to BeginCommandBuffer.

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

21 months agodzn: Use common command buffer state tracking
Jesse Natalie [Tue, 15 Nov 2022 23:31:09 +0000 (15:31 -0800)]
dzn: Use common command buffer state tracking

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

21 months agodzn: Upgrade baseline from ID3D12Device2 to 4
Jesse Natalie [Fri, 26 Aug 2022 16:46:33 +0000 (09:46 -0700)]
dzn: Upgrade baseline from ID3D12Device2 to 4

This is pretty old already and we'll want to use CreateCommandList1

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

21 months agomicrosoft/compiler: Emit sampleCmpLevel when needed
Jesse Natalie [Fri, 26 Aug 2022 15:53:46 +0000 (08:53 -0700)]
microsoft/compiler: Emit sampleCmpLevel when needed

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

21 months agogallivm: use masked intrinsics for global and scratch access.
Dave Airlie [Mon, 14 Nov 2022 08:00:10 +0000 (18:00 +1000)]
gallivm: use masked intrinsics for global and scratch access.

This seems to improve luxmark scores for me on the luxball scene
from numbers in the 4-500 range to 5-700 range.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19736>

21 months agoradv/rt: move Ray Tracing shader creation into separate file
Daniel Schürmann [Fri, 4 Nov 2022 12:23:45 +0000 (13:23 +0100)]
radv/rt: move Ray Tracing shader creation into separate file

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

21 months agofrontends/va: set vbv buffer size same as target bitrate in cbr mode
Sajeesh Sidharthan [Fri, 11 Nov 2022 15:17:56 +0000 (07:17 -0800)]
frontends/va: set vbv buffer size same as target bitrate in cbr mode

video buffering verifier (vbv) buffer size must be set same as
target bitrate to achieve constant bitrate.

Signed-off-by: Sajeesh Sidharthan <sajeesh.sidharthan@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Veerabadhran Gopalakrishnan <Veerabadhran.Gopalakrishnan@amd.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19695>

21 months agor300: respect extra presubtract swizzle limitations during regalloc
Pavel Ondračka [Tue, 15 Nov 2022 21:35:05 +0000 (22:35 +0100)]
r300: respect extra presubtract swizzle limitations during regalloc

Regalloc was not aware of the extra limitations and in some cases could
convert native swizzle into non-native.

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

21 months agor300: handle presubtract when rewriting non-native swizzles
Pavel Ondračka [Tue, 15 Nov 2022 20:50:51 +0000 (21:50 +0100)]
r300: handle presubtract when rewriting non-native swizzles

The extra presubtract limitations were completelly ignored.
Fixes 4 dEQP asin and atan tests.

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

21 months agor300: don't allow constant swizzles from presubtract sources
Pavel Ondračka [Tue, 15 Nov 2022 21:35:32 +0000 (22:35 +0100)]
r300: don't allow constant swizzles from presubtract sources

It is not possible to rewrite it to a native swizzle later on R300/R400.

The way the native rewrite currently works, it will create bunch of
movs with the given presubtract and partial swizzles, however no
constant swizzle for presubtract source exists so it is just not
possible to rewrite it.

This prevents an infinite loop in supertuxkart shader when we really
start enforcing the presubtract swizzle limitations during native
swizzle rewrite in the next commit.

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

21 months agor300: be more careful with presubtract and non-native swizzles
Pavel Ondračka [Tue, 15 Nov 2022 15:43:25 +0000 (16:43 +0100)]
r300: be more careful with presubtract and non-native swizzles

The problematic scenario is when we have the same source used by both
normal and presubtract argument. We check that case currently and count
the source only once. However if one of the arguments uses a non-native
swizzle, we have to rewrite it later and the source changes. Therefore
we end with too many sources and fail later during pair translation.

Example:
ADD temp[21].xy, temp[20].xy__, temp[17].xy__;
MAD temp[22].xy, temp[17].zw__, temp[11].xy__, temp[21].xy__;

will get converted to

MAD temp[22].xy, temp[17].zw__, temp[11].xy__, (temp[17] + temp[20]).xy__;

however after dataflow swizzles pass we end with

MOV temp[3].x, temp[17].z___;
MOV temp[3].y, temp[17]._w__;
MAD temp[22].xy, temp[3].xy__, temp[11].xy__, (temp[17] + temp[20]).xy__;

Just skip the "don't count the same source twice" optimization when a
non-native swizzle is used to fix 2 dEQP atan2 tests.

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

21 months agoutil: include sys/time.h for timespec functions
Jonathan Gray [Tue, 15 Nov 2022 04:20:57 +0000 (15:20 +1100)]
util: include sys/time.h for timespec functions

When the futex code moved it removed an include which broke the build
on OpenBSD.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 095dfc6caa2 ("util: Move the implementation of futex_wake and futex_wait from futex.h to futex.c")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19735>

21 months agoaco: fix dual source blending on GFX11
Samuel Pitoiset [Wed, 16 Nov 2022 14:19:32 +0000 (15:19 +0100)]
aco: fix dual source blending on GFX11

Assembly looks similar to LLVM.

Cc: 22.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19643>

21 months agoaco: add p_dual_src_export_gfx11 for dual source blending on GFX11
Samuel Pitoiset [Wed, 16 Nov 2022 14:18:54 +0000 (15:18 +0100)]
aco: add p_dual_src_export_gfx11 for dual source blending on GFX11

Dual source blending must be in strict WQM mode.

Cc: 22.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19643>

21 months agodzn: add triangle_strip flake
David Heidelberg [Wed, 16 Nov 2022 13:23:16 +0000 (14:23 +0100)]
dzn: add triangle_strip flake

Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7672

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19782>

21 months agor600/sfn: Fix location for reading cube array image dimensions
Gert Wollny [Tue, 15 Nov 2022 11:50:00 +0000 (12:50 +0100)]
r600/sfn: Fix location for reading cube array image dimensions

Fixes: 79ca456b4837b3bc21cf9ef3c03c505c4b4909f6
        r600/sfn: rewrite NIR backend

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

21 months agor600/sfn: set finalize_nir after reading debug flags
Gert Wollny [Tue, 15 Nov 2022 11:03:22 +0000 (12:03 +0100)]
r600/sfn: set finalize_nir after reading debug flags

Fixes: a81c50a21447a95e05f73badf6e4e7bfe734f7a8 (upstream/main)
    r600/sfn: implement finalize_nir

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

21 months agor600/sfn: Honor shader key w.r.t. atomic counter layout
Gert Wollny [Tue, 15 Nov 2022 10:48:24 +0000 (11:48 +0100)]
r600/sfn: Honor shader key w.r.t. atomic counter layout

Fixes: 79ca456b4837b3bc21cf9ef3c03c505c4b4909f6
        r600/sfn: rewrite NIR backend

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

21 months agoaco: Combine v_cvt_u32_f32 with insert to v_cvt_pk_u8_f32.
Georg Lehmann [Thu, 8 Sep 2022 09:24:27 +0000 (11:24 +0200)]
aco: Combine v_cvt_u32_f32 with insert to v_cvt_pk_u8_f32.

No Foz-DB difference on Navi21.

Foz-DB GFX11:
Totals from 746 (0.55% of 134913) affected shaders:
CodeSize: 8430248 -> 8416128 (-0.17%); split: -0.17%, +0.00%
Instrs: 1617202 -> 1614707 (-0.15%)
Latency: 13943398 -> 13934161 (-0.07%); split: -0.07%, +0.00%
InvThroughput: 2601620 -> 2596624 (-0.19%); split: -0.20%, +0.01%
Copies: 114346 -> 114334 (-0.01%); split: -0.01%, +0.00%
PreVGPRs: 48314 -> 48312 (-0.00%)

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18492>

21 months agoaco: fix missing SCC for p_interp_gfx11 in emit_interp_mov_instr()
Samuel Pitoiset [Wed, 16 Nov 2022 10:20:22 +0000 (11:20 +0100)]
aco: fix missing SCC for p_interp_gfx11 in emit_interp_mov_instr()

Fixes: 369c9b64252 ("aco: fix p_interp_gfx11 to not overwrite SCC")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19777>

21 months agopanfrost: Use PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY
Alyssa Rosenzweig [Mon, 31 Oct 2022 01:24:34 +0000 (21:24 -0400)]
panfrost: Use PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY

..instead of 4BYTE_ALIGNED_ONLY. This is more correct and avoids
needless repacking. Noticed in Firefox, which was hitting the vbuf
translate path.

Fixes: e03622e50fc ("panfrost: Set STRIDE_4BYTE_ALIGNED_ONLY")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19761>

21 months agopanfrost: Fix reference counting with batch->resources
Alyssa Rosenzweig [Tue, 15 Nov 2022 16:16:15 +0000 (11:16 -0500)]
panfrost: Fix reference counting with batch->resources

Refactor accesses to batch->resources to happen through safe helpers
that update the appropriate bookkeeping. This makes it obvious that (in
particular) reference counts are updated when they should be.

The functional change is that we are now correctly unreferencing
resources during shadowing, fixing a leak of shadowed resources.

Closes: #7362
Fixes: 2d8f28df731 ("panfrost: Replace resource shadowing flush")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-by: Mastodon, apparently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19753>

21 months agoci: improve run-shader-db and add r300 testing
Pavel Ondračka [Mon, 2 May 2022 18:54:08 +0000 (20:54 +0200)]
ci: improve run-shader-db and add r300 testing

Original author of r300 patch: Pavel Ondračka <pavel.ondracka@gmail.com>

Co-author: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19692>

21 months agor300: use drm_shim_override
David Heidelberg [Mon, 14 Nov 2022 21:16:35 +0000 (22:16 +0100)]
r300: use drm_shim_override

Acked-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19692>

21 months agoci/build: bump LLVM to 13 for debian-build-testing
David Heidelberg [Fri, 11 Nov 2022 20:07:40 +0000 (21:07 +0100)]
ci/build: bump LLVM to 13 for debian-build-testing

Acked-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19692>

21 months agomeson: build radeon drm-shim also for r300 and r600
Pavel Ondračka [Tue, 3 May 2022 06:17:57 +0000 (08:17 +0200)]
meson: build radeon drm-shim also for r300 and r600

Right now the drm-shim is build only when one also builds radeonsi
or radv.

Acked-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19692>

21 months agoturnip: Enable EXT_swapchain_colorspace
Joshua Ashton [Mon, 14 Nov 2022 12:18:58 +0000 (12:18 +0000)]
turnip: Enable EXT_swapchain_colorspace

This extension is basically a no-op exposing some new enums.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19726>

21 months agoanv: Enable EXT_swapchain_colorspace
Joshua Ashton [Mon, 14 Nov 2022 12:18:26 +0000 (12:18 +0000)]
anv: Enable EXT_swapchain_colorspace

This extension is basically a no-op exposing some new enums.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19726>

21 months agoradv: Enable EXT_swapchain_colorspace
Joshua Ashton [Mon, 14 Nov 2022 12:04:03 +0000 (12:04 +0000)]
radv: Enable EXT_swapchain_colorspace

This extension is basically a no-op exposing some new enums.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19726>

21 months agowsi/display: Refactor available_surface_formats structure
Joshua Ashton [Mon, 14 Nov 2022 11:42:18 +0000 (11:42 +0000)]
wsi/display: Refactor available_surface_formats structure

Pack the VkSurfaceFormatKHR in here so we can expose formats +
color spaces in one.

This will be needed for exposing HDR color spaces such as
VK_COLOR_SPACE_HDR10_ST2084_EXT.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19726>

21 months agoiris: Destroy batch contexts in a single place
José Roberto de Souza [Fri, 11 Nov 2022 16:04:31 +0000 (08:04 -0800)]
iris: Destroy batch contexts in a single place

While at it also moving has_engines_context to iris_context, no need
to have this information replicated into every iris_batch.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19687>

21 months agoiris: Set priority for replaced engine context
José Roberto de Souza [Fri, 11 Nov 2022 19:01:25 +0000 (11:01 -0800)]
iris: Set priority for replaced engine context

The replace_kernel_ctx() code path was not setting back the context
priority.

Fixes: 5c4c8bdc4c54 ("iris/batch: Add support for engines contexts")
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19687>

21 months agopvr: Fix valgrind issue on compute job submissions
Matt Coster [Wed, 17 Aug 2022 08:43:48 +0000 (09:43 +0100)]
pvr: Fix valgrind issue on compute job submissions

When no flags are set, submit_info->flags is uninitialized. This is not
a problem in the render codepath as the equivalent submit_info is
zeroed before being filled in.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19740>

21 months agoradv: emit PA_SU_PRIM_FILTER_CNTL in the graphics preamble
Samuel Pitoiset [Thu, 10 Nov 2022 16:54:43 +0000 (17:54 +0100)]
radv: emit PA_SU_PRIM_FILTER_CNTL in the graphics preamble

This register doesn't change.

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

21 months agoradv: determine if sample positions are needed at pipeline bind time
Samuel Pitoiset [Tue, 8 Nov 2022 10:28:36 +0000 (11:28 +0100)]
radv: determine if sample positions are needed at pipeline bind time

Like other ring stuff that depends on pipelines.

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

21 months agoradv: simplify load_sample_mask_in lowering
Samuel Pitoiset [Thu, 10 Nov 2022 16:19:19 +0000 (17:19 +0100)]
radv: simplify load_sample_mask_in lowering

From the Vulkan spec:
    "Sample shading is enabled if at least one of the following
     conditions is true:

     - VkPipelineMultisampleStateCreateInfo::sampleShadingEnable is
       set to VK_TRUE, or
     - the fragment shader’s entry point interface includes input
       variables decorated with a BuiltIn of SampleId or SamplePosition
       built-ins."

We don't need to pass the number of rasterization samples, checking
for sample shading is enough. This will help for dynamic rasterization
samples.

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

21 months agoetnaviv: rs: set TS_MODE for inplace resolve
Lucas Stach [Tue, 15 Nov 2022 16:30:22 +0000 (17:30 +0100)]
etnaviv: rs: set TS_MODE for inplace resolve

When using the inplace resolve the TS_MODE isn't taken from the
RS_SOURCE_STRIDE state, but need to be set in RS_EXTRA_CONFIG.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19751>

21 months agoetnaviv: update headers from rnndb
Lucas Stach [Tue, 15 Nov 2022 16:28:39 +0000 (17:28 +0100)]
etnaviv: update headers from rnndb

Update to etna_viv commit 59403372cb48.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19751>

21 months agoetnaviv: don't select TS modifier when not FAST_CLEAR capable
Lucas Stach [Tue, 15 Nov 2022 16:24:56 +0000 (17:24 +0100)]
etnaviv: don't select TS modifier when not FAST_CLEAR capable

When presented with a list of modifiers to choose from we must never
pick a shared TS modifier if the local instance isn't FAST_CLEAR capable.

Fixes: c2b06e1a3820 ("etnaviv: add support for sharing the TS buffer")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19751>

21 months agoradv/ci: mark the whole texturequerylod subtests as flakes on renoir
Martin Roukala (né Peres) [Tue, 15 Nov 2022 10:49:53 +0000 (12:49 +0200)]
radv/ci: mark the whole texturequerylod subtests as flakes on renoir

Seems like we keep on getting more of these flakes, so let's be a bit
broader.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19742>

21 months agogallium/pipe: Trim trailing spaces in src/gallium/include/pipe/*.h
Yonggang Luo [Sat, 5 Nov 2022 06:44:12 +0000 (14:44 +0800)]
gallium/pipe: Trim trailing spaces in src/gallium/include/pipe/*.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19545>

21 months agoci: Drop a couple of -Werror exceptions from fedora-release job
Michel Dänzer [Tue, 15 Nov 2022 10:59:54 +0000 (11:59 +0100)]
ci: Drop a couple of -Werror exceptions from fedora-release job

No corresponding warnings left.

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

21 months agoci: Drop -Wno-error=unused-const-variable from debian-clang job
Michel Dänzer [Tue, 15 Nov 2022 10:57:26 +0000 (11:57 +0100)]
ci: Drop -Wno-error=unused-const-variable from debian-clang job

No corresponding warnings left.

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

21 months agoci: Drop a couple of -Werror exceptions from debian-android job
Michel Dänzer [Tue, 15 Nov 2022 10:55:22 +0000 (11:55 +0100)]
ci: Drop a couple of -Werror exceptions from debian-android job

No corresponding warnings left.

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

21 months agoradv: rework how vertex buffer descriptors are flushed
Samuel Pitoiset [Mon, 14 Nov 2022 10:38:12 +0000 (11:38 +0100)]
radv: rework how vertex buffer descriptors are flushed

Dirty the flag at pipeline bind time, instead of passing this useless
pipeline_is_dirty flag.

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

21 months agoradv: use more radv_dynamic_state pointers in radv_emit_XXX() helpers
Samuel Pitoiset [Tue, 8 Nov 2022 08:52:20 +0000 (09:52 +0100)]
radv: use more radv_dynamic_state pointers in radv_emit_XXX() helpers

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

21 months agoradv: cleanup radv_emit_viewport()
Samuel Pitoiset [Tue, 8 Nov 2022 08:49:50 +0000 (09:49 +0100)]
radv: cleanup radv_emit_viewport()

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

21 months agoradv: constify more pointers in radv_emit_XXX() helpers
Samuel Pitoiset [Tue, 8 Nov 2022 08:43:01 +0000 (09:43 +0100)]
radv: constify more pointers in radv_emit_XXX() helpers

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

21 months agoradv: cleanup radv_CmdSetXXX() functions
Samuel Pitoiset [Tue, 8 Nov 2022 08:35:04 +0000 (09:35 +0100)]
radv: cleanup radv_CmdSetXXX() functions

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

21 months agoaco: adjust an assertion about nir_texop_txf_ms and GFX11
Samuel Pitoiset [Wed, 9 Nov 2022 09:46:30 +0000 (10:46 +0100)]
aco: adjust an assertion about nir_texop_txf_ms and GFX11

This can fail with RADV_DEBUG=nofmask.

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

21 months agoradv: introduce RADV_DEBUG=nofmask
Samuel Pitoiset [Tue, 8 Nov 2022 14:09:02 +0000 (15:09 +0100)]
radv: introduce RADV_DEBUG=nofmask

To disable MSAA compression on MSAA images. This will also allow us to
emulate GFX11 (FMASK has been removed) and to experiment 32 byte
descriptor sizes.

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

21 months agoci: Add va frontend to windows-build-rules
Sil Vilerino [Tue, 15 Nov 2022 22:59:30 +0000 (17:59 -0500)]
ci: Add va frontend to windows-build-rules

Fixes: 2d504bc5 ("CI: Add gallium-va and video-codecs in windows-vs2019 and debian-mingw32-x86_64")

Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19767>

21 months agofreedreno/a6xx: Fix dummy binning pass FS shader
Rob Clark [Sun, 13 Nov 2022 21:30:55 +0000 (13:30 -0800)]
freedreno/a6xx: Fix dummy binning pass FS shader

No changes, but it looks funning to see in the binning pass that FS uses
r0 and hr0.

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

21 months agofreedreno/a6xx: Un-open-code some event names
Rob Clark [Sun, 13 Nov 2022 21:29:50 +0000 (13:29 -0800)]
freedreno/a6xx: Un-open-code some event names

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

21 months agofreedreno/a6xx: Don't disable LRZ for invalid channels
Rob Clark [Sun, 13 Nov 2022 16:35:54 +0000 (08:35 -0800)]
freedreno/a6xx: Don't disable LRZ for invalid channels

Similar idea to commit ("c9db71c8ba1 turnip: Don't disable LRZ for color
write mask channels beyond the format's"), but different implementation.
If the blend state masks writes to a color channel that doesn't exist,
that doesn't mean we need to disable LRZ write.  In particular, this
scenario will come up with z-prepasses (doh!)

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

21 months agofreedreno/a6xx: Improve LRZ test for stencil write
Rob Clark [Sat, 12 Nov 2022 20:49:15 +0000 (12:49 -0800)]
freedreno/a6xx: Improve LRZ test for stencil write

If all the ops are KEEP, we don't actually write the stencil, and can
avoid falling off the LRZ fastpath.

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

21 months agofreedreno/a6xx: Use same LRZ state for draw and binning
Rob Clark [Sat, 12 Nov 2022 20:24:51 +0000 (12:24 -0800)]
freedreno/a6xx: Use same LRZ state for draw and binning

Originally these where split as that is what the blob GL driver did (at
least at the time).  But that turns out to be unnecessary, so simplify
things and combine them into a single LRZ state object like tu does.

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

21 months agofreedreno/a6xx: Handle additional depth test funcs
Rob Clark [Sat, 12 Nov 2022 19:48:52 +0000 (11:48 -0800)]
freedreno/a6xx: Handle additional depth test funcs

These were left as a TODO, and we forgot to revisit.

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

21 months agofreedreno/drm: Fix suballoc alignment
Rob Clark [Sat, 12 Nov 2022 23:34:08 +0000 (15:34 -0800)]
freedreno/drm: Fix suballoc alignment

IBO/etc descriptors need to be aligned to 64.. this was handled
correctly in the stateobj case (for tex descriptors) but not in
the streaming case (for IBO).

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

21 months agopanfrost: Don't set job_barrier on vertex jobs
Alyssa Rosenzweig [Sat, 29 Oct 2022 20:41:05 +0000 (16:41 -0400)]
panfrost: Don't set job_barrier on vertex jobs

This was a hack needed for the old transform feedback code. This barrier
is handled by the explicit XFB emulation that we're using on Midgard
now, so we don't need the barrier in the general case.

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

21 months agor300: tweak nir loop unrolling hint for r500 vertex shaders
Pavel Ondračka [Sat, 12 Nov 2022 19:48:47 +0000 (20:48 +0100)]
r300: tweak nir loop unrolling hint for r500 vertex shaders

This should prevent some cxbx-r shaders from unrolling above the
instruction limit and results in 3 gained cxbx-r shaders on RV530
with no other changes in shader-db.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5967

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

21 months agofreedreno: Add one flake
Yonggang Luo [Tue, 15 Nov 2022 19:40:34 +0000 (03:40 +0800)]
freedreno: Add one flake

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7713

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19759>

21 months agoglsl: Drop borrow/carry lowerings in favor of nir
M Henning [Sat, 12 Nov 2022 20:53:30 +0000 (15:53 -0500)]
glsl: Drop borrow/carry lowerings in favor of nir

Unconditionally lowering prevents GL drivers from natively
implementing these ops. Drivers that need lowering should set
lower_uadd_carry and lower_usub_borrow on nir_shader_compiler_options to
get the nir lowerings.

Tested with dEQP-GLES31.functional.shaders.builtin_functions.integer.*

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19704>

21 months agopps: make pps-producer RT only on freedreno
Chia-I Wu [Fri, 11 Nov 2022 01:45:28 +0000 (17:45 -0800)]
pps: make pps-producer RT only on freedreno

Calling sched_setscheduler twice every sample period has high CPU
overhead.  For intel and panfrost, their dump_perfcnt is preemptible and
they don't need the scheduler change.

For freedreno, simply makes the main thread RT at all time.  This solves
most of the cpu overhead issue.

v2: removed pthread_t param and just change the scheduler for the
    calling thread

Acked-by: Rob Clark <robdclark@chromium.org> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19668>

21 months agoutil: Include the needed util/detect*.h headers in multiple files
Yonggang Luo [Fri, 11 Nov 2022 11:40:28 +0000 (19:40 +0800)]
util: Include the needed util/detect*.h headers in multiple files

This is discovered either by manually or -W-no-def option

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>

21 months agoutil: Remove the unused PIPE_(ARCH|OS|CC) macro defines from src/util/detect_arch...
Yonggang Luo [Fri, 11 Nov 2022 11:15:27 +0000 (19:15 +0800)]
util: Remove the unused PIPE_(ARCH|OS|CC) macro defines from src/util/detect_arch.h and src/util/detect_cc.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>

21 months agotree-wide: Convert all usage of PIPE_(OS|ARCH|CC)_* to DETECT_(OS|ARCH|CC)_* by use...
Yonggang Luo [Fri, 11 Nov 2022 11:04:14 +0000 (19:04 +0800)]
tree-wide: Convert all usage of PIPE_(OS|ARCH|CC)_* to DETECT_(OS|ARCH|CC)_* by use grep

This should be the last commit, and should be take care that can only in comment block or
version
Exclude files:
src/util/detect_*.h

From:
PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)
To:
DETECT_$1_$2

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>

21 months agotree-wide: Convert all usage of #ifndef PIPE_(OS|ARCH|CC)_* to #if DETECT_(OS|ARCH...
Yonggang Luo [Fri, 11 Nov 2022 11:01:06 +0000 (19:01 +0800)]
tree-wide: Convert all usage of #ifndef PIPE_(OS|ARCH|CC)_* to #if DETECT_(OS|ARCH|CC)_* by use grep

From:
#ifndef[\s]+PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)
To:
#if !DETECT_$1_$2

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>

21 months agotree-wide: Convert all usage of #ifdef PIPE_(OS|ARCH|CC)_* to #if DETECT_(OS|ARCH...
Yonggang Luo [Fri, 11 Nov 2022 11:00:31 +0000 (19:00 +0800)]
tree-wide: Convert all usage of #ifdef PIPE_(OS|ARCH|CC)_* to #if DETECT_(OS|ARCH|CC)_* by use grep

From:
#ifdef[\s]+PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)
To:
#if DETECT_$1_$2

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>

21 months agotree-wide: Convert all usage of defined PIPE_(OS|ARCH|CC)_* to DETECT_(OS|ARCH|CC...
Yonggang Luo [Fri, 11 Nov 2022 10:59:55 +0000 (18:59 +0800)]
tree-wide: Convert all usage of defined PIPE_(OS|ARCH|CC)_* to DETECT_(OS|ARCH|CC)_* by use grep

From:
defined[\s]*PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)
To:
DETECT_$1_$2

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>

21 months agotree-wide: Convert all usage of defined(PIPE_(OS|ARCH|CC)_*) to DETECT_(OS|ARCH|CC...
Yonggang Luo [Fri, 11 Nov 2022 10:59:21 +0000 (18:59 +0800)]
tree-wide: Convert all usage of defined(PIPE_(OS|ARCH|CC)_*) to DETECT_(OS|ARCH|CC)_* by use grep

From:
defined[\s]*\([\s]*PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)[\s]*\)
To:
DETECT_$1_$2

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>

21 months agoutil: Add DETECT_ARCH_* and DETECT_CC_* macros for latter usage
Yonggang Luo [Thu, 10 Nov 2022 17:06:36 +0000 (01:06 +0800)]
util: Add DETECT_ARCH_* and DETECT_CC_* macros for latter usage

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>

21 months agoutil: Move compiler configuration defines from detect_arch.h into detect_cc.h
Yonggang Luo [Thu, 10 Nov 2022 06:14:10 +0000 (14:14 +0800)]
util: Move compiler configuration defines from detect_arch.h into detect_cc.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>

21 months agoutil: Rename src/gallium/include/pipe/p_config.h to src/util/detect_arch.h
Yonggang Luo [Wed, 9 Nov 2022 07:00:37 +0000 (15:00 +0800)]
util: Rename src/gallium/include/pipe/p_config.h to src/util/detect_arch.h

Even though the defines in p_config.h are stared with PIPE_, they are indeed
are generic detecting mechanics, we will rename them to DETECT_* in latter MR

We rename src/gallium/include/pipe/p_config.h src/util/detect_arch.h because
the detect code in src/gallium/include/pipe/p_config.h are most about
processor architecture detecting.

The file util/detect.h is added to replace functional of src/gallium/include/pipe/p_config.h
So we replace of #include "pipe/p_config.h" with #include "util/detect.h"

The file util/detect_cc.h is added as a placeholder for moving compiler related macro defines
from p_config.h into it in following commits

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>

21 months agoutil: Test __PPC64__ for getting PIPE_ARCH_PPC_64 respond to __PPC64__ take effect
Yonggang Luo [Sun, 6 Nov 2022 12:34:28 +0000 (20:34 +0800)]
util: Test __PPC64__ for getting PIPE_ARCH_PPC_64 respond to __PPC64__ take effect

Fixes: e737a99a6fb ("Fix PPC detection on darwin")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>

21 months agofrontend/va: Fix WIN32 VA_DRIVER_INIT_FUNC declaration. Remove declspec as it uses...
Sil Vilerino [Tue, 15 Nov 2022 17:04:19 +0000 (12:04 -0500)]
frontend/va: Fix WIN32 VA_DRIVER_INIT_FUNC declaration. Remove declspec as it uses .def file

Fixes: b557ceb7 ("frontends/va: Add windows VA frontend support via vl_winsys_win32 and libva-win32")
Closes: #7702

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

21 months agoutil: Add test for util_get_process_name_may_override
Yonggang Luo [Thu, 10 Nov 2022 16:16:52 +0000 (00:16 +0800)]
util: Add test for util_get_process_name_may_override

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19645>