Mike Blumenkrantz
565ee4fafc
zink: fix separate shader patch variable location adjustment
...
in spirv, these start at location 0, not location 32
fixes #10414
Fixes: d9942442f2 ("zink: handle patch variable locations for separate shaders better")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26981 >
2024-01-11 23:59:11 +00:00
Corentin Noël
1279e7b6c7
zink: Use memmove when dealing with overlapping memory
...
Fix defect reported by Coverity Scan.
Overlapping buffer in memory copy
Results in an undefined behavior
CID: 1515598
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26922 >
2024-01-11 23:11:52 +00:00
Corentin Noël
a18171968c
zink: Avoid the use of negative array offsets
...
Fix defect reported by Coverity Scan.
Negative array index read
A memory location at a negative offset from the beginning of the array will be read, resulting in incorrect values.
CID: 1515600
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26922 >
2024-01-11 23:11:52 +00:00
Jesse Natalie
bc65d14ddb
ci/windows: Update WARP to 1.0.9 NuGet
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26992 >
2024-01-11 20:38:51 +00:00
Pavel Ondračka
9530ec9c07
r300: skip draw if vertex shader does not write gl_Position
...
Fixes few more piglit crashes.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27006 >
2024-01-11 19:59:45 +00:00
Pavel Ondračka
53c17d85ab
r300: fix reusing of color varying slots for generic ones
...
This was broken when I added texcoord support, the problem is that we
failed to properly count the number of used fs inputs and thus we failed
to make the proper decision when to reuse the color varying slot
Also fix the error messages, they were incorrect after the rewrite as
well. This fixes a bunch of piglits.
Fixes: d4b8e8a481
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27003 >
2024-01-11 19:44:25 +00:00
Alan Liu
74eb511458
radeonsi/vpe: Don't map and unmap emb_buffer every time in process_frame
...
We don't need to map and unmap emb_buffers every time in process_frame.
Instead, we can just map the buffers at create_processor and unmap at
process_destroy, and reuse the mapped address in process_frame.
v2:
Remove RADEON_MAP_TEMPORARY flag when calling buffer_map().
Signed-off-by: Alan Liu <haoping.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841 >
2024-01-11 19:21:17 +00:00
Alan Liu
82314a6dad
radeonsi/vpe: Add environment variable to set embbuf number
...
Add an environment variable to allow users to set embbuf number before run time.
Signed-off-by: Alan Liu <haoping.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841 >
2024-01-11 19:21:17 +00:00
Peyton Lee
211b67c79b
radeonsi/vpe: pre-allocate stream struceutre
...
Allocate stream structure when vpe is created.
No need to allocate and free stream everytime in process_frame.
Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841 >
2024-01-11 19:21:17 +00:00
Peyton Lee
bd37cbc8e5
radeonsi/vpe: support multi-buffer
...
Allocate mulitple embbuf for cycle using.
Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841 >
2024-01-11 19:21:17 +00:00
Peyton Lee
f6f9e3fe08
radeonsi/vpe: move flush to si_vpe_processor_end_frame
...
move cs_flush() to si_vpe_processor_end_frame() to fit the behavior as decoder.
Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841 >
2024-01-11 19:21:17 +00:00
Peyton Lee
14365ea353
radeonsi/vpe: disable info log
...
Set default log level to 0.
Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841 >
2024-01-11 19:21:17 +00:00
Peyton Lee
7bea7ced40
radeonsi/vpe: remove wait source surface fence and while loop
...
Kernel will handle source waiting, so remove the user mode waiting.
Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841 >
2024-01-11 19:21:16 +00:00
Mike Blumenkrantz
465e26dd98
lavapipe: fix devenv icd filename
...
fixes #10408
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26985 >
2024-01-11 18:29:55 +00:00
Yonggang Luo
8c847eb2de
treewide: Use align64 instead of ALIGN for 64 bit value parameter
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932 >
2024-01-11 17:30:46 +00:00
Yonggang Luo
fb55c70269
svga: Cleanup duplicate ALIGN macro defines
...
Use ALIGN function instead
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932 >
2024-01-11 17:30:46 +00:00
Yonggang Luo
0b9c96562b
treewide: Use util_is_power_of_two_nonzero{64|_uintptr} when needed
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26909 >
2024-01-11 16:45:57 +00:00
Mike Blumenkrantz
bf729063c3
lavapipe: use pushconstants2 for dgc
...
Fixes: ec656e1984 ("lavapipe: maint6")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26977 >
2024-01-11 15:59:17 +00:00
José Expósito
0f57ffb845
zink: add render-passes HUD query
...
Add a driver specific query to display the number of render passes per
frame in the Gallium HUD.
Suggested in https://gitlab.freedesktop.org/mesa/mesa/-/issues/7327
Signed-off-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26518 >
2024-01-11 15:07:52 +00:00
Juan A. Suarez Romero
c31be1f4ba
v3d: show warning on creating a v3d screen on real hw
...
Rpi4 and beyond uses vc4 hardware to handle the display.
When forcing `MESA_LOADER_DRIVER_OVERRIDE=v3d` on it, it will try to
create a screen through v3d hardware, which does not exist, and thus
fail.
This is intended to be used with the simulator on x86 hardware, so
let's print a warning in case of trying to use it with real rpi.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27001 >
2024-01-11 13:09:55 +00:00
Juan A. Suarez Romero
0557f0d59c
Revert "v3d: use kmsro to create drm screen on real hw"
...
Let's not depend on kmsro to create the screen.
This reverts commit 8f621174da .
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27001 >
2024-01-11 13:09:55 +00:00
Alessandro Astone
a077c14f15
zink: Fix resizable BAR detection logic
...
This was broken in two ways:
* When looking for the MAX biggest_ram it was actually comparing
a candidate against biggest_vis_ram
* mem_props.memoryTypes[] should be accessed with the memory type
index as found in heap_map
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10341
Cc: 23.3 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26979 >
2024-01-10 17:53:21 +00:00
Ruijing Dong
9d1e69ca45
radeonsi/vcn: update session_info from vcn3 and up.
...
session_info needs to be updated to vcn4 and up, since
it is safe to change it from vcn3 to cover all the needed
VCNs, thus this change came from VCN3.
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/26940 >
2024-01-10 17:36:06 +00:00
Max R
75fa621d34
d3d10umd: Fix compilation
...
Fixes: 4eb4c9bba ("d3d10umd: use cso_context to set vertex buffers and elements")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10054
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26370 >
2024-01-10 15:52:52 +00:00
Mike Blumenkrantz
0444d057ae
zink: ignore tc buffer replacement info
...
without tc tracking cross-context buffer usage, this is intensely broken
Fixes: 96cf4531e1 ("Revert "gallium/u_threaded: buffer sharedness tracking"")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26959 >
2024-01-10 15:35:12 +00:00
Mike Blumenkrantz
6e4d901a2e
zink: fix buffer rebind early-out check
...
this was accidentally inverted; the rebind attempt is over if the
number of enacted rebinds >= the expected rebinds
Fixes: c32bcb9a8c ("zink: improve handling of buffer rebinds using tc info")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26959 >
2024-01-10 15:35:12 +00:00
Alyssa Rosenzweig
8ddd89ffa5
nir,zink: Redefine flat_mask in terms of I/O locations
...
Robust against separable shaders, and still makes sense for lowered I/O drivers,
whereas just counting FS variables and expecting them to match with the VS is...
questionable.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: antonino <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26888 >
2024-01-10 14:30:14 +00:00
Alyssa Rosenzweig
ab7fb3d400
asahi: don't canonicalize nans/flush denorms when copying
...
CL image copies
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
5cd7416542
asahi: fallback some resource copies
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
dd42bf84a3
asahi: fix passthrough GS with poly modes
...
affects wireframe xfb piglits.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
f6d5832b6c
asahi: plumb get_ubo_size
...
for robustness lowering.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
21aaba5b83
asahi: inline something silly
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
ed05cfb674
asahi: disable fp16 cbuf cap
...
GTF-GL46.gtf21.GL2Tests.glGetUniform.glGetUniform
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
dd840eb501
asahi: divide by xfb stride for xfb draws
...
KHR-GL46.transform_feedback.draw_xfb_stream_instanced_test
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
8ce71e5b88
asahi: invert program_point_size
...
make 0 the default value.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
5eae46d9ea
asahi: rm agx_vbufs wrapper
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
9192d8367b
asahi: rm vbuf.count from key
...
Unused and causing piles of shader variants in STK. Yikes.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
13603bedc7
asahi: rm blend->store from shader key
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
3f094e635f
asahi: rm nr_cbufs from key
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
d31d0af5c5
asahi: rm logicop enable bit
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
1bdf189393
asahi: rm unused blend enable bit
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
97f9f7ab0a
asahi: implement point sprites w/o shader key
...
we can replace varyings with point sprites, we just need to fix up .zw
appropriately. do that with some bcsels, ALU is cheap.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
ba0f28ad8b
asahi: rm layered bit from shader key
...
Just always use layered, like AGXV. This was a pointless bit of optimization
that only affects render target spilling with neglible impact.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
5931862c29
asahi: rm pointless multisample key bit
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
78614653a6
asahi: bump vertex shader outputs
...
KHR-Single-GL46.enhanced_layouts.xfb_explicit_location
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
1006e27627
asahi: implement xfb overflow queries
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
c4fd1abc8b
asahi: stub qbo on the cpu
...
allowed by spec, perf will suck of course.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
6deaaaa46a
asahi: rework compute emptiness tracking
...
from debugging tess.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
i509VCB
d30b0adddb
agx: remove internal agx_device queue
...
The internal queue is unusued by agxv. An earlier commit changed the gallium driver to initialize it's own queue.
Signed-off-by: i509VCB <git@i509.me>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00
i509VCB
8f52e72686
asahi: create queue for screen
...
Signed-off-by: i509VCB <git@i509.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00