platform/upstream/mesa.git
16 months agoradv: add DI_PT_RECTLIST to si_conv_prim_to_gs_out()
Samuel Pitoiset [Mon, 27 Mar 2023 10:28:11 +0000 (12:28 +0200)]
radv: add DI_PT_RECTLIST to si_conv_prim_to_gs_out()

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

16 months agoaco: fix p_interp_gfx11 comment
Georg Lehmann [Fri, 24 Mar 2023 12:45:16 +0000 (13:45 +0100)]
aco: fix p_interp_gfx11 comment

It no longer uses a tmp exec and scc.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22107>

16 months agoaco: don't check usesModifiers for pseudo instructions
Georg Lehmann [Fri, 24 Mar 2023 12:41:11 +0000 (13:41 +0100)]
aco: don't check usesModifiers for pseudo instructions

This can't happen.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22106>

16 months agoetnaviv: fix texture barrier implementation
Lucas Stach [Fri, 17 Mar 2023 16:25:11 +0000 (17:25 +0100)]
etnaviv: fix texture barrier implementation

The current implementation has a number of issues:
- it doesn't flush the depth cache, even though this can also be changed
  due to fragment shader operations and thus is included in the definition
  of glTextureBarrier
- it doesn't flush the vertex sampler cache
- it doesn't stall the pipeline until the flushes are done

Fix those issues and drop the comment, as it's pretty clear from the
code what is being done.

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

16 months agoetnaviv: flush VS texture cache when texture data is changed
Lucas Stach [Tue, 7 Mar 2023 20:02:44 +0000 (21:02 +0100)]
etnaviv: flush VS texture cache when texture data is changed

If a sampler resource is changed the vertex texture caches also need to
be flushed, as those are separate from the fragment texture caches.

It seems that some cores need the VS sampler cache flush to be in a
separate state. I have seen no adverse effects of merging the TEXTUREVS
flush into a single flush state emission on GC3000 and up, but the blob
always emits the vertex sampler cache flush as a separate state, so do
the same here to avoid nasty surprises.

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

16 months agodocs/freedreno: fix turnip-heading level
Erik Faye-Lund [Thu, 16 Mar 2023 08:01:40 +0000 (09:01 +0100)]
docs/freedreno: fix turnip-heading level

Having two top-level headings in an article confuses Sphinx, and makes
both appear as separate articles in the toc-tree.

It doesn't seem like there's a good reason why the following headings
should be nested under the "Turnip"-heading anyway, so let's just make
it a sibling to the "Hardware architecture" heading.

Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21948>

16 months agoradv: separate the sample shading state between FS and graphics pipeline
Samuel Pitoiset [Fri, 24 Mar 2023 13:26:20 +0000 (14:26 +0100)]
radv: separate the sample shading state between FS and graphics pipeline

Sample shading can be enabled inside the fragment shader and also
per-pipeline. Separate both cases to be able to enable sample shading
by only binding a FS.

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

16 months agoradv: move uses_user_sample_locations to radv_multisample_state
Samuel Pitoiset [Wed, 22 Mar 2023 15:19:04 +0000 (16:19 +0100)]
radv: move uses_user_sample_locations to radv_multisample_state

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

16 months agoradv: copy the multisample state to radv_cmd_state
Samuel Pitoiset [Fri, 24 Mar 2023 13:15:26 +0000 (14:15 +0100)]
radv: copy the multisample state to radv_cmd_state

To avoid relying on the pipeline.

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

16 months agoamd: Add radv_foreach_stage to ForEachMacros.
Tatsuyuki Ishi [Thu, 23 Mar 2023 13:40:48 +0000 (22:40 +0900)]
amd: Add radv_foreach_stage to ForEachMacros.

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

16 months agoanv,hasvk: remove stale comments
Marcin Ślusarz [Fri, 24 Mar 2023 16:54:15 +0000 (17:54 +0100)]
anv,hasvk: remove stale comments

Added in 060a6434eca9fb05ca2dfd612f8abd4786ee4549.
The field it described was removed in c1f4343807d1040bd7b5440aa2f5fccf5f12842d.

Fixes: c1f4343807d ("anv: Set up memory types and heaps during physical device init")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22113>

16 months agoradv: move radv_meta_* to a new folder
Samuel Pitoiset [Tue, 21 Mar 2023 07:32:14 +0000 (08:32 +0100)]
radv: move radv_meta_* to a new folder

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

16 months agoci/broadcom: test occasionally fails, but typically passes
David Heidelberg [Mon, 27 Mar 2023 00:08:46 +0000 (02:08 +0200)]
ci/broadcom: test occasionally fails, but typically passes

Flake still present.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22125>

16 months agodocs: prefer http-links over ftp
Erik Faye-Lund [Mon, 20 Mar 2023 19:00:37 +0000 (20:00 +0100)]
docs: prefer http-links over ftp

None of the major browsers supports FTP links. While it's fine to have
FTP links as alternatives, let's change these links into HTTP links
instead.

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

16 months agoCODEOWNERS: s/jekstrand/gfxstrand
Faith Ekstrand [Sat, 25 Mar 2023 21:23:53 +0000 (16:23 -0500)]
CODEOWNERS: s/jekstrand/gfxstrand

My gitlab handle changed, update to the right one.

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

16 months agoutil: Update some copyright tags
Faith Ekstrand [Sat, 25 Mar 2023 21:22:50 +0000 (16:22 -0500)]
util: Update some copyright tags

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

16 months agovulkan: vk_android.c should be copyright Intel
Faith Ekstrand [Sat, 25 Mar 2023 22:58:05 +0000 (17:58 -0500)]
vulkan: vk_android.c should be copyright Intel

That's where I copied+pasted it from.

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

16 months agoutil,mesa,panfrost: Drop some author tags
Faith Ekstrand [Sat, 25 Mar 2023 21:21:41 +0000 (16:21 -0500)]
util,mesa,panfrost: Drop some author tags

This is what git blame is for

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

16 months agointel: Drop some author comments and update Faith's name
Faith Ekstrand [Sat, 25 Mar 2023 21:21:11 +0000 (16:21 -0500)]
intel: Drop some author comments and update Faith's name

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

16 months agospirv: Drop a bunch of Authors tags
Faith Ekstrand [Sat, 25 Mar 2023 18:11:34 +0000 (13:11 -0500)]
spirv: Drop a bunch of Authors tags

This is what git blame is for

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

16 months agonir: Drop a bunch of Authors tags
Faith Ekstrand [Sat, 25 Mar 2023 18:11:16 +0000 (13:11 -0500)]
nir: Drop a bunch of Authors tags

This is what git blame is for.

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

16 months agodocs: Fix Faith's name in relnotes
Faith Ekstrand [Sat, 25 Mar 2023 18:04:32 +0000 (13:04 -0500)]
docs: Fix Faith's name in relnotes

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

16 months agointel/blorp: Drop the TODO file
Faith Ekstrand [Sat, 25 Mar 2023 18:03:15 +0000 (13:03 -0500)]
intel/blorp: Drop the TODO file

Most of this stuff is done.

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

16 months agoac/surface,radv: Opt out of stencil adjust.
Bas Nieuwenhuizen [Mon, 13 Mar 2023 01:18:03 +0000 (02:18 +0100)]
ac/surface,radv: Opt out of stencil adjust.

We never implemented it, and having broken mipmaps works out better
for applications and CTS. Actually implementing stencil adjust is
going to be a major pain due to stuff like the GENERAL layout.

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

16 months agoac/surface: Only allow stencil pitch adjustment for mipmaps.
Bas Nieuwenhuizen [Mon, 13 Mar 2023 01:12:02 +0000 (02:12 +0100)]
ac/surface: Only allow stencil pitch adjustment for mipmaps.

Otherwise we can just have addrlib do the depth pitch adjustment
and have no copies.

v2: update CI expectations (olv)

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

16 months agoac/surface,radv: Avoid pitch weirdness if image not used for rendertarget.
Bas Nieuwenhuizen [Mon, 13 Mar 2023 01:09:17 +0000 (02:09 +0100)]
ac/surface,radv: Avoid pitch weirdness if image not used for rendertarget.

Literally no point to it.

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

16 months agofreedreno/registers: Add control reg for zap fw base
Rob Clark [Mon, 6 Mar 2023 23:16:05 +0000 (15:16 -0800)]
freedreno/registers: Add control reg for zap fw base

The zap shader knows the offset of the embedded shader within the zap
sqe instructions, but uses this control reg to get it's own address in
memory, in order to calculate the address of the compute shader part of
the zap shader.

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

16 months agofreedreno/afuc: Add raw mode for disasm
Rob Clark [Mon, 6 Mar 2023 23:14:16 +0000 (15:14 -0800)]
freedreno/afuc: Add raw mode for disasm

Add a mode which doesn't try to find/process a jmptable.  Useful for
looking at zap shaders.

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

16 months agodriconf: make glthread=true default for source games
Mike Blumenkrantz [Tue, 10 Jan 2023 14:39:30 +0000 (09:39 -0500)]
driconf: make glthread=true default for source games

this yields a sizable gain for source-based games, so it shouldn't be
limited to radeonsi

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

16 months agointel/compiler: Add Wa_14014063774 for slm_fence
Sagar Ghuge [Fri, 21 May 2021 06:48:47 +0000 (23:48 -0700)]
intel/compiler: Add Wa_14014063774 for slm_fence

Before SLM fence compiler needs to insert SYNC.ALLWR in order to avoid
the SLM data race.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22050>

16 months agovenus: check and configure new ringMonitoring feature
Ryan Neph [Wed, 22 Mar 2023 19:47:42 +0000 (12:47 -0700)]
venus: check and configure new ringMonitoring feature

At ring creation, if supported by renderer, we can request
ringMonitoring. During driver ring waits, the ring's new ALIVE status
bit will be checked periodically at the configured rate. If the bit is
not set, the renderer must have crashed and the driver should do the
same to signal a problem to the app/user.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22036>

16 months agovenus: update to latest protocol for ringMonitoring
Ryan Neph [Mon, 20 Mar 2023 17:15:09 +0000 (10:15 -0700)]
venus: update to latest protocol for ringMonitoring

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22036>

16 months agovenus: init exp features before ring init again
Ryan Neph [Mon, 20 Mar 2023 18:15:12 +0000 (11:15 -0700)]
venus: init exp features before ring init again

This reverts commit dda85cf94bdd9d58f0dc4013dbf4b3c985471991 ("venus:
move exp features init back to use ring submit"), and additionally adds
per stream shmem caching to determine when vkSetReplyCommandStreamMESA
is needed.

Checking renderer features before setting up ring means that the bound
shmem for replies on the ring will no longer be implicitly set on first
shmem creation (it was set for the renderer stream instead). So the
test for when another vkSetReplyCommandStreamMESA is needed must
independently consider the last stream set on renderer/ring(s)

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22036>

16 months agovenus: set/check ring status bits independently
Ryan Neph [Wed, 22 Mar 2023 19:27:28 +0000 (12:27 -0700)]
venus: set/check ring status bits independently

prepare for manipulation of the new VK_RING_STATUS_ALIVE_BIT_MESA during
ring monitoring.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22036>

16 months agovenus: add vn_relax_init/_fini()
Ryan Neph [Wed, 22 Mar 2023 19:12:21 +0000 (12:12 -0700)]
venus: add vn_relax_init/_fini()

Use a new calling contract so we can do pre/post-work around every ring-waiting
iteration. All looping uses of `vn_relax()` must now call `vn_relax_init()` and
`vn_relax_fini()` before/after their loop bodies.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22036>

16 months agoiris: Implement Wa_14015297576
Sagar Ghuge [Thu, 16 Mar 2023 15:08:12 +0000 (17:08 +0200)]
iris: Implement Wa_14015297576

Disable tessellation distribution when primitive id is enabled.

v2: some changes squashed from Tapani:
   - leave mode initially as TEDMODE_OFF (0) so we can merge
   - take fs primitive ID overrides in to account

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21982>

16 months agoanv: Implement Wa_14015297576
Sagar Ghuge [Thu, 16 Mar 2023 14:03:41 +0000 (16:03 +0200)]
anv: Implement Wa_14015297576

Disable tessellation distribution when primitive id is enabled.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21982>

16 months agoci/zink: Add zink-tu-a618-traces-performance job
Guilherme Gallo [Mon, 20 Mar 2023 16:39:49 +0000 (13:39 -0300)]
ci/zink: Add zink-tu-a618-traces-performance job

It will be needed to compare the performance of zink+turnip against
turnip only jobs.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>

16 months agoci/zink: Add zink-turnip-manual-rules
Guilherme Gallo [Mon, 20 Mar 2023 16:36:21 +0000 (13:36 -0300)]
ci/zink: Add zink-turnip-manual-rules

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>

16 months agoci/zink: Add zink-a618 trace jobs
Guilherme Gallo [Mon, 13 Mar 2023 21:23:31 +0000 (18:23 -0300)]
ci/zink: Add zink-a618 trace jobs

May be used as replacement for zink-a630-traces job, since a618 is similar
to a630.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>

16 months agoci/freedreno: create a618-traces and perf jobs
Guilherme Gallo [Mon, 13 Feb 2023 15:59:12 +0000 (12:59 -0300)]
ci/freedreno: create a618-traces and perf jobs

Performance jobs should work better if we fix the device under test to
be the same in every test, instead of using any device from a group of
devices of the same type.

We can do it quickly in LAVA, but it seems more
complicated on Google's farm. So, let's replace the a630 (in Google
farm) with a fixed a618 device to test freedreno traces performance.

Add a618-traces job as well, as we need to confirm that a618 is
generating stable traces with good results before proceeding to track
its performance

Co-authored-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>

16 months agoci: Add piglit traces hidden jobs
Guilherme Gallo [Mon, 13 Mar 2023 21:42:11 +0000 (18:42 -0300)]
ci: Add piglit traces hidden jobs

To better organize traces and traces-performance jobs that uses piglit
to replay traces.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>

16 months agoci/freedreno: Make traces work on LAVA caching proxy
David Heidelberg [Mon, 20 Feb 2023 03:20:00 +0000 (04:20 +0100)]
ci/freedreno: Make traces work on LAVA caching proxy

Explicitily define the caching proxy via piglit
`--download-caching-proxy-url` argument.
We have different URLs for caching proxy for LAVA and freedreno farms.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>

16 months agoci/freedreno: define Google farm specific includes
David Heidelberg [Mon, 20 Feb 2023 00:03:06 +0000 (01:03 +0100)]
ci/freedreno: define Google farm specific includes

This should prevent mixing them with LAVA freedreno devices.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>

16 months agoci/freedreno: split deqp from other jobs
David Heidelberg [Mon, 20 Feb 2023 02:46:17 +0000 (03:46 +0100)]
ci/freedreno: split deqp from other jobs

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>

16 months agoci: remove deqp from lava piglit and traces runs
David Heidelberg [Mon, 20 Feb 2023 01:01:33 +0000 (02:01 +0100)]
ci: remove deqp from lava piglit and traces runs

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>

16 months agoci: create lava-test without deqp HWCI_TEST_SCRIPT
David Heidelberg [Mon, 20 Feb 2023 00:55:17 +0000 (01:55 +0100)]
ci: create lava-test without deqp HWCI_TEST_SCRIPT

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>

16 months agoci: rename .lava-test to .lava-test-deqp to describe it correctly
David Heidelberg [Mon, 20 Feb 2023 00:52:04 +0000 (01:52 +0100)]
ci: rename .lava-test to .lava-test-deqp to describe it correctly

.lava-test hidden job was setting the HWCI_TEST_SCRIPT variable to deqp
runner. But that is not always the case. When we run piglit traces jobs,
we use piglit-traces.sh instead, for example.

Splitting into:
- .lava-test-deqp (deqp-runner + deqp)
- .lava-traces (deqp-runner + piglit)
- .lava-piglit (piglit-runner + piglit)

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Co-authored-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>

16 months agoci: Fix freedreno-rules-performance
Guilherme Gallo [Sun, 5 Mar 2023 18:15:23 +0000 (19:15 +0100)]
ci: Fix freedreno-rules-performance

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>

16 months agoci: Improve piglit-traces "no-perf" filter
Guilherme Gallo [Wed, 15 Mar 2023 11:31:13 +0000 (08:31 -0300)]
ci: Improve piglit-traces "no-perf" filter

We filter out traces that work only in standard replay mode but not
profile one via yq (jq for YAML) manipulation.

The previous query needed to be fixed in some scenarios, such as traces
labeled with only `["no-perf"]`, which was being ignored by the query.

This commit updates the yq query with newer syntax to cover all current
cases (at least for freedreno).

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>

16 months agoanv: Fetch max_context_priority from drm_xe_query_config
José Roberto de Souza [Thu, 23 Mar 2023 20:19:01 +0000 (13:19 -0700)]
anv: Fetch max_context_priority from drm_xe_query_config

A new property was added to drm_xe_query_config with the max engine
priority for running process, so we can use it directly on
anv_xe_physical_device_get_parameters() and nuke
anv_xe_physical_device_max_priority_update().

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

16 months agoanv: Partialy import drm-uapi/gpu_scheduler.h and use it
José Roberto de Souza [Thu, 23 Mar 2023 20:46:30 +0000 (13:46 -0700)]
anv: Partialy import drm-uapi/gpu_scheduler.h and use it

To replace the hard-coded values.
Not fully importing gpu_scheduler.h because it includes several Linux
specific headers that will make the life of anyone porting Xe to
other Unix harder.

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

16 months agointel: Sync xe_drm.h
José Roberto de Souza [Thu, 23 Mar 2023 19:45:14 +0000 (12:45 -0700)]
intel: Sync xe_drm.h

Based on commit f6e26dff8fa3 ("drm/xe: Add max engine priority to xe query")

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

16 months agodriconf: remove the adaptive sync special case for mpv
Nicolas F [Fri, 13 Jan 2023 20:44:04 +0000 (21:44 +0100)]
driconf: remove the adaptive sync special case for mpv

mpv didn't ask to be on this list, was never consulted about being
on this list and to the best of my knowledge has no problem with
adaptive sync. If there is an issue exposed by mpv having adaptive
sync enabled, then it should be reported to mpv, so that it can be
fixed in mpv.

The only problem I could remotely imagine with mpv and VRR is that
its display-resample mode tries to do something similar, and the
two mechanisms will likely race each other to the bottom, but the
display-resample mode is not the default and this is already a
known issue on Windows so users wouldn't expect this to behave any
differently on Linux.

In short, please don't try to make a list of all applications that
are not video games, it is not conducive to having a good time on
the computer.

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

16 months agoradv/rt: Fix VK_KHR_pipeline_executable_properties
Daniel Schürmann [Fri, 24 Mar 2023 01:46:46 +0000 (02:46 +0100)]
radv/rt: Fix VK_KHR_pipeline_executable_properties

We don't provide executable properties for the prolog shader.

Fixes: f123d65e9f50e57b9af3de2e0e77618fcd9d2ddd ('radv/rt: use prolog for raytracing shaders')
Fixes: dEQP-VK.pipeline.monolithic.shader_module_identifier.pipeline_from_id.ray_tracing_libs.*
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22111>

16 months agoradv: fix radv_shader_binary member fields to 32 bit.
Daniel Schürmann [Sat, 18 Mar 2023 15:14:51 +0000 (16:14 +0100)]
radv: fix radv_shader_binary member fields to 32 bit.

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

16 months agoradv: skip pipeline caching with RADV_DEBUG=shaders
Daniel Schürmann [Sat, 18 Mar 2023 15:26:38 +0000 (16:26 +0100)]
radv: skip pipeline caching with RADV_DEBUG=shaders

in order to create reproducible cache entries.

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

16 months agoradv: refactor shader_compile()
Daniel Schürmann [Sat, 18 Mar 2023 00:20:15 +0000 (01:20 +0100)]
radv: refactor shader_compile()

- change the return type to radv_shader_binary *
- setup options at the caller side

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

16 months agoradv: remove radv_create_gs_copy_shader()
Daniel Schürmann [Fri, 17 Mar 2023 23:28:29 +0000 (00:28 +0100)]
radv: remove radv_create_gs_copy_shader()

We can replace the call with radv_shader_nir_to_asm().

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

16 months agoradv: move gl_shader_stage from radv_binary to radv_shader_info
Daniel Schürmann [Thu, 16 Mar 2023 23:49:44 +0000 (00:49 +0100)]
radv: move gl_shader_stage from radv_binary to radv_shader_info

This way, both radv_shader and radv_shader_binary, provide the stage.

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

16 months agoradv: separate radv_capture_shader_executable_info() from radv_shader_create()
Daniel Schürmann [Thu, 16 Mar 2023 23:19:05 +0000 (00:19 +0100)]
radv: separate radv_capture_shader_executable_info() from radv_shader_create()

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

16 months agoradv: inline radv_postprocess_config()
Daniel Schürmann [Thu, 16 Mar 2023 21:28:56 +0000 (22:28 +0100)]
radv: inline radv_postprocess_config()

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

16 months agoradv: remove unnecessary copy of binary->config
Daniel Schürmann [Thu, 16 Mar 2023 21:24:49 +0000 (22:24 +0100)]
radv: remove unnecessary copy of binary->config

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

16 months agoradv: separate radv_postprocess_binary_config() from radv_shader_create()
Daniel Schürmann [Thu, 16 Mar 2023 21:18:26 +0000 (22:18 +0100)]
radv: separate radv_postprocess_binary_config() from radv_shader_create()

The goal is to make radv_shader_create() a function that creates a shader
from a binary without any additional information.
Postprocessing the config is only needed after compilation.

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

16 months agoradv: remove unused parameter from radv_open_rtld_binary()
Daniel Schürmann [Thu, 16 Mar 2023 21:03:49 +0000 (22:03 +0100)]
radv: remove unused parameter from radv_open_rtld_binary()

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

16 months agor600: fix refcnt imbalance related to shader
Patrick Lerda [Mon, 20 Mar 2023 22:34:36 +0000 (23:34 +0100)]
r600: fix refcnt imbalance related to shader

Indeed, gs_copy_shader was not freed.

Fixes: commit 1371d65a7fbd695d3516861fe733685569d890d0
    r600g: initial support for geometry shaders on evergreen (v2)

For instance, with "piglit/bin/shader_runner generated_tests/spec/arb_gpu_shader_int64/execution/built-in-functions/gs-abs-i64vec2.shader_test -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22087>

16 months agoiris: Ajust gem buffer allocation size in Xe kmd
José Roberto de Souza [Mon, 20 Mar 2023 17:41:34 +0000 (10:41 -0700)]
iris: Ajust gem buffer allocation size in Xe kmd

gem buffer size must also be aligned to mem_alignment otherwise
vm binds can fail when Xe kmd checks if vm bind range is bigger than
gem buffer size.

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

16 months agoiris: Implement gem_vm_bind() and gem_vm_unbind() in Xe kmd backend
José Roberto de Souza [Tue, 14 Feb 2023 17:21:25 +0000 (09:21 -0800)]
iris: Implement gem_vm_bind() and gem_vm_unbind() in Xe kmd backend

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

16 months agoiris: Add vm bind and unbind to kmd backend
José Roberto de Souza [Tue, 1 Nov 2022 18:07:16 +0000 (11:07 -0700)]
iris: Add vm bind and unbind to kmd backend

At this time this is a nop for i915 but in future we will have a
Xe implementation.

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

16 months agoiris: Prepare iris_bufmgr functions for vm bind error paths
José Roberto de Souza [Mon, 16 Jan 2023 20:48:40 +0000 (12:48 -0800)]
iris: Prepare iris_bufmgr functions for vm bind error paths

vm bind and unbind can fail, so error paths will be needed.
Here I'm just preparing the code paths for that.

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

16 months agoradv: rework binding shaders to cmdbuf by introducing new helpers
Samuel Pitoiset [Fri, 24 Mar 2023 08:36:01 +0000 (09:36 +0100)]
radv: rework binding shaders to cmdbuf by introducing new helpers

For future work.

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

16 months agotu: Generate entrypoints for each gen
Danylo Piliaiev [Thu, 9 Mar 2023 18:57:51 +0000 (19:57 +0100)]
tu: Generate entrypoints for each gen

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

16 months agofreedreno/regs: Include assert.h in generated headers
Danylo Piliaiev [Thu, 9 Mar 2023 20:50:21 +0000 (21:50 +0100)]
freedreno/regs: Include assert.h in generated headers

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

16 months agovk/entry_points: Add option to generate template entrypoints
Danylo Piliaiev [Thu, 9 Mar 2023 18:56:43 +0000 (19:56 +0100)]
vk/entry_points: Add option to generate template entrypoints

As a C++ alternative to genX macros.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>

16 months agotu: compile as C++
Danylo Piliaiev [Wed, 8 Mar 2023 18:12:08 +0000 (19:12 +0100)]
tu: compile as C++

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

16 months agofreedreno/msm: Rename drm_msm_gem_submit_reloc::or in C++ code
Danylo Piliaiev [Wed, 8 Mar 2023 12:45:41 +0000 (13:45 +0100)]
freedreno/msm: Rename drm_msm_gem_submit_reloc::or in C++ code

Clashes with C++ `or` keyword

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

16 months agotu: C++-proofing: misc fixes
Danylo Piliaiev [Mon, 13 Mar 2023 13:19:43 +0000 (14:19 +0100)]
tu: C++-proofing: misc fixes

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

16 months agotu: C++-proofing: cast result when extracting field from reg value
Danylo Piliaiev [Wed, 15 Mar 2023 10:33:32 +0000 (11:33 +0100)]
tu: C++-proofing: cast result when extracting field from reg value

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

16 months agotu: C++-proofing: prevent taking address from rvalue
Danylo Piliaiev [Tue, 14 Mar 2023 19:01:11 +0000 (20:01 +0100)]
tu: C++-proofing: prevent taking address from rvalue

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

16 months agotu: C++-proofing: ease access to global bo struct
Danylo Piliaiev [Tue, 14 Mar 2023 18:16:59 +0000 (19:16 +0100)]
tu: C++-proofing: ease access to global bo struct

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

16 months agotu: C++-proofing: fix casting from void * fpermissive warnings
Danylo Piliaiev [Tue, 14 Mar 2023 18:03:03 +0000 (19:03 +0100)]
tu: C++-proofing: fix casting from void * fpermissive warnings

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

16 months agotu: C++-proofing: Initialize tu_reg_value in-order by pack funcs
Danylo Piliaiev [Tue, 7 Mar 2023 15:22:22 +0000 (16:22 +0100)]
tu: C++-proofing: Initialize tu_reg_value in-order by pack funcs

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

16 months agotu: C++-proofing: fix extension table initialization
Danylo Piliaiev [Wed, 8 Mar 2023 12:55:00 +0000 (13:55 +0100)]
tu: C++-proofing: fix extension table initialization

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

16 months agotu: C++-proofing: fix designator initializer order
Danylo Piliaiev [Tue, 7 Mar 2023 16:03:50 +0000 (17:03 +0100)]
tu: C++-proofing: fix designator initializer order

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

16 months agotu: C++-proof: do not goto over variables initialization
Danylo Piliaiev [Tue, 7 Mar 2023 17:03:37 +0000 (18:03 +0100)]
tu: C++-proof: do not goto over variables initialization

That is not permitted by C++

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

16 months agotu: C++-proofing: various enum fixes
Danylo Piliaiev [Mon, 13 Mar 2023 13:16:16 +0000 (14:16 +0100)]
tu: C++-proofing: various enum fixes

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

16 months agotu: C++-proofing: fix struct initializers
Danylo Piliaiev [Mon, 13 Mar 2023 13:13:47 +0000 (14:13 +0100)]
tu: C++-proofing: fix struct initializers

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

16 months agotu: C++-proofing: fix offsetof with dynamic array index
Danylo Piliaiev [Mon, 13 Mar 2023 13:09:20 +0000 (14:09 +0100)]
tu: C++-proofing: fix offsetof with dynamic array index

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

16 months agoir3: C++-proofing
Danylo Piliaiev [Mon, 13 Mar 2023 13:52:44 +0000 (14:52 +0100)]
ir3: C++-proofing

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

16 months agofreedreno/common: C++-proof freedreno_uuid.h
Danylo Piliaiev [Mon, 13 Mar 2023 13:56:50 +0000 (14:56 +0100)]
freedreno/common: C++-proof freedreno_uuid.h

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

16 months agovk/util: Generate defines to help casting structs with vk_find_struct
Danylo Piliaiev [Tue, 14 Mar 2023 13:44:17 +0000 (14:44 +0100)]
vk/util: Generate defines to help casting structs with vk_find_struct

C++ doesn't like implicit casts from void *.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>

16 months agovk/util: remove (void *) casts from vk_foreach_multi_draw macros
Danylo Piliaiev [Tue, 14 Mar 2023 18:20:01 +0000 (19:20 +0100)]
vk/util: remove (void *) casts from vk_foreach_multi_draw macros

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>

16 months agovk/wsi: C++-proof wsi_common_drm.h
Danylo Piliaiev [Wed, 8 Mar 2023 13:29:11 +0000 (14:29 +0100)]
vk/wsi: C++-proof wsi_common_drm.h

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>

16 months agovk/vk_extension_gen: Make table struct initializable in C++ on older gcc
Danylo Piliaiev [Wed, 8 Mar 2023 12:52:36 +0000 (13:52 +0100)]
vk/vk_extension_gen: Make table struct initializable in C++ on older gcc

Before GCC 11.2 initializing anonymous struct with extensions gave:

 error: too many initializers for 'vk_device_extension_table'

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>

16 months agospirv: sort spirv_supported_capabilities
Danylo Piliaiev [Tue, 7 Mar 2023 16:27:51 +0000 (17:27 +0100)]
spirv: sort spirv_supported_capabilities

Makes easier for c++ driver to keep initializer in order.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>

16 months agoutil/format: Make format_table compatible with C++
Danylo Piliaiev [Wed, 8 Mar 2023 12:35:22 +0000 (13:35 +0100)]
util/format: Make format_table compatible with C++

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>

16 months agoutil/perf: C++-proof util/perf
Danylo Piliaiev [Wed, 8 Mar 2023 13:49:08 +0000 (14:49 +0100)]
util/perf: C++-proof util/perf

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>

16 months agonir/lower_shader_calls: Remat derefs before lowering resumes
Konstantin Seurer [Tue, 20 Dec 2022 17:26:34 +0000 (18:26 +0100)]
nir/lower_shader_calls: Remat derefs before lowering resumes

Closes: #7923
cc: mesa-stable

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

16 months agoradv: remove radv_pipeline::device completely
Samuel Pitoiset [Thu, 23 Mar 2023 15:45:18 +0000 (16:45 +0100)]
radv: remove radv_pipeline::device completely

This is unecessary and this prevents using a ton of functions without
a radv_pipeline object.

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

16 months agogallium: decompose quad strips into quads if supported
antonino [Mon, 6 Feb 2023 14:44:01 +0000 (15:44 +0100)]
gallium: decompose quad strips into quads if supported

This changes gallium to decompose quad strips into quads instead of triangles
when the driver advertises support for them.

This should result in a more correct result when those are drawn
with the line raster primitve (avoids showing the diagonal line).

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