Commit graph

63067 commits

Author SHA1 Message Date
David Rosca
eafeff6302 gallium/auxiliary/vl: Support interleaved input in deinterlace filter
This adds support for deinterlacing interleaved surfaces (both fields
interleaved together instead of as separate layers).

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26174>
2023-11-15 01:44:29 +00:00
David Rosca
35b0ccd855 gallium/auxiliary/vl: Scale dst_rect x0/y0 when rendering chroma plane
This fixes incorrect chroma plane position when x0/y0 is not zero.

Fixes: 001358a97c ("vl/compositor: add a new function for YUV deint")

Acked-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26123>
2023-11-15 01:12:01 +00:00
David Rosca
e9091b1f5c gallium/auxiliary: Fix coordinates clamp in util_compute_blit
Fixes: 7c8e1596d6 ("gallium/auxiliary: Fix util_compute_blit half texel offset with scaling")

Acked-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26123>
2023-11-15 01:12:01 +00:00
David Rosca
ef0546152f gallium/auxiliary/vl: Fix coordinates clamp in compute shaders
Fixes: a6a43963ed ("gallium/auxiliary/vl: Clamp coordinates in compute shaders")

Acked-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26123>
2023-11-15 01:12:01 +00:00
Helen Koike
bff7e4b69d ci/zink: add spec@ext_timer_query@time-elapsed to flakes
Add the following flake to zink-anv-tgl-flakes.txt

spec@ext_timer_query@time-elapsed

See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25861#note_2140498

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25885>
2023-11-14 17:29:30 +00:00
Jesse Natalie
2f1cb79968 d3d12: GL4.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26180>
2023-11-14 16:04:58 +00:00
Jesse Natalie
5a5178d5a4 d3d12: Fix MSAA-disabling pass; sample mask should be 0 for helper lanes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26180>
2023-11-14 16:04:58 +00:00
Jesse Natalie
ba06542c7b d3d12: Handle cull distance as an XFB target
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26180>
2023-11-14 16:04:58 +00:00
Jesse Natalie
263b56051d d3d12: PRIMITIVES_GENERATED for stream > 0 should only be an SO query
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26180>
2023-11-14 16:04:58 +00:00
LingMan
76996e2a94 rusticl: Use the from_raw_parts wrappers
Deduplicates some safety checks and ensures we didn't forget one.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26157>
2023-11-14 12:31:31 +00:00
LingMan
471d89c4fd rusticl/api: Add checking wrappers around slice::from_raw_parts{_mut}
They check for null, alignment, excessive size, and address space wrapping. If any of the checks
fails, `Err(CL_INVALID_VALUE)` is returned.

The caller still has to uphold the other requirements of the `from_raw_parts` fns.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26157>
2023-11-14 12:31:31 +00:00
LingMan
572a96aa59 rusticl: Turn pointers in enqueue_svm_memcpy_impl into slices
Allows the closure to implement `Send` and `Sync`, which we want for `EventSig`.
Includes detailed documentation on the casts and unsafe operations.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26157>
2023-11-14 12:31:31 +00:00
LingMan
7dd5a22735 rusticl: Turn pointers in enqueue_svm_mem_fill_impl into proper Rust types
Raw pointers have bad ergonomics and by using them we opt out of a lot of Rust safety guarantees.
The closure we create modifies the memory behind `svm_ptr`. Make that clear to the compiler by
representing it as slice. `pattern` could also be represented by a slice but then we'd create
overly generic code not exploiting the guarantees given to us be the OpenCL spec.
Namely that there's only a few possible sizes - all of them a power of two - and that `svm_ptr` is
aligned to that size.

Thus, represent `pattern` as one struct per possible size and have the compiler generate optimized
code paths for filling the buffer with each of them. There's one unsafe operation less and the
remaining ones as well as the casts have been documented in detail.

Based on that additional checks of the provided `size` have been added. While it's unlikely that
any application will ever run into them, the old pointer arithmetic already silently relied on
these properties.

Furthermore, since raw pointers are neither `Send` or `Sync` but the Rust types we now use are the
closure can now implement `Send` and `Sync`. That's one step toward marking `EventSig` `Send`.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26157>
2023-11-14 12:31:31 +00:00
Eric Engestrom
fdbb5d5898 ci/valve-infra: ensure the correct farm picks up the job
Until now, any farm that has a DUT that matches could have picked up the
job.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25821>
2023-11-14 10:25:24 +00:00
Pierre-Eric Pelloux-Prayer
898ccf7711 radeonsi/ci: update failures
Remove GTF-GL46.gtf21.GLCoverage.CoverageGL21 from failing tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25956>
2023-11-14 09:28:00 +00:00
Tapani Pälli
e4db19afa7 iris: add data cache flush for pre hiz op
This fixes various failing Piglit tests on DG2.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22717>
2023-11-14 08:30:59 +00:00
Faith Ekstrand
80376146ed nak: Encode program headers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:06 +00:00
Jesse Natalie
9ef621ec2e d3d12: ARB_query_buffer_object and GL4.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26156>
2023-11-14 00:18:53 +00:00
Jesse Natalie
6384ccd1cd d3d12: Reference count queries in a batch
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26156>
2023-11-14 00:18:53 +00:00
Jesse Natalie
9caea4c3e9 d3d12: Enable ARB_enhanced_layouts and ARB_texture_mirror_clamp_to_edge
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26156>
2023-11-14 00:18:53 +00:00
Jesse Natalie
707cdac7e7 d3d12: Fix GS variant I/O slot counts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26156>
2023-11-14 00:18:53 +00:00
Jesse Natalie
9fe88dd9b9 d3d12: Support enhanced layouts for VS inputs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26156>
2023-11-14 00:18:53 +00:00
Jesse Natalie
72341747f4 d3d12: Split dvec3 interpolatns into devc2 and double
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26156>
2023-11-14 00:18:53 +00:00
Jesse Natalie
1aa56d486c d3d12: Fix location_frac_mask bitfield size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26156>
2023-11-14 00:18:53 +00:00
Jesse Natalie
c77f8b4db0 microsoft/compiler: Stop lowering all I/O to temps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26156>
2023-11-14 00:18:53 +00:00
Ruijing Dong
8e03c18914 frontends/va: add intra-refresh in VAAPI interface
Row and column modes are enabled, not the mixed mode,
application should have a logic of sending a period
of intra-refresh sequence to complete the intra-refresh
cycle.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26133>
2023-11-13 14:29:40 +00:00
Ruijing Dong
7fae1c46ad radonesi/vcn: enable intra-refresh in vcn encoders
Enable intra-fresh in vcn encoders and support avc/hevc/av1 codecs.
Just if B frames is enabled or the number of temporal layers is
larger than 1, intra-refresh will be disabled, because it doesn't
support intra-refresh on B frames, and on sub-temporal layers.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26133>
2023-11-13 14:29:40 +00:00
Ruijing Dong
5524faa22c radeonsi/vcn: change intra-ref name
1. change structure name from intra-ref to intra-refresh
2. add need_sequence_header variable
3. add intra-refresh cap enum

Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26133>
2023-11-13 14:29:40 +00:00
Ruijing Dong
66c75b0ca2 radeonsi/vcn: preparation for enc intra-refresh
This is a prepration for adding intra-refresh
in vcn encoders. Intra-refresh is a feature for
smoothing out fluctuation in bitrate by replacing
a whole intra frame by several intra strips distributed
in several continous frames, it is also used in
suppressing error propagation situation.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26133>
2023-11-13 14:29:40 +00:00
Hans-Kristian Arntzen
f69863fd5a radv/radeonsi: Forward correct GPU instance to umr.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24578>
2023-11-13 13:37:27 +00:00
Mary Guillemard
fe159c85de zink: Check for VK_EXT_extended_dynamic_state3 before setting A2C
Fix crashes for piglit alpha-to-coverage tests when
VK_EXT_extended_dynamic_state3 is not supported (like on Venus)

Fixes: 736577871b ("zink: check for cbuf0 writes before setting A2C")

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26003>
2023-11-13 10:18:54 +00:00
Iago Toral Quiroga
d04538653b v3d: implement support for PIPE_CAP_NATIVE_FENCE_FD
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Tested-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20602>
2023-11-13 06:55:23 +01:00
Rob Clark
4807c1e173 freedreno: Always attach bo to submit
Even if app triggers undefined behaviour by using a rsc on multiple
contexts without a flush, we still should attach the bo to the batch.

Fixes: b43e5aec0d ("freedreno/batch: Move submit bo tracking to batch")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26162>
2023-11-12 23:06:27 +00:00
Rob Clark
3f3fa5ee0c freedreno/a6xx: Rework wave input size
Rework to match tu.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7464
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26149>
2023-11-12 19:53:01 +00:00
Rob Clark
a07705def6 freedreno/a6xx: Don't set patch_vertices if no tess
Don't pollute the cache key with unused fields to avoid potentially
generating pointless shader variants.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26149>
2023-11-12 19:53:01 +00:00
antonino
0976dfeca2 nir/zink: drop NIH helper in favor of mesa_vertices_per_prim
`lower_pv_mode_vertices_for_prim` and `decomposed_primitive_size` return
the same values as `mesa_vertices_per_prim` for the primitives that can
be used as output in geometry shaders.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26117>
2023-11-11 10:27:21 +00:00
Qiang Yu
768c5934d0 radeonsi: fix piglit image coherency test when use aco
spec@arb_shader_image_load_store@coherency will write to coherent
image in tess shader and read it in fragmant shader. There is a
geometry shader in between.

When lower ngg for the geometry shader, it will wait memory writes
before pos0 export if there's no param output to prevent fragment
shader start early and read any previous memory writes.

We need to update the memory writes info of GS with ES ones because
ES and GS is merged into one shader but when nir they are separated.
LLVM does not have this problem because it will add memory write
wait at the beginning of GS automatically.

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/26122>
2023-11-11 03:55:22 +00:00
Phillip Pearson
7dcca9d0ef radeonsi: use PRIu64 instead of %lu for uint64_t formatting
This unbreaks 32-bit builds (i386 and armhf).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26083>
2023-11-11 00:07:43 +00:00
Marek Olšák
aff7df717d radeonsi/ci: update failures for gfx103
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25941>
2023-11-10 18:03:57 -05:00
Marek Olšák
09c513a31a radeonsi: don't dma-upload shaders on APUs
We don't have VRAM on APUs, so it's useless.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25941>
2023-11-10 18:03:57 -05:00
Marek Olšák
3f108e7615 radeonsi/gfx11: don't set OREO_MODE to fix rare corruption
This is recommended by hw people.

Fixes: 19a59f05a4 - radeonsi/gfx11: program db render control register

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25941>
2023-11-10 18:03:57 -05:00
Marek Olšák
2ac6816b70 radeonsi/gfx11: use SET_CONTEXT_REG_PAIRS_PACKED for other states
It's used where registers are non-contiguous.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25941>
2023-11-10 18:03:57 -05:00
Marek Olšák
9579503bef radeonsi: adjust the total viewport area
I think these are the correct numbers.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25941>
2023-11-10 18:03:57 -05:00
Roman Stratiienko
56451ce773 v3d: Don't implicitly clear the content of the imported buffer
v3d driver will implicitly clear the buffer's content on the first write
operation. This clearing operation is helpful for allocated buffers,
initializing them with zeros instead of having memory garbage.

Also, this avoids reading the buffer from the RAM to the GPU cache
before rendering, making the first write operation slightly faster.

The clearing operation should not happen for imported buffers where
the buffer may already contain valuable data and the user may want
to render into the buffer only partially.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26136>
2023-11-10 11:16:53 +00:00
Eric Engestrom
aba837ef71 radv+zink/ci: add navi10 flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26135>
2023-11-09 20:59:36 +00:00
Eric Engestrom
5819e0a527 radv+zink/ci: add polaris10 flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26135>
2023-11-09 20:59:36 +00:00
Dave Stevenson
4b9e80a925 gallium: Add udl (DisplayLink) to the list of kmsro drivers
The udl is a simple render only driver, so configure it
appropriately in gallium.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26129>
2023-11-09 16:57:08 +00:00
Dave Stevenson
720c829341 gallium: Add more TinyDRM drivers to the list of kmsro drivers
As a follow-up to
8cfc17bdda ("kmsro: Add the rest of the current set of tinydrm drivers.")
and
0a42d5b98b ("kmsro: add _dri.so to two of the kmsro drivers.")
add even more TinyDRM drivers that have been added to the kernel but not
to gallium.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26129>
2023-11-09 16:57:08 +00:00
Rob Clark
b1fc5390c6 freedreno/a6xx: Fix antichamber trace replay assert
This app is generating viewports with scale[0]==0, so that is not a good
condition for testing viewport validity.  It would result in skipping
the only viewport, and ending up with gb x/y being ~0.  Triggering an
assert in the register builder.

The main reason this was done previously was to avoid an assert in
fd_calc_guardband().  Lets just flip it around and return 0x1ff on
errors instead of asserting.  This also makes it more consistent with
the other error cases.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7628
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26086>
2023-11-08 22:27:00 +00:00
Rob Clark
a9bdf58c36 freedreno/a6xx: Assume MOD_INVALID imports are linear
Without !25945 we must assume imports with invalid modifier are linear.
When both sides support metadata, we can promote the modifier.

Fixes: 33de58154f ("freedreno: Handle DRM_FORMAT_MOD_QCOM_TILED3 import")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26115>
2023-11-08 19:12:47 +00:00