platform/upstream/mesa.git
16 months agosvga: Switch to preferring NIR by default.
Emma Anholt [Thu, 18 May 2023 20:17:13 +0000 (13:17 -0700)]
svga: Switch to preferring NIR by default.

The flag has been here for a long time, it's time for SVGA to start
ingesting NIR like other drivers do.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23114>

16 months agonouveau: Delete the NV50_PROG_USE_TGSI env var.
Emma Anholt [Thu, 18 May 2023 20:05:17 +0000 (13:05 -0700)]
nouveau: Delete the NV50_PROG_USE_TGSI env var.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23114>

16 months agor300: Drop RADEON_DEBUG=use_tgsi.
Emma Anholt [Thu, 18 May 2023 20:20:12 +0000 (13:20 -0700)]
r300: Drop RADEON_DEBUG=use_tgsi.

The NIR path is default, and well-trodden at this point.  By dropping
support for input as TGSI, we get rely on the NIR trig lowering.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23114>

16 months agor600: Drop docs for use_tgsi debug var.
Emma Anholt [Thu, 18 May 2023 20:51:59 +0000 (13:51 -0700)]
r600: Drop docs for use_tgsi debug var.

Fixes: 337dc7d76604 ("r600: remove TGSI code path")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23114>

16 months agovirgl: Drop the VIRGL_DEBUG=use_tgsi debug var.
Emma Anholt [Thu, 18 May 2023 20:24:04 +0000 (13:24 -0700)]
virgl: Drop the VIRGL_DEBUG=use_tgsi debug var.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23114>

16 months agollvmpipe: Drop the LP_DEBUG=tgsi_ir debug option.
Emma Anholt [Thu, 18 May 2023 20:26:43 +0000 (13:26 -0700)]
llvmpipe: Drop the LP_DEBUG=tgsi_ir debug option.

No need to support this, it's unused and untested.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23114>

16 months agosoftpipe: Drop the use_tgsi debug flag.
Emma Anholt [Thu, 18 May 2023 20:18:33 +0000 (13:18 -0700)]
softpipe: Drop the use_tgsi debug flag.

We lower to TGSI inside the driver just fine, no need to ask the frontend
for it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23114>

16 months agomesa: Port the pbo.use_gs path to NIR and let it get used on NIR drivers.
Emma Anholt [Thu, 18 May 2023 20:01:27 +0000 (13:01 -0700)]
mesa: Port the pbo.use_gs path to NIR and let it get used on NIR drivers.

Now that everyone but SVGA is requesting NIR, this path had been
effectively disabled.  I had done a partial port of the VS side in
9143c08125a3 ("st/nir: Fix the st->pbo.use_gs case.") for the sake of
nv50, but with it should be ready for all drivers.  Affects nv50, v3d,
d3d12, svga (I think).

Note that this GS code is slightly different from the TGSI: We put a 0 in
pos.z, rather than leaving the layer value there, because apparently v3d
didn't like those denorm Z values.

Also, it's nice to see that the NIR code is shorter than the TGSI code
was, we've made great progress on nir_builder.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23114>

16 months agomesa: Emit full output write in st_pbo_create_vs().
Emma Anholt [Thu, 1 Jun 2023 19:35:09 +0000 (12:35 -0700)]
mesa: Emit full output write in st_pbo_create_vs().

In most VS creation paths in the frontend, nir_lower_io_to_temporaries()
is called, which ensures that all outputs have a single write to them
(with a full writemask).  The builtins don't, however, and this VS was an
oddball that overwrote one channel of an output that it had already
written.  We can avoid surprises for backends (such as d3d12 and v3d) by
emitting a single write per output here.

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

16 months agov3d: Respect nir_intrinsic_store_output's write_mask.
Emma Anholt [Thu, 1 Jun 2023 19:28:33 +0000 (12:28 -0700)]
v3d: Respect nir_intrinsic_store_output's write_mask.

Usually lower_io_to_temps sorts this out for us so you only get full
writes, but we should be able to handle it without that.  Avoids a
regression with the mesa/st PBO VS with layer output.

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

16 months agoradv/ci: Test ray tracing on vkd3d-proton
Konstantin Seurer [Sat, 27 May 2023 11:33:27 +0000 (13:33 +0200)]
radv/ci: Test ray tracing on vkd3d-proton

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

16 months agoRevert "glx: Remove pointless GLX_INTEL_swap_event paranoia"
Xi Ruoyao [Mon, 12 Jun 2023 09:42:46 +0000 (17:42 +0800)]
Revert "glx: Remove pointless GLX_INTEL_swap_event paranoia"

This reverts commit 19c57ea3bf6d77cf6f07f2a56e781f55b0e6013b.

This commit is causing a reproducible crash of GNOME shell on Xorg
server.  Revert it for now and we may investigate it further in the
future.

Fixes #8542.

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

16 months agonouveau: fix nouveau_heap_destroy() memory leak
Patrick Lerda [Mon, 29 May 2023 16:23:30 +0000 (18:23 +0200)]
nouveau: fix nouveau_heap_destroy() memory leak

Indeed, this function was not processing the linked
allocated list.

For instance, this issue is triggered with "piglit/bin/hiz-depth-read-fbo-d24-s0 -auto":
Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7f6795638987 in calloc (/usr/lib64/libasan.so.6+0xb1987)
    #1 0x7f678bac13b9 in nouveau_heap_alloc ../src/gallium/drivers/nouveau/nouveau_heap.c:64
    #2 0x7f678bb6c7e4 in nv50_program_upload_code ../src/gallium/drivers/nouveau/nv50/nv50_program.c:490
    #3 0x7f678bb83b92 in nv50_vertprog_validate ../src/gallium/drivers/nouveau/nv50/nv50_shader_state.c:161
    #4 0x7f678bba3000 in nv50_state_validate ../src/gallium/drivers/nouveau/nv50/nv50_state_validate.c:552
    #5 0x7f678bba3c4d in nv50_state_validate_3d ../src/gallium/drivers/nouveau/nv50/nv50_state_validate.c:575
    #6 0x7f678b9e3e92 in nv50_blit_3d ../src/gallium/drivers/nouveau/nv50/nv50_surface.c:1444
    #7 0x7f678b9e3e92 in nv50_blit ../src/gallium/drivers/nouveau/nv50/nv50_surface.c:1832
    #8 0x7f678a0b378a in blit_to_staging ../src/mesa/state_tracker/st_cb_readpixels.c:337
    #9 0x7f678a0b7358 in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:516
    #10 0x7f6789f82005 in read_pixels ../src/mesa/main/readpix.c:1178
    #11 0x7f6789f82005 in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1195
    #12 0x7f6789f82ac0 in _mesa_ReadPixels ../src/mesa/main/readpix.c:1210
...
SUMMARY: AddressSanitizer: 80 byte(s) leaked in 2 allocation(s).

Fixes: 67635a0a713e ("nouveau: get rid of tabs")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23592>

16 months agoanv: split ANV_PIPE_RENDER_TARGET_BUFFER_WRITES for finer grained flushing
Rohan Garg [Tue, 6 Jun 2023 21:11:14 +0000 (23:11 +0200)]
anv: split ANV_PIPE_RENDER_TARGET_BUFFER_WRITES for finer grained flushing

split ANV_PIPE_RENDER_TARGET_BUFFER_WRITES into separate CS_STALL,
RT_FLUSH & TILE_FLUSH flags in order to have finer control over cache
coherency.

Tigerlake CS has it's own cache fetching directly from the memory controller,
so we need to do a tile flush to ensure the query data is visible.

This fixes test_resolve_non_issued_query_data in vkd3d on TGL.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Fixes: 3c4c18341aaf ("anv: narrow flushing of the render target to buffer writes")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23500>

16 months agoanv: add query tracepoints
Lionel Landwerlin [Fri, 9 Jun 2023 20:00:09 +0000 (23:00 +0300)]
anv: add query tracepoints

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

16 months agoaco: Fix assert in insert_exec_mask
Friedrich Vock [Mon, 12 Jun 2023 12:59:47 +0000 (14:59 +0200)]
aco: Fix assert in insert_exec_mask

This assert would trigger on unconditional demotes, because the demotes
don't remove the mask_type_global flag from the exec mask.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23594>

16 months agoaco: Fix live_var_analysis assert
Friedrich Vock [Mon, 12 Jun 2023 11:28:11 +0000 (13:28 +0200)]
aco: Fix live_var_analysis assert

Fixes: 3d4f6a00b ('aco/spill: allow for disconnected CFG')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23586>

16 months agoaco: Reset scratch_rsrc on blocks without predecessors
Friedrich Vock [Mon, 12 Jun 2023 08:18:37 +0000 (10:18 +0200)]
aco: Reset scratch_rsrc on blocks without predecessors

Fixes hangs with raytracing in Hellblade: Senua's Sacrifice.

Fixes: 3d4f6a00b ('aco/spill: allow for disconnected CFG')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23586>

16 months agoaco: Mark exec write used when it writes other registers.
Timur Kristóf [Sun, 11 Jun 2023 14:01:17 +0000 (16:01 +0200)]
aco: Mark exec write used when it writes other registers.

When an exec write isn't used but writes other registers
besides exec, and also reads exec (such as s_and_saveexec),
we would mistakenly delete the previous instruction that
writes the exec value that this instruction uses.

No Fossil DB changes on Rembrandt (GFX10.3).

Fixes: 0211e66f65522caa1f6855b937ae4fc18af0c937
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9036
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23576>

16 months agorusticl/event: ensure even status is updated in order
Karol Herbst [Sun, 11 Jun 2023 19:58:54 +0000 (21:58 +0200)]
rusticl/event: ensure even status is updated in order

There was a race between the worker thread and flush, which could lead to
the last event flushed getting its status set to CL_SUCCESS before any
other event.

Just wait on all flushed events in order to solve this.

The current queue/event implementation isn't the best and we want to
rework it, so this is good enough for now.

Fixes: 47a80d7ff4f ("rusticl/event: proper eventing support")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23578>

16 months agorusticl/api: remove some repr(C)
Karol Herbst [Sun, 11 Jun 2023 09:42:57 +0000 (11:42 +0200)]
rusticl/api: remove some repr(C)

The only part we strictly need repr(C) is in `CLObjectBase` and we already
didn't have it set for `Device` and it worked just fine.

We keep it on in `Platform` as this is a more hand rolled type and less
relevant.

With this we can make use of Rusts data layout which saves us some memory.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23573>

16 months agorusticl/icd: fix ReferenceCountedAPIPointer::from_ptr for NULL pointers
Karol Herbst [Sun, 11 Jun 2023 10:50:34 +0000 (12:50 +0200)]
rusticl/icd: fix ReferenceCountedAPIPointer::from_ptr for NULL pointers

If a NULL pointer is passed in, we have to return one as well.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23573>

16 months agoiris: Add GET_PARAM for protected context capability support
Alan Previn [Fri, 21 Apr 2023 05:56:37 +0000 (22:56 -0700)]
iris: Add GET_PARAM for protected context capability support

With MTL onwards, creating protected contexts too early
may block for a longer period. To prevent that, use the new
kernel GET_PARAM:I915_PARAM_PXP_STATUS interface to get the
status of PXP support immediately without blocking.

Using this same interface, we can also wait for platform
dependency readiness before attempting to create a protected
context. Use a longer timeout when user explicitly requests
for protected context as the kernel assures readiness will be
achieved.

Reference to kernel change: https://patchwork.freedesktop.org/patch/533241/?series=112647&rev=8

Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23382>

16 months agodrm-uapi: bump headers (except AMD)
Alan Previn [Mon, 5 Jun 2023 20:56:42 +0000 (13:56 -0700)]
drm-uapi: bump headers (except AMD)

NOTE: skipped AMD header update due to build error.

From drm-next at the following commit:

commit 2e1492835e439fceba57a5b0f9b17da8e78ffa3d
Merge: 85d712f033d2 43049f17b526
Author: Dave Airlie <airlied@redhat.com>
Date:   Fri Jun 2 13:38:48 2023 +1000

Merge tag 'drm-misc-next-2023-06-01' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23382>

16 months agoanv: remove BDW specific WA for CS stall enable
Tapani Pälli [Fri, 9 Jun 2023 07:10:24 +0000 (10:10 +0300)]
anv: remove BDW specific WA for CS stall enable

This note is in BDW specs but not anymore in gfx9+ specs.

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

16 months agoradv/ci: use the low-priority runners for vangogh jobs
Martin Roukala (né Peres) [Thu, 8 Jun 2023 13:28:01 +0000 (16:28 +0300)]
radv/ci: use the low-priority runners for vangogh jobs

In order to prioritize the upcoming pre-merge jobs on VanGogh, we
limit all the post-merge jobs requiring VanGogh runners to the
low-priority pool of runners.

This will allow Marge to use any of the VanGogh runners we have (6),
while leaving 3 of them unused by post-merge jobs inside Mesa, or
DXVK-CI.

Suggested-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23548>

16 months agoci/b2c: select the DUT to run on by name
Martin Roukala (né Peres) [Fri, 9 Jun 2023 10:21:01 +0000 (13:21 +0300)]
ci/b2c: select the DUT to run on by name

When we have many DUTs with the same tags (or subset of tags), it is
possible for the gitlab runner name not to match the DUT picked by
valve-infra's executor.

This is needlessly confusing, and prevents specifically tagging some
runners with a low-priority tag but still have these runners execute
high-priority jobs... because a low priority job may get started by
gitlab but the corresponding DUT is being used by a high-priority
task.

To fix this, simply tell the executor which DUT we want, not just the
list of tags we want.

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

16 months agor600/sfn: Remove duplicate assignment
Vinson Lee [Sat, 3 Jun 2023 22:42:45 +0000 (15:42 -0700)]
r600/sfn: Remove duplicate assignment

Fix defect reported by Coverity Scan.

Self assignment (NO_EFFECT)
self_assign: Assigning sh->info.fs.depth_layout to itself has no effect.

Fixes: bbd265b8e8b ("r600+sfn: Assign ps_conservative_z and switch to NIR defines")
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/23414>

16 months agomesa/st: discard whole resource when mapping drawpixels texture
Lucas Stach [Fri, 9 Jun 2023 09:57:52 +0000 (11:57 +0200)]
mesa/st: discard whole resource when mapping drawpixels texture

The texture resource has just been allocated for the whole purpose
of holding the drawpixels data. Make the drivers life a bit easier
by telling it that we aren't interested in any previous content
when mapping the resource.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23546>

16 months agolp: align memory for long16 CL types
Karol Herbst [Sun, 11 Jun 2023 12:36:06 +0000 (14:36 +0200)]
lp: align memory for long16 CL types

Fixes following OpenCL CTS test flakes:

basic kernel_memory_alignment_constant
basic kernel_memory_alignment_global
vectors vec_align_array
vectors vec_align_struct_arr

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23574>

16 months agoetnaviv: query: optimize context flushes
Lucas Stach [Fri, 9 Jun 2023 17:09:21 +0000 (19:09 +0200)]
etnaviv: query: optimize context flushes

Same as the transfer flushes, the flushes caused by waiting for
a query result don't need to realize context external visibility
of resource changes and can thus be a bit more lightweight.

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

16 months agoetnaviv: query: correct max number of occlusion query samples
Lucas Stach [Fri, 9 Jun 2023 17:06:59 +0000 (19:06 +0200)]
etnaviv: query: correct max number of occlusion query samples

The real maximium for the occlusion query samples is much higher
than what the code currently claims to support as we always
allocate a full 4KB buffer to store the query results.

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

16 months agoetnaviv: query: correct max number of perfmon samples
Lucas Stach [Fri, 9 Jun 2023 17:03:33 +0000 (19:03 +0200)]
etnaviv: query: correct max number of perfmon samples

The real maximium for the perfmon samples is much higher than
what the code currently claims to support as we always allocate
a full 4KB buffer to store the query results.

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

16 months agoetnaviv: query: remove incorrect comment
Lucas Stach [Fri, 9 Jun 2023 16:55:39 +0000 (18:55 +0200)]
etnaviv: query: remove incorrect comment

The allocated query buffer is always 4KB in size and can hold
a variable number of samples depending on the sample size.

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

16 months agoetnaviv: query: reset sample count on begin_query
Lucas Stach [Fri, 9 Jun 2023 16:51:05 +0000 (18:51 +0200)]
etnaviv: query: reset sample count on begin_query

ARB_occlusion_query specifies that the query is reset on BeginQueryARB,
not when the fetching the result of the query. This behavior also makes
a lot of sense for the perfmon queries.

CC: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23557>

16 months agoetnaviv: query: move sample counter manipulation into query providers
Lucas Stach [Fri, 9 Jun 2023 16:45:43 +0000 (18:45 +0200)]
etnaviv: query: move sample counter manipulation into query providers

Different query providers have different behavior on when they produce
samples: the perfmon provider provides a sample at the start and at the
end of the query, while the occlusion query provider only adds another
sample when the query is complete.

Move the sample count manipulation to the providers to be able to take
those differences into account. Removes a useless always-zero sample
for each OQ resume/suspend pair.

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

16 months agoradv: Use RESET_FILTER_CAM for some mesh shading draws.
Timur Kristóf [Fri, 9 Jun 2023 14:17:34 +0000 (16:17 +0200)]
radv: Use RESET_FILTER_CAM for some mesh shading draws.

It's unclear why this is needed, but PAL uses RESET_FILTER_CAM
for some mesh shading draw packets:
- DISPATCH_MESH_INDIRECT_MULTI
- DISPATCH_TASKMESH_GFX

Let's do the same in radv.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23554>

16 months agoradv: Always flush before writing acceleration structure properties
Friedrich Vock [Sat, 10 Jun 2023 20:01:46 +0000 (22:01 +0200)]
radv: Always flush before writing acceleration structure properties

Equivalent of 284e604872 but for acceleration structure queries.
If an app inserts a barrier between AS builds and writing AS properties,
we must respect it or things will blow up.

Cc: mesa-stable
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23568>

16 months agoac/llvm: set +cumode for radeonsi
Karol Herbst [Sat, 10 Jun 2023 21:04:30 +0000 (23:04 +0200)]
ac/llvm: set +cumode for radeonsi

radeonsi switched over to CU wavefront execution mode, but didn't tell
LLVM. This can lead to shaders requiring too many VGPRs to be executed in
CU mode and so cause GPU resets.

Pass along +cumode to LLVM so it properly spills VGPRs.

Fixes: 9d7eab2ab17 ("radeonsi: don't enable WGP_MODE because of high cost of workgroup mem coherency")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23569>

16 months agoac: Replace the usage of pipe_compare_func with compare_func
Yonggang Luo [Tue, 6 Jun 2023 01:22:42 +0000 (09:22 +0800)]
ac: Replace the usage of pipe_compare_func with compare_func

PIPE_FUNC_ -> COMPARE_FUNC_
pipe_compare_func -> compare_func

Now include "pipe/p_state.h" is not needed and remove it in ac_nir.h

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

16 months agoci: bring back the valve farm
Martin Roukala (né Peres) [Sun, 11 Jun 2023 05:50:12 +0000 (08:50 +0300)]
ci: bring back the valve farm

Valve infra is back online, sorry for the noise!

This is a partial revert of commit 628d21c5219178b29caec6ea9c21bed59a0a58ff.

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

16 months agonir/lower_shader_calls: Fix cursor if broken after nir_cf_extract() call
Sviatoslav Peleshko [Fri, 5 May 2023 07:00:48 +0000 (10:00 +0300)]
nir/lower_shader_calls: Fix cursor if broken after nir_cf_extract() call

Fixes: e2dadda3 ("Revert "nir/lower_shader_calls: put inserted instructions into a dummy block")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8978
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22884>

16 months agofreedreno: Partially decode CP_PROTECT_CNTL
Konrad Dybcio [Sat, 10 Jun 2023 07:59:49 +0000 (09:59 +0200)]
freedreno: Partially decode CP_PROTECT_CNTL

Give bogus but meaningful names to the bitfields that we understand.

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

16 months agoci: valve and freedreno farm is down
David Heidelberg [Sat, 10 Jun 2023 19:27:01 +0000 (21:27 +0200)]
ci: valve and freedreno farm is down

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

16 months agodocs: rusticl envvars list supported drivers
norablackcat [Fri, 9 Jun 2023 08:58:07 +0000 (02:58 -0600)]
docs: rusticl envvars list supported drivers

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

16 months agopanfrost: Replace the usage of PIPE_BIND_* with PAN_BIND_*
Yonggang Luo [Thu, 1 Jun 2023 16:02:48 +0000 (00:02 +0800)]
panfrost: Replace the usage of PIPE_BIND_* with PAN_BIND_*

PIPE_BIND_* belongs to gallium, do not use it in panvk

As pan_format.h also used ban panfrost gallium driver, so static_assert it equal

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23526>

16 months agoaco/rt: Do not initialize the next shader addr
Konstantin Seurer [Fri, 9 Jun 2023 08:34:30 +0000 (10:34 +0200)]
aco/rt: Do not initialize the next shader addr

The uniform one is already set and the raygen shader isn't guarded
anymore.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23545>

16 months agoradv/rt: Clear NIR metadata after lowering the ABI
Konstantin Seurer [Fri, 9 Jun 2023 08:26:26 +0000 (10:26 +0200)]
radv/rt: Clear NIR metadata after lowering the ABI

radv_nir_lower_rt_abi inserts instructions and control flow.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23545>

16 months agoradv/rt: Do not guard the raygen shader
Konstantin Seurer [Fri, 9 Jun 2023 08:16:39 +0000 (10:16 +0200)]
radv/rt: Do not guard the raygen shader

The condition will always evaluate to true because it's set this way by
the prolog.

Quake II RTX:

Totals from 7 (10.00% of 70) affected shaders:
Instrs: 30070 -> 30056 (-0.05%); split: -0.07%, +0.03%
CodeSize: 163476 -> 163420 (-0.03%); split: -0.06%, +0.03%
Latency: 80335 -> 83887 (+4.42%)
InvThroughput: 16870 -> 17603 (+4.34%)
Copies: 3191 -> 3215 (+0.75%)
Branches: 1273 -> 1266 (-0.55%)
PreSGPRs: 356 -> 354 (-0.56%)

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23545>

16 months agoac/llvm: replace MESA_SHADER_COMPUTE checks with gl_shader_stage_is_compute
Karol Herbst [Wed, 10 May 2023 23:40:51 +0000 (01:40 +0200)]
ac/llvm: replace MESA_SHADER_COMPUTE checks with gl_shader_stage_is_compute

This will be required for OpenCL subgroup support on radeonsi, but also
fixes some regressions today as radeonsi started to use the subgroup id
for invocation_index calculation.

Fixes: 39da12b7c7c ("ac/llvm: clean up visit_load_local_invocation_index and visit_load_subgroup_id")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23551>

16 months agoac/llvm: support vec2 on b2i16
Karol Herbst [Fri, 9 Jun 2023 13:27:18 +0000 (15:27 +0200)]
ac/llvm: support vec2 on b2i16

Since radeonsi sets the alu_to_scalar callback, frontends like Rusticl
might end up generating vec2 b2i16. Support this just like it's done for
b2f16.

Fixes: d692d433f28 ("radeonsi: use nir_lower_alu_to_scalar correctly")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23551>

16 months agoradv: disable calibrated timestamps on raven/raven2
Chia-I Wu [Tue, 6 Jun 2023 23:25:37 +0000 (16:25 -0700)]
radv: disable calibrated timestamps on raven/raven2

amdgpu enables gfxoff by default and the feature resets the RLC clock
counter on idle on raven/raven2.  Querying AMDGPU_INFO_TIMESTAMP does
not work as expected on those platforms.

There was an attempt in amdgpu to read from the TSC register instead,
but it did not work without a firmware update[1].  Another possible
solution is to disable the clock counter reset by clearing
AMD_PG_SUPPORT_RLC_SMU_HS, but that causes a 0.2W increase of power
consumption on idle which is undesirable.

The clock counter reset affects vkCmdWriteTimestamp as well.  The spec
is vague on whether that is allowed or not.  The WG is aware of the
issue[2] but never really addresses it.

[1] https://lists.freedesktop.org/archives/amd-gfx/2023-May/093731.html
[2] https://github.com/KhronosGroup/Vulkan-Docs/issues/216

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

16 months agofrontends/va: Fix missing unlock
Vinson Lee [Wed, 7 Jun 2023 06:16:19 +0000 (23:16 -0700)]
frontends/va: Fix missing unlock

Fix defect reported by Coverity Scan.

Missing unlock (LOCK)
missing_unlock: Returning without unlocking drv->mutex.

Fixes: af695149e96 ("frontends/va: pass in film_grain_target as new output")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23488>

16 months agozink/ci: remove spec@nv_shader_atomic_int64@* from the fail lists
Martin Roukala (né Peres) [Fri, 9 Jun 2023 13:47:50 +0000 (16:47 +0300)]
zink/ci: remove spec@nv_shader_atomic_int64@* from the fail lists

Fixes: 56eb83115538 ("aco: run nir_lower_int64 after nir_opt_uniform_atomics")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23553>

16 months agointel: use generated helpers for Wa_1508744258
Mark Janes [Wed, 8 Feb 2023 23:47:20 +0000 (15:47 -0800)]
intel: use generated helpers for Wa_1508744258

iris_disable_rhwo_optimization can only apply on gfxver 12.0, and has
a version check to that affect.  Add an assertion to warn us if the
workaround ever applies to another version.

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

16 months agoci/android: remove the artifact file just as we unpack it
David Heidelberg [Fri, 9 Jun 2023 17:07:18 +0000 (19:07 +0200)]
ci/android: remove the artifact file just as we unpack it

At this point is not needed anymore, remove it.

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

16 months agoci/lava: rename rest local MINIO_ variables to S3_
David Heidelberg [Fri, 9 Jun 2023 17:11:24 +0000 (19:11 +0200)]
ci/lava: rename rest local MINIO_ variables to S3_

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

16 months agoci: remove BUILD_PATH, always use S3_ARTIFACT_NAME
David Heidelberg [Fri, 9 Jun 2023 17:59:20 +0000 (19:59 +0200)]
ci: remove BUILD_PATH, always use S3_ARTIFACT_NAME

Since we use S3 artifacts for LAVA always, keep only one codepath.

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

16 months agoci: replace MINIO_RESULTS_UPLOAD with S3_RESULTS_UPLOAD
David Heidelberg [Fri, 9 Jun 2023 17:09:34 +0000 (19:09 +0200)]
ci: replace MINIO_RESULTS_UPLOAD with S3_RESULTS_UPLOAD

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

16 months agoci: rename MINIO_HOST variable to S3_HOST
David Heidelberg [Thu, 8 Jun 2023 15:38:22 +0000 (17:38 +0200)]
ci: rename MINIO_HOST variable to S3_HOST

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

16 months agoci: rename MINIO to S3
David Heidelberg [Thu, 8 Jun 2023 15:34:04 +0000 (17:34 +0200)]
ci: rename MINIO to S3

We don't use MINIO for a long time. Rename variable accordingly.

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

16 months agoci: rename S3 artifacts according to scheme mesa-$arch-$config-$buildtype
David Heidelberg [Thu, 8 Jun 2023 15:22:13 +0000 (17:22 +0200)]
ci: rename S3 artifacts according to scheme mesa-$arch-$config-$buildtype

Make the S3 (previously MINIO) artifacts clearly identifiable by glance.

Also now we fail before compilation, if the job doesn't define
the BUILDTYPE variable to prevent confusion.

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

16 months agoci: explicitely state BUILDTYPE
David Heidelberg [Thu, 8 Jun 2023 15:42:44 +0000 (17:42 +0200)]
ci: explicitely state BUILDTYPE

Fail when a job gets introduced without build type.
It should be explicitly stated what job uses.

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

16 months agonir: Rematerialize derefs after opt_dead_cf
Mykhailo Skorokhodov [Tue, 23 May 2023 20:26:43 +0000 (23:26 +0300)]
nir: Rematerialize derefs after opt_dead_cf

Adding `nir_rematerialize_derefs_in_use_blocks_impl`
solves some cases when 'opt_dead_cf()' generates
a phi instruction for the first argument
of the `deref_store` intrinsic.

Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Lionel Landwerlin's avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6742
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22983>

16 months agoanv: allow intel_clflush_range only on igpu
Filip Gawin [Tue, 30 May 2023 16:03:50 +0000 (18:03 +0200)]
anv: allow intel_clflush_range only on igpu

fixes: 521c216efcc0d0292ceedb3451c5a0a1ef956083
closes: #9106

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

16 months agointel/compiler: Remove unused functions and declarations
Caio Oliveira [Thu, 8 Jun 2023 22:31:11 +0000 (15:31 -0700)]
intel/compiler: Remove unused functions and declarations

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

16 months agoCODEOWNERS: add r300 driver
Pavel Ondračka [Tue, 6 Jun 2023 13:40:19 +0000 (15:40 +0200)]
CODEOWNERS: add r300 driver

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

16 months agoetnaviv: Add support for conditional rendering
Christian Gmeiner [Fri, 29 Nov 2019 15:20:43 +0000 (16:20 +0100)]
etnaviv: Add support for conditional rendering

The hardware doesn't support native conditional rendering, so it is
implemented by software.

Code borrowed from Freedreno and Panfrost.

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

16 months agoetnaviv: optimize transfer flushes
Lucas Stach [Fri, 9 Jun 2023 10:26:14 +0000 (12:26 +0200)]
etnaviv: optimize transfer flushes

Context flushes that are triggered by a pending write to the resource
don't need to realize visibility of the resource changes outside of
the context. Skip implicit resource flushes in those cases.

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

16 months agoaco: Lower divergent bool phis iteratively
Friedrich Vock [Thu, 8 Jun 2023 16:56:43 +0000 (18:56 +0200)]
aco: Lower divergent bool phis iteratively

Avoids stack overflows with really large programs.

No fossil-db changes.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8760
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8701

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23531>

16 months agoagx: Fold addressing math into atomics
Alyssa Rosenzweig [Sun, 28 May 2023 01:57:35 +0000 (21:57 -0400)]
agx: Fold addressing math into atomics

Like our loads and stores, our global atomics support indexing with a 64-bit
base plus a 32-bit element index, zero- or sign-extended and multiplied by the
word size. Unlike the loads and stores, they do not support additional shifting
(it's not too useful), so that needs an explicit lowering.

Switch to using AGX variants of the atomics, running our address pattern
matching on global atomics in order to delete some ALU.

This cleans up the image atomic lowering nicely, since we get to take full
advantage of the shift + zero-extend + add on the atomic... The shift comes from
multiplying by the bytes per pixel.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23529>

16 months agoagx: Refactor expressions in agx_nir_lower_address
Alyssa Rosenzweig [Sun, 28 May 2023 01:51:00 +0000 (21:51 -0400)]
agx: Refactor expressions in agx_nir_lower_address

So we can add more instructions without duplication.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23529>

16 months agonir: Add AGX atomic intrinsics
Alyssa Rosenzweig [Sun, 28 May 2023 01:57:04 +0000 (21:57 -0400)]
nir: Add AGX atomic intrinsics

This is a piece of cake with unified atomics :-) This will let us do our
addressing math tricks nice and easily.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23529>

16 months agoir2: Drop lower_locals_to_regs call
Alyssa Rosenzweig [Mon, 29 May 2023 19:45:21 +0000 (15:45 -0400)]
ir2: Drop lower_locals_to_regs call

This is for producing (indirect) array register access. Since we don't handle
that, this is a no-op. Drop the call, it's pointless and misleading.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23529>

16 months agolima: Drop lower_locals_to_regs call
Alyssa Rosenzweig [Mon, 29 May 2023 19:45:01 +0000 (15:45 -0400)]
lima: Drop lower_locals_to_regs call

This is for producing (indirect) array register access. Since we don't handle
that, this is a no-op. Drop the call, it's pointless and misleading.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23529>

16 months agopan/mdg: Drop lower_locals_to_regs call
Alyssa Rosenzweig [Mon, 29 May 2023 19:43:31 +0000 (15:43 -0400)]
pan/mdg: Drop lower_locals_to_regs call

This is for producing (indirect) array register access. Since we don't handle
that, this is a no-op. Drop the call, it's pointless and misleading.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23529>

16 months agoamd/ci: add another test to the vkcts-vega10 flake list
Martin Roukala (né Peres) [Fri, 9 Jun 2023 09:22:45 +0000 (12:22 +0300)]
amd/ci: add another test to the vkcts-vega10 flake list

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

16 months agozink/ci: add more QBO-related fails on RADV
Martin Roukala (né Peres) [Fri, 9 Jun 2023 07:28:16 +0000 (10:28 +0300)]
zink/ci: add more QBO-related fails on RADV

These seem to have been forgotten during the original filing, probably
because more than 25 failures were found, and so deqp-runner limited
itself to 25.

References: #9174
Fixes: dad91dc7c47c ("zink: update some radv qbo fails")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23547>

16 months agoaco: run nir_lower_int64 after nir_opt_uniform_atomics
Rhys Perry [Wed, 7 Jun 2023 15:37:51 +0000 (16:37 +0100)]
aco: run nir_lower_int64 after nir_opt_uniform_atomics

nir_opt_uniform_atomics can create 64-bit ALU instructions which need to
be lowered.

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

16 months agorusticl/icd: use new proc macros
Karol Herbst [Sat, 3 Jun 2023 13:07:18 +0000 (15:07 +0200)]
rusticl/icd: use new proc macros

This drops quite a lot of boilerplate code as this is now all generated
via our proc macros.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed by Nora Allen <blackcatgames@protonmail.com>

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

16 months agorusticl/icd: make release return nothing
Karol Herbst [Sat, 3 Jun 2023 16:29:55 +0000 (18:29 +0200)]
rusticl/icd: make release return nothing

I don't even know why it was like that...

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23413>

16 months agorusticl: add proc macro module for generating API stubs
Karol Herbst [Sat, 3 Jun 2023 12:59:41 +0000 (14:59 +0200)]
rusticl: add proc macro module for generating API stubs

Most of the API stubs are very very trivial to generate as the sole
purpose of those are to deconstruct the returned `Result` object.

Sadly we can't use external crates yet, so "syn" and "qoute" can't be used
for this :'(

The code is kinda hacky, but we also don't expose this to other people, so
we can keep this as a big hack until we can use external crates.

I wish there was a better solution here.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23413>

16 months agoetnaviv: rs: unconditionally flush color and depth cache before using RS
Lucas Stach [Thu, 8 Jun 2023 20:03:41 +0000 (22:03 +0200)]
etnaviv: rs: unconditionally flush color and depth cache before using RS

When the RS uses the pixel pipes it seems to destroy/invalidate any
content sitting in the color and depth caches from a previous draw.
Always flush the color and depth cache before using the RS to make
sure that any cache content written by the PE is properly flushed
to memory.

Fixes spec@!opengl 1.0@gl-1.0-drawpixels-depth-test and probably a
few others that are suffering from corruption of PE writes.

CC: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23530>

16 months agoetnaviv: rs: flush TS cache before making configuration changes
Lucas Stach [Thu, 8 Jun 2023 19:58:19 +0000 (21:58 +0200)]
etnaviv: rs: flush TS cache before making configuration changes

Move the TS cache flush into the same conditional block where
the TS setup is changed. TS cache always needs to be flushed
before making any changes to the TS setup.

CC: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23530>

16 months agoanv/video: move video requirements to outarray.
Hyunjun Ko [Thu, 8 Jun 2023 07:48:54 +0000 (09:48 +0200)]
anv/video: move video requirements to outarray.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23519>

16 months agoci/b2c: update to mesa-trigger:2023-03-08.1
Martin Roukala (né Peres) [Thu, 1 Jun 2023 10:25:33 +0000 (13:25 +0300)]
ci/b2c: update to mesa-trigger:2023-03-08.1

This should speed up job submission by 3 to 30 seconds depending on
the farm the machine is hosted in, and how busy it is.

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

16 months agorusticl: compile r600 driver
Gert Wollny [Wed, 14 Dec 2022 09:12:49 +0000 (10:12 +0100)]
rusticl: compile r600 driver

To really use the driver it still needs to be enabled with

  export RUSTICL_ENABLE=r600

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

16 months agor600/sfn: Handle load_global in 64 to vec2 lowering
Gert Wollny [Wed, 14 Dec 2022 09:59:47 +0000 (10:59 +0100)]
r600/sfn: Handle load_global in 64 to vec2 lowering

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

16 months agor600/sfn: Handle store_global when lowering 64 bit ops to vec2
Gert Wollny [Wed, 14 Dec 2022 09:59:04 +0000 (10:59 +0100)]
r600/sfn: Handle store_global when lowering 64 bit ops to vec2

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

16 months agor600/sfn: Add experimental support for load/store_global
Gert Wollny [Fri, 9 Dec 2022 16:02:37 +0000 (17:02 +0100)]
r600/sfn: Add experimental support for load/store_global

This is needed for rusticl, but the results may be unexpected.

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

16 months agointel/nir: switch ray query state tracking to local variables uint16_t
Lionel Landwerlin [Thu, 17 Nov 2022 21:32:21 +0000 (23:32 +0200)]
intel/nir: switch ray query state tracking to local variables uint16_t

We should be able to use uint8_t but there appears to be a backend
bug.

Q2RTX shader compute shader improvement with ray queries :

Totals:
Instrs: 102221 -> 101499 (-0.71%); split: -0.82%, +0.12%
Cycles: 4451260 -> 4396025 (-1.24%)
Send messages: 3587 -> 3585 (-0.06%)
Spill count: 717 -> 658 (-8.23%)
Fill count: 1248 -> 1214 (-2.72%); split: -3.21%, +0.48%
Scratch Memory Size: 21504 -> 16384 (-23.81%)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19982>

16 months agoradv/video: fix hevc scaling list order.
Dave Airlie [Fri, 9 Jun 2023 02:55:11 +0000 (12:55 +1000)]
radv/video: fix hevc scaling list order.

pps takes priority.

Fixes: da54b57888cf ("radv/video: fix hevc scaling lists.")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23537>

16 months agoradv/video: report bad profile operation if h264 profile isn't supported.
Dave Airlie [Thu, 8 Jun 2023 03:07:09 +0000 (13:07 +1000)]
radv/video: report bad profile operation if h264 profile isn't supported.

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23537>

16 months agoradeonsi: enable aco support for gs copy shader
Qiang Yu [Mon, 5 Jun 2023 09:31:23 +0000 (17:31 +0800)]
radeonsi: enable aco support for gs copy shader

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

16 months agoradeonsi: enable aco for standalone gs
Qiang Yu [Thu, 1 Jun 2023 06:45:18 +0000 (14:45 +0800)]
radeonsi: enable aco for standalone gs

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

16 months agoac/llvm,radeonsi: lower nir_load_ring_gsvs_amd in abi
Qiang Yu [Fri, 2 Jun 2023 08:25:47 +0000 (16:25 +0800)]
ac/llvm,radeonsi: lower nir_load_ring_gsvs_amd in abi

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

16 months agoradeonsi: add scratch_offset arg for aco gs
Qiang Yu [Thu, 1 Jun 2023 07:12:50 +0000 (15:12 +0800)]
radeonsi: add scratch_offset arg for aco gs

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

16 months agoradeonsi: enable aco support for standalone tes
Qiang Yu [Tue, 23 May 2023 07:45:20 +0000 (15:45 +0800)]
radeonsi: enable aco support for standalone tes

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

16 months agoradeonsi: update lds size for tes
Qiang Yu [Tue, 23 May 2023 09:40:02 +0000 (17:40 +0800)]
radeonsi: update lds size for tes

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

16 months agoradeonsi: init tes aco shader info fields
Qiang Yu [Tue, 23 May 2023 08:25:58 +0000 (16:25 +0800)]
radeonsi: init tes aco shader info fields

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