Commit graph

159607 commits

Author SHA1 Message Date
Mike Blumenkrantz
68f319a9b8 zink: init fbfetch/bindless ctx stuff on shader create
deferring until later will be problematic for threads

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
7ddd8e428b zink: add a context pointer to zink_program struct
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
27c3fe3d34 zink: add locking for descriptor layout caches
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
a327ff90d2 zink: add partial async shader compile support
when compute shaders can be precompiled, they can be precompiled asynchronously
which allows the implementation of the parallel shader compile hooks

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
eb9ec4baa7 zink: add precompilation for compute shaders
for compute shaders that don't need spec constants or cube lowering,
precompiles are possible and can be performed immediately after disk
cache lookup completes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
9ee059b5b3 zink: move compute descriptor binds down in execution
this has to occur after the pipeline has been updated to account for
async compile

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
b2696ca58e zink: add a param to allow zink_screen_update_pipeline_cache to run directly
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
e1ad7bf0b7 zink: move compute pipeline cache update to caller
this is more flexible

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
1cc6cecc3a zink: track whether shader has cube samplers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
48ebc60e80 zink: use different key comparison for local_size-using compute pipelines
this should be more correct

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
8731ffa238 zink: stop zeroing local size if current compute doesn't use it
this just complicates things for later compute updates

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
ad96d21239 zink: remove use_local_size from compute pipeline state
this is redundant since pipeline state gets flagged on bind

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
bbd58d1703 zink: don't add compute base pipeline to hash table
this is pointless since it has no lookup data

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
d0c8e70a64 zink: merge compute program hash table onto program struct
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
3e9a108c78 zink: add a pipeline shortcut for basic compute programs
if there are no inline uniforms, nonseamless cubes, or local size use,
then this is the "base" pipeline object that can be reused without checking
the hash table

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
8cdb227fe7 zink: add param to allow cache_get jobs to run directly
this will be useful for precompiles

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
40878e212f zink: don't call util_queue_fence_init in zink_screen_get_pipeline_cache()
this might accidentally clobber existing jobs

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
3a674fc6eb zink: add use_local_size flag to compute programs
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
bd12fa86fc zink: initialize cache_get_thread unconditionally
this can also be used for precompiles

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
4cb4bb555e zink: create compute programs from compute shaders directly
this simplifies the whole compute shader/program architecture and
also compiles compute shaders when apps maybe expect them to be compiled

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
2d46cc76c7 zink: allow programs to solely manage descriptor deinit
now that there's no context access, this is perfectly safe and also much simpler

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Mike Blumenkrantz
06e0c05842 zink: use screen param for zink_descriptor_program_deinit
this better enables late destruction of programs

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
2022-08-30 04:11:16 +00:00
Marek Olšák
ab473a4f48 ci: disable the freedreno farm.
It's busted.

Pushing directly. There are 6 MRs in the Marge queue and we don't have that
kind of time to wait for them to time out.

Acked-by: Rob Clark on IRC
2022-08-29 23:59:34 -04:00
Tatsuyuki Ishi
e799b88449 radv,lvp,anv: Delete pre-common dispatch leftover.
These functions are no longer used since the introduction of common
dispatch.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18284>
2022-08-29 22:28:32 +00:00
Tatsuyuki Ishi
ff6b1f4885 radv: Remove unused radv_deferred_queue_submission.
Has been stale since the common sync migration.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18284>
2022-08-29 22:28:32 +00:00
Tatsuyuki Ishi
400881e6c7 radv: Remove unused functions.
Grep shows no usage.
Found by manual inspection.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18284>
2022-08-29 22:28:31 +00:00
Marek Olšák
7833c5139a winsys/amdgpu: use cached GTT for command buffers and don't set the 32BIT flag
This improves performance a lot in a few viewperf tests.

The 32-bit flag was unnecessary.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18170>
2022-08-29 21:06:02 +00:00
Adam Jackson
dae8f76245 egl: Remove some can't-happen supported API checks
The only other thing this could be is OpenVG, which we never create.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18128>
2022-08-29 20:31:14 +00:00
Sil Vilerino
a1f904f7a3 d3d12: Implement cap PIPE_VIDEO_SUPPORTS_CONTIGUOUS_PLANES_MAP
Reports d3d12 support for mapping all the contiguous planes.
This will be used by vaDeriveImage in the VA frontend

Fixes: a585d95803 ("radeonsi/vcn: WA 10bit encoding crash in vaapi")

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18300>
2022-08-29 20:01:01 +00:00
Sil Vilerino
81ae033b94 gallium/va: vaDeriveImage to check PIPE_VIDEO_SUPPORTS_CONTIGUOUS_PLANES_MAP
vaDeriveImage should check if the underlying gallium driver can map contiguous planes
before skipping with disallowlist.

Fixes: a585d95803 ("radeonsi/vcn: WA 10bit encoding crash in vaapi")

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18300>
2022-08-29 20:01:01 +00:00
Samuel Pitoiset
40d8df7280 radv: emit the guardband state separately from the scissor state
Only re-emit the scissor state if viewports or scissors change, and
only re-emit the guardband state if viewports, line width or the
current rasterized primitive change.

This should reduce the number of emitted packets when only the line
width or the rasterized primitive change.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18247>
2022-08-29 19:40:36 +00:00
Samuel Pitoiset
3c2966fa1b radv: rework dirtying scissors when the line width changes
The guardband state (part of scissors) needs to be re-emitted when
the line width changes. Given this is a dynamic state, it's not
necessary to look at the pipeline line width.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18247>
2022-08-29 19:40:36 +00:00
Samuel Pitoiset
5bbb7de514 radv: split emitting guardband into a separate helper
This will be used to emit guardband separately from scissor.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18247>
2022-08-29 19:40:36 +00:00
Samuel Pitoiset
fbbae5c0b9 radv: remove useless parameter in si_write_scissors()
It always starts from 0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18247>
2022-08-29 19:40:36 +00:00
Samuel Pitoiset
d88aba8946 radv: make sure to emit BREAK_BATCH when color write enable is dynamic
Color write enable can change CB_TARGET_MASK and emitting a BREAK_BATCH
seems needed for binning. Though, this was broken if this enable bit
changed dynamically for the same pipeline. Split the function to not
increase CPU overhead.

Found by inspection.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18233>
2022-08-29 19:21:12 +00:00
Samuel Pitoiset
3bcfdfb06e radv: store binning settings into the physical device
To avoid re-computing this every time.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18233>
2022-08-29 19:21:12 +00:00
Emma Anholt
f69820468c turnip: Fix enabling of IB2 skipping.
We weren't setting LOCAL, so unless freedreno GL had set it since the GPU
woke up, we wouldn't get it.

This requires moving the GLOBAL unsetting out of tile_store's IB, since it
would never be executed when it mattered, anyway.

No perf difference detected on gfxbench vk-5-normal, or ANGLE minecraft,
genshin, and pubg.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18187>
2022-08-29 18:34:10 +00:00
Emma Anholt
554cd8bcc2 freedreno/regs: Add a bit of documentation of what SKIP_IB2 does.
Based on @cwabbott's research.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18187>
2022-08-29 18:34:09 +00:00
Yonggang Luo
b660c0eff3 util: Move detect_done out of struct util_cpu_caps_t
Also util_cpu_caps are hided, not accessed directly now

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>
2022-08-29 18:06:07 +00:00
Yonggang Luo
0993361ea7 util: Use environment variable GALLIUM_OVERRIDE_CPU_CAPS to remove usage of util_cpu_caps in translate_test.c
It's use extern struct util_cpu_caps_t util_cpu_caps that's violate the
restriction that we can not directly access util_cpu_caps

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>
2022-08-29 18:06:07 +00:00
Yonggang Luo
2ff4a4dd98 gallium: Fixes memory leak of translate_test.c
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>
2022-08-29 18:06:07 +00:00
Yonggang Luo
c763b1cae8 llvmpipe: Remove the hack for LLVM4 in lp_bld_init.c
The main intention is remove usage of extern struct util_cpu_caps_t util_cpu_caps
so we can mark util_cpu_caps to be static latter

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>
2022-08-29 18:06:07 +00:00
Yonggang Luo
9546a09901 util: Handling LP_FORCE_SSE2 in u_cpu_detect.c
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>
2022-08-29 18:06:07 +00:00
Yonggang Luo
d80c5a7c71 util: Handling GALLIUM_NOSSE in u_cpu_detect.c
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>
2022-08-29 18:06:07 +00:00
Yonggang Luo
e8ac138c83 util: Improve has_sse has_sse2 has_sse3 has_sse4_1 has_avx disable handling
This is the prepare for following changes:

* Handling GALLIUM_NOSSE in u_cpu_detect.c
* Handling LP_FORCE_SSE2 and LP_NATIVE_VECTOR_WIDTH in u_cpu_detect.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>
2022-08-29 18:06:07 +00:00
Yonggang Luo
e51fa10f53 util: Rename util_cpu_detect to _util_cpu_detect_local
Add comment about _util_cpu_detect_local that it's can only be called by util_get_cpu_caps
Add comment about util_cpu_caps that it's can only by accessed by util_get_cpu_caps

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>
2022-08-29 18:06:07 +00:00
Yonggang Luo
38dad17294 util: Remove unused rtasm_cpu_has_sse2
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>
2022-08-29 18:06:07 +00:00
Marcin Ślusarz
4eaecd7965 anv: disable task redistribution
If task redistribution is enabled, then some mesh shaders read
garbage from task payload.

It may be a hardware bug, or it may be our bug. Who knows :(

This change will probably negatively affect performance of task
shader-enabled workloads on multi-slice GPUs, because mesh shaders
will be executed only on the slice where task shader was spawned.

Fixes: ef04caea9b ("anv: Implement Mesh Shading pipeline")

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16197>
2022-08-29 17:08:13 +00:00
David Heidelberg
6c0215eb09 ci: bump cross compilation to LLVM 13 where possible
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17575>
2022-08-29 17:01:41 +02:00
Christian Gmeiner
c16feac517 lima/ci: There is no need to redefine HWCI_TEST_SCRIPT
.piglit-test defines it already.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18276>
2022-08-29 14:46:04 +00:00