Pierre-Eric Pelloux-Prayer
63a3a9b23b
st/mesa: check renderbuffer before using it
...
rb being NULL is only checked for in the caller if no-error isn't
used.
cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9747
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25209 >
2023-09-18 08:18:39 +00:00
Pierre-Eric Pelloux-Prayer
af27ecb089
device_select: add shortcut for MESA_VK_DEVICE_SELECT_FORCE_DEFAULT_DEVICE
...
MESA_VK_DEVICE_SELECT_FORCE_DEFAULT_DEVICE=1 is useful but it's tedious
to type. This commit extends slightly DRI_PRIME/MESA_VK_DEVICE_SELECT
syntax support: if "!" is appended at the end then only the selected GPU
will be made visible to the application.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24750 >
2023-09-18 07:45:28 +00:00
Pierre-Eric Pelloux-Prayer
b935ce0131
docs: update DRI_PRIME documentation
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24750 >
2023-09-18 07:45:27 +00:00
Pierre-Eric Pelloux-Prayer
201662659e
device_select_layer: support DRI_PRIME=n
...
For feature-parity with OpenGL.
See commit "loader: extend DRI_PRIME to support =N".
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24750 >
2023-09-18 07:45:27 +00:00
Pierre-Eric Pelloux-Prayer
ea84b85887
loader: add DRI_PRIME_DEBUG env var
...
This makes debugging non-working DRI_PRIME selection much easier.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24750 >
2023-09-18 07:45:27 +00:00
Pierre-Eric Pelloux-Prayer
b8d0b1ceb5
loader: extend DRI_PRIME to support =N
...
DRI_PRIME=1 isn't useful on machines with more than 2 GPUs.
This commit adds support to DRI_PRIME=N syntax meaning: select
the Nth GPU (not counting the default GPU).
So on a 3 GPUs system where drmGetDevices2 returns the following:
/dev/dri/renderD130 [default]
/dev/dri/renderD129
/dev/dri/renderD128
DRI_PRIME=1 would select D129 (as is already the case without this
commit), DRI_PRIME=2 would select D128.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24750 >
2023-09-18 07:45:27 +00:00
Pierre-Eric Pelloux-Prayer
d052baf190
loader: refactor DRI_PRIME handling code
...
DRI_PRIME has 3 different meanings and this refactoring
separate the handling of them.
No functional changes.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24750 >
2023-09-18 07:45:27 +00:00
Pierre-Eric Pelloux-Prayer
06a3bb75e3
glx: drop the 'libGL' log prefix
...
Suggested by @ajax in !24750 .
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24750 >
2023-09-18 07:45:27 +00:00
Samuel Pitoiset
fa4d4f84a1
ac/spm: enable support for multi-instance counters
...
This is what RGP expects and this will give us more fine grained
results given that all shader engines/shader arrays etc would be
sampled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25240 >
2023-09-18 07:07:32 +00:00
Samuel Pitoiset
414783162a
ac/spm: move the counter instance to ac_spm_counter_create_info
...
This will allow us to configure multi-instance counters.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25240 >
2023-09-18 07:07:32 +00:00
Samuel Pitoiset
d5a5473185
ac,radv,radeonsi: prepare support for multi-instance SPM generic counters
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25240 >
2023-09-18 07:07:31 +00:00
Samuel Pitoiset
ed0d3d8cbd
ac,radv,radeonsi: prepare support for multi-instance SPM SQ counters
...
Each SQG modules can configure up to 16 counters.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25240 >
2023-09-18 07:07:31 +00:00
Samuel Pitoiset
af4d4f5203
ac/spm: fix number of instances of GL2C
...
It's a global block, so the number of instances is equal.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25240 >
2023-09-18 07:07:31 +00:00
Samuel Pitoiset
0e4d5b171a
radv,radeonsi: make sure to emit GRBM_GFX_INDEX before SQ select registers
...
This was missing, but not sure if it was required given that only the
first SE is currently sampled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25240 >
2023-09-18 07:07:31 +00:00
Samuel Pitoiset
3e8922d9f7
ac/spm: select correct segment type for per-SE blocks
...
This currently does nothing because only the first instance is used,
but this will be needed for multi-instance.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25240 >
2023-09-18 07:07:31 +00:00
Samuel Pitoiset
033e49995d
ac/spm: use block flags to initialize instance mapping
...
This simplify this a bit, ideally we would also have a per-SA flag
for performance counters.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25240 >
2023-09-18 07:07:31 +00:00
Samuel Pitoiset
037d7d0f5b
radv: reserve more CS space in SQTT/SPM paths
...
This will prevent an assertion when SPM will emit more counters.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25240 >
2023-09-18 07:07:31 +00:00
Caio Oliveira
edd3cd67c2
compiler/types: Use a string table for builtin type names
...
This avoids the relocations for each of the builtin type names, allowing
all the builtin data to be loaded in read-only memory.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25191 >
2023-09-16 15:17:01 +00:00
Caio Oliveira
53149cdd6e
compiler/types: Change glsl_type::name to be an uintptr_t
...
This will allow us later to store builtin names in a different way.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25191 >
2023-09-16 15:17:01 +00:00
Caio Oliveira
bf01000a50
compiler/types: Use glsl_get_type_name() to access the type name
...
This will allow us later to store builtin names in a different way.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25191 >
2023-09-16 15:17:01 +00:00
Caio Oliveira
d1e9e7699e
compiler/types: Use Python to generate code for builtin types
...
Will be useful later to generate string tables for the builtin types.
Note we make some extra effort to ensure C++ client code doesn't need to change,
by keeping glsl_type::*_type pointers around.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com > (Python and Meson changes)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25191 >
2023-09-16 15:17:01 +00:00
Gert Wollny
b5a79000eb
r600/sfn: get rid of the method to get the index mode
...
Since we always split the index load we can query the value directly
without checking whether it was lowered.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25159 >
2023-09-16 12:02:57 +00:00
Gert Wollny
116a389c12
r600/sfn: Sepeate resource and sampler in texture instructions
...
Fix the use of resource and sampler and keep separate index registers
for both so that indirect resource and sampler access can be done
independently.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25159 >
2023-09-16 12:02:57 +00:00
Gert Wollny
cbda74a625
r600/sfn: Add old address to update_indirect_addr
...
v2: use UNUSED instead of adding (void)var; (Vitaly Kuzmin)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25159 >
2023-09-16 12:02:57 +00:00
Gert Wollny
56c1e6cef2
r600/sfn: rename method resource_base to resource_id
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25159 >
2023-09-16 12:02:57 +00:00
Gert Wollny
552e9ddcc4
r600/sfn: Make address split pass obligatory
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25159 >
2023-09-16 12:02:57 +00:00
Gert Wollny
f16582b654
r600: print texture resource index mode separately
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25159 >
2023-09-16 12:02:56 +00:00
Jordan Justen
3a307e2248
intel/common: Add sse2_args for 32-bit build when -Dsse2=false was set
...
Fixes: 543a707b7b ("intel/common: Move intel_clflush.h to intel_mem.h/intel_mem.c")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9762
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25249 >
2023-09-15 17:39:55 -07:00
Yiwei Zhang
3c4c263dc7
vulkan/android: improve vkQueueSignalReleaseImageANDROID
...
There're two issues with the current implementation:
1. Wait semaphores are implicitly required to be SYNC_FD exportable
2. As a queue command that can further record cmds against the wsi
image, it currently doesn't account for pending cmds in the queue
beyond the wait semaphores.
This change fixes both by doing a queue submission in the call with a
SYNC_FD external signal semaphore. However, due to Android wsi not
exposing swapchain to icd, we have to cache the signal semaphore in the
queue, otherwise would have to create/destroy in each present.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25185 >
2023-09-15 19:03:22 +00:00
Yiwei Zhang
6ed2515df1
vulkan: remove a dup entry from vk_image_usage_to_ahb_usage
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25185 >
2023-09-15 19:03:22 +00:00
Samuel Holland
497aecb210
Android.mk: Only link LLVM for radeonsi, not amd_vk
...
When building for Android, avoid the LLVM dependency if possible.
Cc: mesa-stable
Acked-by: Mauro Rossi <issor.oruam@gmail.com >
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Change-Id: Idda03f954b4b5326e23a848e541411b60fcef063
Signed-off-by: Samuel Holland <samuel.holland@sifive.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24007 >
2023-09-15 18:43:02 +00:00
Samuel Holland
ec32619cb0
Android.mk: Explicitly enable/disable LLVM support
...
The AMD Vulkan driver uses LLVM by default, but it is possible to build
the driver without the LLVM dependency. In this case, we must explicitly
disable LLVM support, or else meson will die after failing to find LLVM.
The Android build system already knows when to link libLLVM, so forward
that information to meson.
Cc: mesa-stable
Acked-by: Mauro Rossi <issor.oruam@gmail.com >
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Change-Id: I7489d3811625b390aaaf2e84e666b4a8d98328b0
Signed-off-by: Samuel Holland <samuel.holland@sifive.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24007 >
2023-09-15 18:43:02 +00:00
Samuel Holland
599f47f11c
Android.mk: Allow building only Vulkan drivers
...
Android bundles ANGLE for implementing OpenGL ES and EGL on top of
Vulkan. When using ANGLE, mesa is only needed for its Vulkan drivers.
Cc: mesa-stable
Acked-by: Mauro Rossi <issor.oruam@gmail.com >
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Change-Id: I034a0af52f9216bc5f1322f584bc591c90222327
Signed-off-by: Samuel Holland <samuel.holland@sifive.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24007 >
2023-09-15 18:43:02 +00:00
Dylan Baker
de9bf84501
meson: use a single dependency call for lua
...
This is a newer Meson construct that allows passing multiple names for
the same dependency to one call. One advantage of this is that if the
first call (lua54) fails, it won't immediately fall back to a subproject
and will try the others before falling back.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25251 >
2023-09-15 18:01:38 +00:00
Eric Engestrom
57f8346907
ci/zink: drop redundant MESA_LOADER_DRIVER_OVERRIDE: zink
...
This job extends `.zink-anv-test` and `.zink-trace-test`, both of which
extend `.zink-test` which already sets this var.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25248 >
2023-09-15 17:30:04 +00:00
Tapani Pälli
3251f321b8
mesa: some cleanups for texparam extension checks
...
Patch removes some redudant _mesa_is_desktop_gl checks, these
extensions are available only in desktop context.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25202 >
2023-09-15 17:01:38 +00:00
Erico Nunes
ee3981e84d
Revert "ci: disable lima LAVA lab for maintance"
...
This reverts commit 079604e41e .
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25242 >
2023-09-15 16:38:06 +00:00
Eric Engestrom
83d856d4bc
ci/farm-rules: re-add "run every container and build job when a farm gets re-enabled"
...
Turns out I was right the first time, I was just missing that this
should only be done in MRs, which @daniels added in 16527f6ffd .
Without this, a "farm re-enable" pipeline will run all the jobs for that
farm, but will have none of the container & build jobs to support these
tests.
This reverts commit 1c3097225a .
Fixes: 1c3097225a ("ci: don't run everything just because a farm gets re-enabled")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25243 >
2023-09-15 16:07:17 +00:00
Eric Engestrom
67c7f391b3
ci/farm-rules: rename .disable-farm-mr-rules to make it clear it's only about MRs
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25243 >
2023-09-15 16:07:17 +00:00
Rob Clark
fa2fc50f81
freedreno/decode: Fix printing chip-id
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25231 >
2023-09-15 15:07:33 +00:00
Rob Clark
9fa75efe69
freedreno/layout: Handle 565/etc MSAA special case
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25231 >
2023-09-15 15:07:33 +00:00
Rob Clark
4952db73fb
freedreno: Fix crash with debug msgs enabled
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25231 >
2023-09-15 15:07:33 +00:00
Mike Blumenkrantz
cd2c4927c8
zink: use null attachments for null attachments with dynamic render
...
using dummy surfaces here is dumb
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25121 >
2023-09-15 14:10:31 +00:00
Mike Blumenkrantz
267b997abf
zink: propagate rp_tc_info_updated across unordered blits
...
this otherwise breaks rp optimizing
Fixes: 3a9f7d7038 ("zink: implement unordered u_blitter calls")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25121 >
2023-09-15 14:10:31 +00:00
Mike Blumenkrantz
12cdd546be
zink: use much bigger dummy surfaces
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25121 >
2023-09-15 14:10:30 +00:00
Mike Blumenkrantz
047213fcba
tu: handle unused color attachments without crashing
...
if the format is not set then this attachment must be ignored
Fixes: 97da0a7734 ("tu: Rewrite to use common Vulkan dynamic state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25121 >
2023-09-15 14:10:30 +00:00
Mike Blumenkrantz
4272234736
lavapipe: EXT_load_store_op_none
...
free real estate
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25213 >
2023-09-15 13:40:08 +00:00
Connor Abbott
73a9f9c5ca
tu: Actually emit patchpoint for viewports with FDM
...
At some point I intended to track whether the pipeline had FDM enabled
and set a dirty flag, but I realized that wasn't necessary. However I
forgot to remove the useless tu_cmd_state::pipeline_has_fdm and the
viewport/scissor emission code was still using it. Fix that.
Fixes: 97da0a7734 ("tu: Rewrite to use common Vulkan dynamic state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25225 >
2023-09-15 13:02:34 +00:00
Connor Abbott
64ed357699
tu: Fix assert in FDM state emission
...
Making the sub_cs not writeable switches the BO we're emitting to, which
causes an assert failure in tu_cs_end_sub_stream() because it looks like
we have a mismatched start/end. Just make it not writeable later.
Fixes: 97da0a7734 ("tu: Rewrite to use common Vulkan dynamic state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25225 >
2023-09-15 13:02:34 +00:00
Connor Abbott
f8bb1b22fb
tu: Fix tu6_emit_*_fdm size call
...
cs is not initialized until the line after this.
Fixes: 95104707f1 ("tu: Basic a7xx support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25225 >
2023-09-15 13:02:34 +00:00