platform/upstream/mesa.git
13 months agoaco: implement 64bit div find_lsb
Georg Lehmann [Tue, 26 Sep 2023 16:29:31 +0000 (18:29 +0200)]
aco: implement 64bit div find_lsb

This can be selected for divergent subgroupBallotFindLSB.

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

13 months agoaco: fix p_extract with v1 dst and s1 operand
Georg Lehmann [Tue, 26 Sep 2023 15:13:12 +0000 (17:13 +0200)]
aco: fix p_extract with v1 dst and s1 operand

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: f14023666ca ("aco: Allow p_extract to have different definition and operand sizes.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25403>

13 months agoaco/waitcnt: add print helpers
Rhys Perry [Mon, 25 Sep 2023 11:29:26 +0000 (12:29 +0100)]
aco/waitcnt: add print helpers

These may be useful in the future.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25373>

13 months agoaco/waitcnt: replace wait_cnt::*_cnt with booleans
Rhys Perry [Mon, 25 Sep 2023 11:22:05 +0000 (12:22 +0100)]
aco/waitcnt: replace wait_cnt::*_cnt with booleans

Previously, a loop could be revisited until a counter reaches it's
maximum:
loop {
   store()
}
Each visit of that loop would increase vs_cnt until it reaches max.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25373>

13 months agozink: lower vec8/16
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
zink: lower vec8/16

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25330>

13 months agonir: add nir_lower_alu_vec8_16_srcs pass
Karol Herbst [Thu, 21 Sep 2023 12:03:55 +0000 (14:03 +0200)]
nir: add nir_lower_alu_vec8_16_srcs pass

This pass is useful for vector based backends as we might end up with alu
instructions referencing vec8/vec16 values even though being vec4 or
smaller themselves.

This new pass intents to clean up any use of vec8/vec16 sources other
passes won't.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25330>

13 months agovc4: Fix mask RGBA validation at YUV blit
Jose Maria Casanova Crespo [Mon, 25 Sep 2023 19:16:59 +0000 (21:16 +0200)]
vc4: Fix mask RGBA validation at YUV blit

Solves regression on video players using GPU for
video decoding that just displays the video in green.

Fixes: d13da7782cd80 ("vc4: call blit paths in chain")
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25412>

13 months agoci/docs: drop extra overwritten rules
Eric Engestrom [Wed, 20 Sep 2023 15:05:39 +0000 (16:05 +0100)]
ci/docs: drop extra overwritten rules

Every job re-defines its own rules, so there is no point in including these here.

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

13 months agoiris: use intel_needs_workaround for Wa_14014414195 part 2
Tapani Pälli [Tue, 19 Sep 2023 17:18:58 +0000 (20:18 +0300)]
iris: use intel_needs_workaround for Wa_14014414195 part 2

Commit 3ec953ed755 left couple of extra things, these changes are
based on a patch from Francisco Jerez.

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

13 months agointel/compiler: Don't store stage name and abbrev
Caio Oliveira [Mon, 25 Sep 2023 04:38:47 +0000 (21:38 -0700)]
intel/compiler: Don't store stage name and abbrev

Those are used in the failure paths and are easily retriavable from the
stage itself, so no need to store them.

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

13 months agollvmpipe: reset viewport_index_slot in fb bind
Dave Airlie [Tue, 26 Sep 2023 01:40:18 +0000 (11:40 +1000)]
llvmpipe: reset viewport_index_slot in fb bind

I hit a problem running a set of lvp caselists with
dEQP-VK.transform_feedback.simple.draw_indirect_endqueryindexed_streamid_0_16,Crash

This was crashing due to
 assert(setup->viewport_index_slot < 0);
in try_update_scene_state

This was because a previous draw had set viewport index slot to 2,
but a clear then draw sequence never resets it, so the clear gets
a scene, and when the subsequent flush happens for that scene,
the viewport_index_slot is never updated. It only gets updated on
draws.

This just resets it as lp_setup_update_state will always pick up
the correct one for the next draw.

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

13 months agorusticl/mesa/context: fix clear_sampler_views
Karol Herbst [Sat, 23 Sep 2023 10:01:14 +0000 (12:01 +0200)]
rusticl/mesa/context: fix clear_sampler_views

Even though drivers are required by documentation to handle the samplers
being NULL, st/mesa changed enough so it always sets the pointer.

As being similiar to st/mesa is more important than following docs, we
simply mimic st/mesa here and meet the expectations of drivers.

In the future we want to track the set state similiar to st/mesa, so
`clear_sampler_views` will probably go away and we'll just update what
we'll need.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25363>

13 months agosvga: sync resource content from backing resource before image upload
Charmaine Lee [Wed, 7 Jun 2023 20:49:28 +0000 (23:49 +0300)]
svga: sync resource content from backing resource before image upload

When a backing resource is created for a render target view when the
same resource is currently bound to a shader resource view, the content
update back to the original resource happens when the associated render
target view is unbound. But state update only happens at clear or draw
time. So if TexSubImage happens after BindFrameBuffer and before Draw,
the original texture resource that is mapped to for subimage update
would not have been updated. As a matter of fact at the subsequent state
update at the next draw, the render target views will be updated, the
content from the previous backing resource will be propogated to the
original resource, hence overwriting the changes from the last TexSubImage.

To fix the problem, this patch validates the texture resource, updates
any pending changes from the backing resource before transfer map upload
occurs.

Fixes the rendering issue demonstrated from the fbo_texsubimage_update trace

Reviewed-by: Martin Krastev <krastevm@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25386>

13 months agopanfrost: advertise YUV formats for valhall
Italo Nicola [Tue, 26 Sep 2023 13:44:33 +0000 (13:44 +0000)]
panfrost: advertise YUV formats for valhall

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24479>

13 months agopanfrost: use centered YUV chroma siting
Italo Nicola [Tue, 26 Sep 2023 13:24:53 +0000 (13:24 +0000)]
panfrost: use centered YUV chroma siting

This is likely a more reasonable default than co-sited samples, and will be
needed for valhall.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24479>

13 months agopanfrost: prepare v9+ to support YUV sampling
Italo Nicola [Thu, 3 Aug 2023 13:50:16 +0000 (13:50 +0000)]
panfrost: prepare v9+ to support YUV sampling

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24479>

13 months agopanfrost: rename _needs_multiplanar_descriptor to _is_yuv
Italo Nicola [Thu, 3 Aug 2023 13:57:01 +0000 (13:57 +0000)]
panfrost: rename _needs_multiplanar_descriptor to _is_yuv

This is only really used to condition on YUV formats, even on v7, but
moreso now on v9+.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24479>

13 months agopan/genxml: add Width/Height fields to v9+ Plane descriptor
Italo Nicola [Thu, 3 Aug 2023 13:54:26 +0000 (13:54 +0000)]
pan/genxml: add Width/Height fields to v9+ Plane descriptor

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24479>

13 months agollvmpipe/fs: fix regression in sample mask handling from tgsi removal.
Dave Airlie [Tue, 26 Sep 2023 02:43:37 +0000 (12:43 +1000)]
llvmpipe/fs: fix regression in sample mask handling from tgsi removal.

This got the bits the wrong way,
dEQP-VK.rasterization.frag_side_effects.color_at_beginning.sample_mask_after

Fixes: a63c2daf7ad7 ("llvmpipe/fs: start using nir info in some places.")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25396>

13 months agofreedreno: Add Adreno 643
Konrad Dybcio [Tue, 26 Sep 2023 16:53:34 +0000 (18:53 +0200)]
freedreno: Add Adreno 643

Just another funny speedbin of A635

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25408>

13 months agofreedreno: Include speedbin fallback in 690 chipid to fix probing
Konrad Dybcio [Mon, 25 Sep 2023 16:28:27 +0000 (18:28 +0200)]
freedreno: Include speedbin fallback in 690 chipid to fix probing

The kernel exposes CHIP_ID, which consists of:

[63:48] const 0 / reserved
[47:32] speedbin (default 0xffff)
[31:0 ] actual gpu chip ID

Fix the 690 chip id to make it probe correctly.
Keep the existing entry for the downstream KGSL driver.

This is essentially the same as Commit 6067aba9e6db ("freedreno: Include
speedbin fallback in 740 chipid to fix probing"), except for the older
core.

Fixes: 210c6c11cc61 ("freedreno+tu: Add a690 support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25408>

13 months agodocs/meson: drop mention that our meson is ready
Eric Engestrom [Thu, 21 Sep 2023 09:38:43 +0000 (10:38 +0100)]
docs/meson: drop mention that our meson is ready

It's been ready for a very long time, and scons & autotools are long
gone with only meson left, so this note doesn't make much sense anymore.

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

13 months agoci: unify container and build jobs rules
Eric Engestrom [Tue, 19 Sep 2023 13:09:10 +0000 (14:09 +0100)]
ci: unify container and build jobs rules

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

13 months agointel/pci_ids: Consistently use lowercase
Lina Versace [Fri, 15 Sep 2023 23:55:39 +0000 (16:55 -0700)]
intel/pci_ids: Consistently use lowercase

The pci ids used a mixture of uppercase and lowercase, even in the same
file. The inconsistency introduces unnecessary complexity in regular
expressions.

Diff made in vim with `%s/\v(CHIPSET\()([^,]+)/\1\L\2\E/`.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>`
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25257>

13 months agomeson/rusticl: add sha1_h
Karol Herbst [Tue, 26 Sep 2023 11:52:29 +0000 (13:52 +0200)]
meson/rusticl: add sha1_h

This ensures this file is generated.

Fixes: 20c90fed5a0 ("rusticl: added")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25400>

13 months agoradv/ci/vkcts-navi10: catch all the line-related flakes
Martin Roukala (né Peres) [Tue, 26 Sep 2023 05:00:46 +0000 (08:00 +0300)]
radv/ci/vkcts-navi10: catch all the line-related flakes

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

13 months agoradv/ci/vkcts-navi21: document more flakes
Martin Roukala (né Peres) [Tue, 26 Sep 2023 04:57:17 +0000 (07:57 +0300)]
radv/ci/vkcts-navi21: document more flakes

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

13 months agoradv/ci/vkcts-navi21: catch all the line_stipple_(enable|params) flakes
Martin Roukala (né Peres) [Tue, 26 Sep 2023 04:55:37 +0000 (07:55 +0300)]
radv/ci/vkcts-navi21: catch all the line_stipple_(enable|params) flakes

There are so many of these tests, so let's just write a regular
expression to catch them all.

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

13 months agogallium/auxiliary/vl: Only map the shader constants buffer in render
David Rosca [Sat, 2 Sep 2023 08:00:09 +0000 (10:00 +0200)]
gallium/auxiliary/vl: Only map the shader constants buffer in render

Don't map the buffer in vl_compositor_set_csc_matrix.
This avoids mapping the buffer twice with compute shaders.

Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25258>

13 months agogallium/auxiliary/vl: Fix YUV to RGB bob compute shader deinterlacing
David Rosca [Sun, 3 Sep 2023 07:40:05 +0000 (09:40 +0200)]
gallium/auxiliary/vl: Fix YUV to RGB bob compute shader deinterlacing

This reverts commit ef0d92459c3f and instead removes the y coordinate
divide by two in weave shaders. The scale ratio now works correctly
with interlaced input.

Also remove the YUV to YUV bob shader and reuse the progressive shader
for bob deinterlacing, same as in YUV to RGB case (video_buffer shader).

Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25258>

13 months agogallium/auxiliary/vl: Use chroma offset in YUV to RGB weave compute shader
David Rosca [Sat, 2 Sep 2023 15:19:44 +0000 (17:19 +0200)]
gallium/auxiliary/vl: Use chroma offset in YUV to RGB weave compute shader

Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25258>

13 months agogallium/auxiliary/vl: Add RGB to YUV compute shader
David Rosca [Wed, 30 Aug 2023 11:18:30 +0000 (13:18 +0200)]
gallium/auxiliary/vl: Add RGB to YUV compute shader

Compared to fragment shader that was being used before, it supports
chroma location and fixes wrong color at right/bottom edge when scaling.

Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25258>

13 months agomesa: Ensure that the baselevel will never exceed the maximal supported number
Corentin Noël [Mon, 25 Sep 2023 09:08:13 +0000 (11:08 +0200)]
mesa: Ensure that the baselevel will never exceed the maximal supported number

GL_TEXTURE_BASE_LEVEL is only supported up to MAX_TEXTURE_LEVELS

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

13 months agoradv: declare shader_query_state for mesh/task shaders
Samuel Pitoiset [Thu, 21 Sep 2023 12:01:34 +0000 (14:01 +0200)]
radv: declare shader_query_state for mesh/task shaders

This will control whether mesh/task queries is enabled.

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

13 months agoradv: enable lowering of mesh/task shader queries when enabled
Samuel Pitoiset [Wed, 20 Sep 2023 14:45:04 +0000 (16:45 +0200)]
radv: enable lowering of mesh/task shader queries when enabled

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

13 months agoradv: adjust lowering of intrinsic queries for mesh/task shaders
Samuel Pitoiset [Wed, 20 Sep 2023 15:11:17 +0000 (17:11 +0200)]
radv: adjust lowering of intrinsic queries for mesh/task shaders

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

13 months agoradv: add GDS counters offset for mesh/task queries
Samuel Pitoiset [Wed, 20 Sep 2023 15:11:04 +0000 (17:11 +0200)]
radv: add GDS counters offset for mesh/task queries

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

13 months agoac/nir: add lowering for task shader queries
Samuel Pitoiset [Thu, 21 Sep 2023 11:53:59 +0000 (13:53 +0200)]
ac/nir: add lowering for task shader queries

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

13 months agoac/nir: add lowering for mesh shader queries
Samuel Pitoiset [Wed, 20 Sep 2023 15:03:29 +0000 (17:03 +0200)]
ac/nir: add lowering for mesh shader queries

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

13 months agonir: rename atomic_add_gs_invocation_count_amd to make it more generic
Samuel Pitoiset [Thu, 21 Sep 2023 06:38:09 +0000 (08:38 +0200)]
nir: rename atomic_add_gs_invocation_count_amd to make it more generic

It will be re-used to implement mesh/tash shader invocations queries.

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

13 months agomesa: Fix zeroing of new ParameterValues array entries when growing
Kenneth Graunke [Tue, 19 Sep 2023 00:43:01 +0000 (17:43 -0700)]
mesa: Fix zeroing of new ParameterValues array entries when growing

On non-Windows OSes, align_realloc is the os_realloc_aligned() from
src/util/os_memory_aligned.h, which doesn't use realloc internally.
Instead, it uses os_malloc_aligned() and memcpy's over the old data,
which is why it needs an "old size" (unlike normal realloc).

In _mesa_reserve_parameter_storage, the call to align_realloc above
passes (oldValNum * sizeof(gl_constant_value)) as the old size, which
is all the actual data.  The actual allocation size of the array may
be larger (in fact, we allocate 16 extra components), which is tracked
in SizeValues.  After realloc, we memset to zero starting at the old
allocation size, to the new allocation size.

This would work if it were a real realloc.  However, because we actually
malloc + memcpy and only copy the previous /data/, not the allocated
size, and then memset from the old /allocated size/, our new copy will
have the spaces between the old data and the old allocation size neither
copied nor memset, leaving them as uninitialized garbage memory.

These values then get written to the shader cache, meaning that if you
compile the same shader multiple times, you may get different shader
cache entries.  This is bad for reproducible, deterministic compiles.

While at it, we also memset to zero in _mesa_add_parameter, as this
looks like another place where memset-to-zero is missing.

To reproduce this error, one can run shader-db:

$ MESA_SHADER_CACHE_DIR=a ./run -b shaders/godot3.4/49-28.shader_test
$ MESA_SHADER_CACHE_DIR=b ./run -b shaders/godot3.4/49-28.shader_test

and see an occasional difference in the end of the ParameterValues
array, where there's a padding gap between the last two elements that
was never zero-initialized.

Thanks to Mark Janes for discovering this and tracking it down together!

Cc: mesa-stable
Reviewed-by: Mark Janes <markjanes@swizzler.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25316>

13 months agoamd/llvm: fix build with LLVM 18
Marek Olšák [Mon, 25 Sep 2023 19:57:33 +0000 (15:57 -0400)]
amd/llvm: fix build with LLVM 18

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

13 months agogallivm: fix build with LLVM 18
Marek Olšák [Mon, 25 Sep 2023 19:46:59 +0000 (15:46 -0400)]
gallivm: fix build with LLVM 18

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

13 months agonvk: Don't store the descriptor pool BO in the set
Faith Ekstrand [Mon, 25 Sep 2023 23:08:50 +0000 (18:08 -0500)]
nvk: Don't store the descriptor pool BO in the set

Instead, store an address, size, and mapped pointer.  This is more
consistent with how things like images work.

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

13 months agonvk/drm: Split exec as needed for large command buffers
Faith Ekstrand [Mon, 25 Sep 2023 22:46:06 +0000 (17:46 -0500)]
nvk/drm: Split exec as needed for large command buffers

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

13 months agonvk/drm: Restructure nvk_queue_submit_drm_nouveau()
Faith Ekstrand [Mon, 25 Sep 2023 22:22:13 +0000 (17:22 -0500)]
nvk/drm: Restructure nvk_queue_submit_drm_nouveau()

Now that we don't need the lock, we can return directly.  Also, now that
we don't have the old UAPI, we can clean things up and make the whole
function make a bit more sense.  Also, drop some pointless braces while
we're just moving code around.

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

13 months agonvk: Get rid of the tiled memory allocation helpers
Faith Ekstrand [Mon, 25 Sep 2023 22:28:02 +0000 (17:28 -0500)]
nvk: Get rid of the tiled memory allocation helpers

These existed entirely to support shadow memory for VkImage cases where
we needed tiling.  Now that we have VM_BIND, these are no longer used so
we can drop the wrappers and just implement VkAllocate/FreeMemory again.

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

13 months agonvk: Drop the device-level mutex
Faith Ekstrand [Mon, 25 Sep 2023 22:20:31 +0000 (17:20 -0500)]
nvk: Drop the device-level mutex

This existed to let us lock the memory_objects list and for handling
BO-based vk_sync waits.  We don't have either of these things anymore so
there's no need for a device-level lock.  We already have fine-grained
locks around the data structures that need them.

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

13 months agonvk: Drop memory object tracking
Faith Ekstrand [Mon, 25 Sep 2023 22:19:59 +0000 (17:19 -0500)]
nvk: Drop memory object tracking

We no longer have to pass a list of BOs to the kernel so there's no need
to track allocated memory objects like this.

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

13 months agonvk: Drop command buffer BO tracking
Faith Ekstrand [Mon, 25 Sep 2023 22:12:51 +0000 (17:12 -0500)]
nvk: Drop command buffer BO tracking

We no longer need to provide this information to the kernel so there's
no reason to track it.

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

13 months agonvk/drm: Drop the push_add_bo() helper
Faith Ekstrand [Mon, 25 Sep 2023 22:12:30 +0000 (17:12 -0500)]
nvk/drm: Drop the push_add_bo() helper

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

13 months agonvk/drm: Drop the push_add_push_bo() helper
Faith Ekstrand [Mon, 25 Sep 2023 22:08:11 +0000 (17:08 -0500)]
nvk/drm: Drop the push_add_push_bo() helper

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

13 months agonvk: Rip out old UAPI support
Faith Ekstrand [Sat, 23 Sep 2023 15:55:23 +0000 (10:55 -0500)]
nvk: Rip out old UAPI support

This was mostly generated by

    unifdef -DNVK_NEW_UAPI=1 -m src/nouveau/**/*.h

with a few manual fixups for device features and to remove includes and
strip out the meson bits.

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

13 months agoanv: fix a leak of fp64_nir shader
Tapani Pälli [Mon, 25 Sep 2023 12:15:05 +0000 (15:15 +0300)]
anv: fix a leak of fp64_nir shader

Fixes: 8c4c4c3ee1a2 ("anv: Add softtp64 workaround")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9846
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25372>

13 months agoutil: Fix bookkeeping of linear node sizes
Caio Oliveira [Mon, 25 Sep 2023 21:46:49 +0000 (14:46 -0700)]
util: Fix bookkeeping of linear node sizes

When creating a new node, we were clobbering the original size
requested, and use that as offset, so the node would always be full.

Fixes: 591db9a9a54 ("util: Remove per-buffer header in linear alloc for release mode")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25382>

13 months agodraw/mesh: reset some user state values on mesh draws.
Dave Airlie [Tue, 26 Sep 2023 00:24:23 +0000 (10:24 +1000)]
draw/mesh: reset some user state values on mesh draws.

Otherwise previous non-mesh draws and can leave things dirty.

Fixes crashes in:
dEQP-VK.mesh_shader.ext.query.all_queries.triangles.reset_before.copy.no_wait.indirect_draw.32bit.no_availability.no_blocks.task_mesh.inside_rp.single_view.with_secondary
after other shaders have run.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25385>

13 months agoanv: don't use cmd_buffer after destroyed.
Hyunjun Ko [Mon, 25 Sep 2023 01:41:44 +0000 (10:41 +0900)]
anv: don't use cmd_buffer after destroyed.

Fixes: 13b3d7f74 ("anv: Handle companion RCS in end/destory/reset code path")

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25366>

13 months agosvga: use srv raw buffer for accessing readonly shader buffer
Charmaine Lee [Tue, 13 Sep 2022 05:33:01 +0000 (08:33 +0300)]
svga: use srv raw buffer for accessing readonly shader buffer

When a surface is to be created for a buffer that is to be persistently mapped,
set the UAV bind flag as well, otherwise, an extra copy of the surface will have
to be created when the buffer is later bound as shader storage buffer, and
it will then incur extra buffer copies to keep the shadow copies of the surface
in sync. But when a buffer is simultanously bound to uniform buffer and shader
storage buffer, having both srv and uav on the same resource can also be costly.
This patch also provides optimization for readonly shader buffer. In this case,
instead of creating uav for accessing a readonly shader buffer, srv
raw buffer is used instead.

Tested with yuzu tracefile included in VMware bug 3029385.

Reviewed-by: Martin Krastev <krastevm@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25381>

13 months agosvga: fix immediates used in rawbuf for constant buffer
Charmaine Lee [Tue, 19 Sep 2023 19:29:28 +0000 (22:29 +0300)]
svga: fix immediates used in rawbuf for constant buffer

Since constant buffers can be accessed as raw buffers, indices to
the constant buffers will have to be declared as immediates.
But it is a waste to define immediates for every possible indices
to the constant buffer, we will only include immediates that are used in
the shader. But since immediate block is declared in a very early stage
of a shader, this patch will append any new immediates to the immediate
list and reemit the immediate block if needed.

Fixes assertion running yuzu

Reviewed-by: Maaz Mombasawalam <mombasawalam@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25381>

13 months agosvga: restrict use of rawbuf for constant buffer access to GL43 device
Charmaine Lee [Thu, 8 Sep 2022 22:08:59 +0000 (15:08 -0700)]
svga: restrict use of rawbuf for constant buffer access to GL43 device

Restrict use of rawbuf for constant buffer access to GL43 capable
device only.

Fixes glretrace regressions running with SW Renderer.

Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25381>

13 months agosvga: fix persistent mapped surface update to constant buffer
Charmaine Lee [Mon, 29 Aug 2022 21:14:30 +0000 (14:14 -0700)]
svga: fix persistent mapped surface update to constant buffer

Currently when a buffer is mapped with the persistent bit set and is
later bound as a constant buffer, the updated buffer content is not
properly updated to the constant buffer surface as the constant buffer
surface is different from the original buffer surface. Doing
a buffer copy to sync the content of the constant buffer will fix
the problem, but the buffer copy can be costly.
To properly fix the issue, instead of creating a secondary surface
for the constant buffer, the original buffer surface will be accessed as
a raw buffer.

This fixes the rendering issue running yuzu deko_basic.nro

Reviewed-by: Martin Krastev <krastevm@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25381>

13 months agoci: Upref virglrenderer
Gert Wollny [Mon, 25 Sep 2023 11:44:26 +0000 (13:44 +0200)]
ci: Upref virglrenderer

Pull in the latest changes regarding texture wrapping
modes handling.

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

13 months agovirgl: report MIRROR_CLAMP features better
Gert Wollny [Sat, 4 Mar 2023 17:12:09 +0000 (18:12 +0100)]
virgl: report MIRROR_CLAMP features better

The new host version checks the support of these features better,
so report here accordingly. This fixes a number of texwrap piglit
tests on Intel.

v2: Stick to old test for PIPE_CAP_TEXTURE_MIRROR_CLAMP because
    host has to be backward compatible.

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

13 months agonvk: Advertise discreteQueuePriorities = 2
Faith Ekstrand [Mon, 25 Sep 2023 22:00:05 +0000 (17:00 -0500)]
nvk: Advertise discreteQueuePriorities = 2

This is a lie since we don't do anything with queue priorities at
present but Vulkan requires us to advertise at least 2.

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

13 months agonvk: Advertise maxMemoryAllocationCount = 4096
Faith Ekstrand [Mon, 25 Sep 2023 21:59:29 +0000 (16:59 -0500)]
nvk: Advertise maxMemoryAllocationCount = 4096

This is the minimum and also what the proprietary driver advertises.

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

13 months agonvk: Re-order physical device limits
Faith Ekstrand [Mon, 25 Sep 2023 21:57:42 +0000 (16:57 -0500)]
nvk: Re-order physical device limits

They now match the order in vulkan_core.h which makes it easier to find
missing entries of which there was one.  This also fixes a bug where we
were setting .bufferImageGranularity twice and we were overwriting the
correct value with an incorrect one.

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

13 months agotu: Remove pipeline from state
Connor Abbott [Tue, 12 Sep 2023 18:59:11 +0000 (20:59 +0200)]
tu: Remove pipeline from state

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

13 months agotu: Don't use pipeline for active stages
Connor Abbott [Tue, 12 Sep 2023 18:58:40 +0000 (20:58 +0200)]
tu: Don't use pipeline for active stages

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

13 months agotu: Don't use pipeline for per_view_viewport
Connor Abbott [Tue, 12 Sep 2023 18:56:43 +0000 (20:56 +0200)]
tu: Don't use pipeline for per_view_viewport

We already have the state in the command buffer.

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

13 months agotu: Don't use pipeline for bandwidth validity
Connor Abbott [Tue, 12 Sep 2023 18:53:31 +0000 (20:53 +0200)]
tu: Don't use pipeline for bandwidth validity

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

13 months agotu: Don't use pipeline for dynamic draw states
Connor Abbott [Tue, 12 Sep 2023 18:18:31 +0000 (20:18 +0200)]
tu: Don't use pipeline for dynamic draw states

For dynamic states that are precompiled from static state, just set the
corresponding dynamic draw state directly, and keep a record of which
ones are precompiled when we go to emit states at draw time so we don't
accidentally re-emit them.

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

13 months agotu: Make compute dispatch use the shader
Connor Abbott [Tue, 12 Sep 2023 18:08:51 +0000 (20:08 +0200)]
tu: Make compute dispatch use the shader

With this, the last use of the compute pipeline is gone. We still use
the pipeline for the load state, though.

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

13 months agotu: Don't reference pipeline for some draw states
Connor Abbott [Tue, 12 Sep 2023 11:06:27 +0000 (13:06 +0200)]
tu: Don't reference pipeline for some draw states

These draw states are things that depend on pipeline-only state:

- The load state depends on knowing the pipeline layout, which we won't
  know for a shader that's loaded from a binary. This is going away on
  a7xx anyway, and we should be able to use the a7xx strategy of
  prefetching the descriptors in the preamble on a6xx too.
- The prim order state depends on feedback loops and raster order
  attachment access, which isn't supported at the moment.

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

13 months agotu: Rewrite remaining pipeline LRZ handling
Connor Abbott [Mon, 11 Sep 2023 15:56:38 +0000 (17:56 +0200)]
tu: Rewrite remaining pipeline LRZ handling

Now that the FS-specific parts are split out, the only remaining part is
the blend state part. Use the same state that we use for dynamic
blending for static blending, eliminating the last use of the pipeline
in the LRZ code. While we're at it fix a bug where dynamic blending
didn't always disable LRZ writes (even though it only mattered with a
non-conformant debug flag because we invalidated LRZ anyway).

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

13 months agotu: Use pipeline feedback loop flag indirectly
Connor Abbott [Mon, 11 Sep 2023 14:51:26 +0000 (16:51 +0200)]
tu: Use pipeline feedback loop flag indirectly

Remove another use of the pipeline.

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

13 months agotu: Decouple program state from the pipeline
Connor Abbott [Fri, 8 Sep 2023 11:41:18 +0000 (13:41 +0200)]
tu: Decouple program state from the pipeline

There are a couple pieces of state that we can't calculate until we know
all of the shaders:

- The actual variants to use (i.e. whether to use safe-const variants)
- Program config and VPC draw states
- Const layout, which depends on the variants
- Whether per-view viewports should be enabled

Now that these are all combined in tu_pipeline::program, move these into
a separate struct that can be referenced directly without a pipeline.
The next step is to refactor the code filling it out so that it can be
called at draw time when given just the shaders.

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

13 months agotu: Rework passing shared consts
Connor Abbott [Thu, 7 Sep 2023 14:42:44 +0000 (16:42 +0200)]
tu: Rework passing shared consts

The way this works now is awkward to map to shader objects. We don't
have the pipeline layout when "linking" shaders at draw time, so we have
to piece it together from the shaders. Store the information we need in
the shaders and piece it together.

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

13 months agotu: Rewrite tessellation modes handling
Connor Abbott [Wed, 6 Sep 2023 15:24:00 +0000 (17:24 +0200)]
tu: Rewrite tessellation modes handling

Before this, we combined the modes after compiling the shaders when
constructing the pipeline. But that's a bit awkward with shader objects,
where there is no good place to put state derived from TCS and TES but
not the other stages. However, shader objects leaves us with an out:
when compiling separately, the modes must be on one of the shaders. So
instead we just copy the modes earlier, in the NIR shaders, and then get
them from the appropriate shader later. That way there is no extra
overhead when fast-linking, as there currently is, and we don't need to
create an awkward separate object just for this.

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

13 months agotu: Use shader directly for VS/TCS output size and patch size
Connor Abbott [Tue, 5 Sep 2023 15:10:17 +0000 (17:10 +0200)]
tu: Use shader directly for VS/TCS output size and patch size

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

13 months agotu: Move FS-specific pipeline information to the shader
Connor Abbott [Tue, 5 Sep 2023 14:15:42 +0000 (16:15 +0200)]
tu: Move FS-specific pipeline information to the shader

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

13 months agotu: Start tracking shaders independently of pipeline
Connor Abbott [Mon, 4 Sep 2023 17:58:36 +0000 (19:58 +0200)]
tu: Start tracking shaders independently of pipeline

We will gradually transition over users of cmd->state.pipeline and
TU_CMD_DIRTY_PIPELINE to shaders and derived state from shaders. This
just puts in place the framework to start doing that.

When importing a library with all of the shader state, we now have to
import the shaders in addition to the program, so that they are
available when we bind the pipeline.

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

13 months agotu: Create singleton "empty" shaders
Connor Abbott [Mon, 4 Sep 2023 15:54:35 +0000 (17:54 +0200)]
tu: Create singleton "empty" shaders

The most important of these is the empty FS, which should cut down on
time spent in the compiler when we fast-link a pipeline where there is
only a library with the VS and no library with the empty FS. Source
engine is known to do this.

This is also necessary for shader objects where the "empty" shaders are
never created up-front. We will use these when a NULL shader is bound.

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

13 months agoutil: Add a few basic tests for linear_alloc
Caio Oliveira [Mon, 18 Sep 2023 01:32:28 +0000 (18:32 -0700)]
util: Add a few basic tests for linear_alloc

Not comprehensive, but those were the ones used to work on the
previous linear_alloc changes.  Also having a test already
set up lower the barrier to add more tests for future in case of
bugs.

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

13 months agoutil: Remove per-buffer header in linear alloc for release mode
Caio Oliveira [Mon, 18 Sep 2023 17:05:01 +0000 (10:05 -0700)]
util: Remove per-buffer header in linear alloc for release mode

There's only need to keep the offset and size of the latest buffer,
so rename linear_header into linear_ctx and change the code to
keep records there.

For debug mode we still keep a header, now called linear_node_canary,
to have a magic check.  Since due to alignment we have a free space,
also keep the individual occupation of each node (offset), for
debugging.

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

13 months agoutil: Remove size information from child allocations
Caio Oliveira [Mon, 18 Sep 2023 09:45:40 +0000 (02:45 -0700)]
util: Remove size information from child allocations

With linear_realloc() gone, there's no code that reads the size
in linear_size_chunk struct, so it can be removed.  This removes
the 8-byte overhead per child allocation and simplifies the
allocation code.

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

13 months agoutil: Remove linear_realloc()
Caio Oliveira [Mon, 18 Sep 2023 09:34:34 +0000 (02:34 -0700)]
util: Remove linear_realloc()

Now that linear_realloc() is unused, remove it.  It is not an actual
realloc, will always allocate new memory and copy data around -- and
had a big warning about it in the documentation.

In the couple of uses we had before, the client code knew the size,
so it could be changed to perform the allocation and the copy by
themselves.  The client code keeping the size is the recommended
way here.

This will allow us remove linear_size_chunk later.

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

13 months agoutil: Remove usages of linear_realloc()
Caio Oliveira [Mon, 18 Sep 2023 09:19:21 +0000 (02:19 -0700)]
util: Remove usages of linear_realloc()

Note that for linear allocator, the realloc will always
allocate new memory.  In both cases that realloc was used,
the existing size was known, so we can just allocate
and do the copy ourselves.

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

13 months agoutil: Use an opaque type for linear context
Caio Oliveira [Mon, 18 Sep 2023 08:51:13 +0000 (01:51 -0700)]
util: Use an opaque type for linear context

In the linear allocation only the parent (context) can be used
to allocate new children, so let's use an opaque type to identify
the linear context.  This is similar to what's done in GC allocator.

Update the documentation and a couple of function names to
refer to linear context instead of linear parent.

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

13 months agoutil: Make DECLARE_LINEAR_ALLOC_* macros assume no destructors
Caio Oliveira [Mon, 18 Sep 2023 08:15:42 +0000 (01:15 -0700)]
util: Make DECLARE_LINEAR_ALLOC_* macros assume no destructors

Linear allocator doesn't support calling custom destructors to
its child allocations nor freeing individual child allocations.
So the destructor callback and the delete operator don't apply
to objects using linear allocator.

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

13 months agoutil: Remove size from linear_parent creation
Caio Oliveira [Mon, 18 Sep 2023 06:11:58 +0000 (23:11 -0700)]
util: Remove size from linear_parent creation

None of the callsites took advantage of this, so remove
the feature.  This will help to a next change that will
add an opaque type to represent a linear parent.

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

13 months agoutil: Use linear parent to (r)allocated extra nodes
Caio Oliveira [Mon, 18 Sep 2023 02:15:42 +0000 (19:15 -0700)]
util: Use linear parent to (r)allocated extra nodes

Instead of making all the nodes children of the same original
ralloc_ctx, use that context just for the first node (which
is the linear parent).  The remaining nodes are (r)allocated
using the first one.

With that change, to free/steal, it is sufficient to apply the
operation to the first node, which uses the underlying linked
list between the nodes at ralloc level.  And we can remove
the 'next' pointer in linear_header, now unused.

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

13 months agoutil: Remove ralloc_parent from linear_header
Caio Oliveira [Mon, 18 Sep 2023 01:54:52 +0000 (18:54 -0700)]
util: Remove ralloc_parent from linear_header

We can reach the ralloc parent from the linear parent, since
it is what was used to allocate the linear parent in the first
place.

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

13 months agoradv/ci: skip dEQP-VK.robustness.* on Vangogh due to weird GPU hangs
Samuel Pitoiset [Fri, 22 Sep 2023 10:00:53 +0000 (12:00 +0200)]
radv/ci: skip dEQP-VK.robustness.* on Vangogh due to weird GPU hangs

For very weird reasons, this subset hangs on VanGogh only. It took a
while to figure out that and I can't reproduce on my Steam Deck. Skip
the whole subset for now until the issue is figured out to avoid
blocking the CTS update.

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

13 months agoci: update to vulkan-cts-1.3.6.3
Samuel Pitoiset [Mon, 4 Sep 2023 08:00:37 +0000 (10:00 +0200)]
ci: update to vulkan-cts-1.3.6.3

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

13 months agofreedreno: Include speedbin fallback in 730 chipid to fix probing
Konrad Dybcio [Mon, 25 Sep 2023 14:30:44 +0000 (16:30 +0200)]
freedreno: Include speedbin fallback in 730 chipid to fix probing

The kernel exposes CHIP_ID, which consists of:

[63:48] const 0 / reserved
[47:32] speedbin (default 0xffff)
[31:0 ] actual gpu chip ID

Fix the 730 chip id to make it probe correctly.
Keep the existing entry for the downstream KGSL driver.

This is essentially the same as Commit 6067aba9e6db ("freedreno: Include
speedbin fallback in 740 chipid to fix probing"), except for the older
core.

Fixes: cd3719be7d09 ("freedreno: Fully define a730 and a740 device properties")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25375>

13 months agoaco: reset prefetch in the correct block after removing the exit
Rhys Perry [Wed, 20 Sep 2023 18:27:39 +0000 (19:27 +0100)]
aco: reset prefetch in the correct block after removing the exit

fossil-db (navi31):
Totals from 279 (0.35% of 79332) affected shaders:
(no stat changes)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: c778803d673f ("aco/assembler: change prefetch mode on GFX10.3+ during loops if beneficial")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25312>

13 months agointel/ds: avoid dropping traces when running out of shared memory
Lionel Landwerlin [Wed, 30 Aug 2023 08:43:44 +0000 (11:43 +0300)]
intel/ds: avoid dropping traces when running out of shared memory

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24744>

13 months agoanv/utrace: trace CPU on timestamp buffer readiness
Lionel Landwerlin [Wed, 30 Aug 2023 08:43:03 +0000 (11:43 +0300)]
anv/utrace: trace CPU on timestamp buffer readiness

Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24744>

13 months agointel/ds: track number of tracepoint timestamp copies
Lionel Landwerlin [Tue, 29 Aug 2023 20:00:17 +0000 (23:00 +0300)]
intel/ds: track number of tracepoint timestamp copies

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24744>

13 months agoutil/u_trace: count number of tracepoints
Lionel Landwerlin [Tue, 29 Aug 2023 19:59:15 +0000 (22:59 +0300)]
util/u_trace: count number of tracepoints

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24744>