Alyssa Rosenzweig
2c2f189fe7
agx: Write sample mask even with no colour output
...
Needed for discard to work properly, which has visible side effects with
occlusion queries. Fixes no_attachment framebuffers together with the next
commit.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21267 >
2023-02-13 11:28:07 +00:00
Alyssa Rosenzweig
e785ae6125
agx: Implement load_helper_invocation
...
Passes dEQP-GLES31.functional.shaders.helper_invocation.*
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21265 >
2023-02-13 11:12:05 +00:00
Alyssa Rosenzweig
6214c9921a
agx: Remove bogus gl_Position assertion
...
It is reasonable not to write gl_Position in a transform feedback program.
Fixes rendering of the apitrace of Domekeeper in #7798 .
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21266 >
2023-02-13 10:48:13 +00:00
Alyssa Rosenzweig
eeae9b93de
agx: Fix AGX_MAX_CF_BINDINGS
...
Potentially could be larger with aliasing of component offsets, though that
would be silly.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21266 >
2023-02-13 10:48:13 +00:00
Alyssa Rosenzweig
fbe8878dcb
agx: Respect component in frag load_input
...
Fixes fails in dEQP-GLES31.functional.separate_shader.random.*.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21266 >
2023-02-13 10:48:13 +00:00
Alyssa Rosenzweig
a5d478d17c
agx: Remove unused AGX_MAX_VARYINGS
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21266 >
2023-02-13 10:48:13 +00:00
Mike Blumenkrantz
b73fe8d52e
zink: also replace hash_entry::key when replacing separable program
...
this otherwise still points to the separable program's shader array
and will access freed memory
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
b5029a90df
zink: calloc separable program zink_gfx_library_key struct
...
this matches other zink_gfx_library_key allocations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
4cda98c827
zink: implement a scaling descriptor buffer size
...
previously descriptor buffers were sized to allow for 25,000 descriptors
this is a great number.
but in some scenarios it's overkill, and it's theoretically possible that
it might be underkill in others (citation needed), so add some handling
for both cases to save small amounts of vram on average and not crash
in the distant future when hypercomputers try running drawoverhead
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
453701256d
zink: store base descriptor size on the screen
...
useful to have this around for reuse
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
651f322091
zink: ensure db is bound before separate shader update
...
seems unlikely but who knows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
bec6087699
zink: move db_bound to batch descriptor data
...
this is where descriptor stuff goes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
f57f28a348
zink: move zink_batch_state::db_bound reset to zink_batch_descriptor_reset()
...
descriptor code goes in descriptor file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
5b31659650
zink: rename a struct member for clarity
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
27dec4a262
zink: add an io assignment pass for separate shaders
...
usually this is handled by zink_compiler_assign_io() for full pipelines,
where locations are compacted and variables are eliminated, but separate
shaders still need to have "correct" locations set, which can be achieved
by relying on 'location' instead of the (failed) attempt by the frontend
to set 'driver_location' with nir_assign_io_var_locations()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
13c6ad0038
zink: use a single descriptor buffer for all non-bindless types
...
the descriptor count (buffer size) calculated for buffers was based
on drawoverhead throughput, which is the fastest descriptors can be changed
at the cpu level. these cases demonstrate the maximum speed that ANY
descriptor can be changed, which means that changing multiple types in
a given cmdbuf will, at best, be the same throughput
thus, instead of allocating a separate buffer for each type, only a single
buffer needs to be allocated, and all descriptors can be bound to this buffer
this should reduce descriptor vram usage by ~80%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
facb1b7884
zink: rework separate shader descriptor iterating
...
using the shader struct members is a bit more natural here and
avoids some confusion when one of the stages has no descriptors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
e6a55bfc16
zink: flag gfx programs as removed-from-cache by default
...
this fixes some desync where async programs are destroyed before being
added to the cache
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
f70b1732da
zink: assert that the found program matches the expected one in shader_free
...
avoid bugs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
66f2a1c526
zink: don't fetch/update pipeline cache for separate shader programs
...
this is illegal
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
ffd91ee7a8
zink: fix descriptor pool free iterating
...
these arrays are sparsely allocated, and using pop() on them will
fail to access some elements
Fixes: cf7c17a7af ("zink: rework descriptor pool overflow")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
16c019142b
zink: sync LTO compiles for GPL pipelines on shader free
...
this avoids invalid access
affects:
KHR-Single-GL46.arrays_of_arrays_gl.InteractionStorageBuffers2
Fixes: 41ffb15de5 ("zink: implement async gfx precompile")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Mike Blumenkrantz
e8b8279b61
zink: allocate all batch command buffers in one call
...
just simpler
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246 >
2023-02-13 10:27:16 +00:00
Lionel Landwerlin
295dd6f515
intel/dev: add a default urb value for intel_stub_gpu on dg2
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21249 >
2023-02-13 09:38:06 +00:00
Samuel Pitoiset
214d6d05ed
radv simplify compiling graphics shaders with a mask of active NIR stages
...
Instead of recomputing the same bitfield everywhere.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21237 >
2023-02-13 09:15:37 +00:00
Samuel Pitoiset
8dd0b98786
radv: only initialize shader arguments for the active stages
...
Other stages don't need to be initialized.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21237 >
2023-02-13 09:15:37 +00:00
Samuel Pitoiset
d05a02018b
radv: use last_vgt_api_stage for determining the last stage with XFB
...
It's shorter and cleaner.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21237 >
2023-02-13 09:15:37 +00:00
Mike Blumenkrantz
36d8443e5f
zink: add a local is_compute var for set_shader_images
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21229 >
2023-02-13 08:42:36 +00:00
Mike Blumenkrantz
cff6e6e13b
zink: pull out image descriptor updating in set_shader_images
...
no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21229 >
2023-02-13 08:42:36 +00:00
Mike Blumenkrantz
1c1f075627
zink: rework set_shader_images() hook
...
this makes the code more methodical, readable, and correct, fixing a
number of issues along the way:
* inaccurate write_bind_count incrementing
* inaccurate barrier_access write unsetting
* inefficient partial rebinds
* leaking texel buffers
also add some comments to make this clearer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21229 >
2023-02-13 08:42:36 +00:00
Mike Blumenkrantz
128192bffb
zink: unref image buffer descriptors on unbind
...
Fixes: 7ab5c5d36d ("zink: use EXT_descriptor_buffer with ZINK_DESCRIPTORS=db")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21229 >
2023-02-13 08:42:36 +00:00
Mike Blumenkrantz
e5666fe7cc
zink: remove stale comment
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21229 >
2023-02-13 08:42:36 +00:00
Mike Blumenkrantz
ee53b07c0a
zink: unset gfx shader read when unbinding shader images
...
this otherwise will never be unset
Fixes: 50e764fa50 ("zink: track gfx/compute descriptor barrier info")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21229 >
2023-02-13 08:42:36 +00:00
Mike Blumenkrantz
892eae9af0
zink: rename some variables in zink_set_shader_images()
...
this is more consistent with set_sampler_views
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21229 >
2023-02-13 08:42:36 +00:00
Samuel Pitoiset
9f8c563e10
radv: fix importing retained NIR shaders when a lib uses the RETAIN bit
...
Fixes couple of GPL regressions with VKCTS, I thought this was test
bugs but it's valid behaviour as long as the libary uses
VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21245 >
2023-02-13 08:17:05 +00:00
Alyssa Rosenzweig
edf78810a7
radv: Use common Get*OpaqueCaptureDescriptorDataEXT
...
Now stubbed by the Vulkan runtime for you, deduplicate.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by; Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21230 >
2023-02-13 07:43:11 +00:00
Alyssa Rosenzweig
2854dca898
tu,vulkan: Add common Get*OpaqueCaptureDescriptorDataEXT
...
In both tu and radv, these are all trivial. Move the trivial implementation from
tu to common code to deduplicate the boilerplate.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by; Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21230 >
2023-02-13 07:43:11 +00:00
Tapani Pälli
235e5806b3
iris: handle error in iris_resource_from_handle
...
In similar manner as fdab8fef7a we might fail creating resource,
let application handle the error. Application may have given wrong
input pitch when importing dmabuf.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8248
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21233 >
2023-02-13 07:59:14 +02:00
Kai Wasserbäch
efcb63938c
fix(FTBFS): clover: fix LLVM #include of Triple.h, moved to TargetParser
...
Upstream moved Triple.h from ADT to TargetParser in LLVM 17.
Reference: 62c7f035b4
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21262 >
2023-02-12 18:36:07 +00:00
Kai Wasserbäch
7956b80bf8
fix(FTBFS): gallivm: fix LLVM #include of Triple.h, moved to TargetParser
...
Upstream moved Triple.h from ADT to TargetParser in LLVM 17.
Reference: 62c7f035b4
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21262 >
2023-02-12 18:36:07 +00:00
Eric Engestrom
1e73fd4aa8
u_pipe_screen_lookup_or_create: avoid re-querying the fd to have a consistent hash key
...
In every current driver, the fd we get back from the screen is the fd we
gave to screen_create() three lines above (or a dup() thereof, which we
consider to be the same since we look inside it for the file description
instead).
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20180 >
2023-02-12 17:11:17 +00:00
Eric Engestrom
cd152ec930
asahi: use u_pipe_screen_lookup_or_create() to keep track of and reuse screens
...
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20180 >
2023-02-12 17:11:17 +00:00
Eric Engestrom
8193efec83
panfrost: use u_pipe_screen_lookup_or_create() to keep track of and reuse screens
...
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20180 >
2023-02-12 17:11:17 +00:00
Eric Engestrom
7b3ee9335f
vc4: use u_pipe_screen_lookup_or_create() to keep track of and reuse screens
...
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20180 >
2023-02-12 17:11:16 +00:00
Eric Engestrom
769b511054
v3d: use u_pipe_screen_lookup_or_create() to keep track of and reuse screens
...
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20180 >
2023-02-12 17:11:16 +00:00
Eric Engestrom
759496cc45
lima: replace custom code with u_pipe_screen_lookup_or_create()
...
Signed-off-by: Eric Engestrom <eric@igalia.com>
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20180 >
2023-02-12 17:11:16 +00:00
Eric Engestrom
e17c3af593
freedreno: replace custom code with u_pipe_screen_lookup_or_create()
...
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20180 >
2023-02-12 17:11:16 +00:00
Eric Engestrom
013f05872c
gallium: move etnaviv screen_lookup_or_create function to common code
...
Signed-off-by: Eric Engestrom <eric@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20180 >
2023-02-12 17:11:16 +00:00
Eric Engestrom
1dea6aea20
etnaviv: use simple_mtx to avoid breaking windows in the next commit
...
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20180 >
2023-02-12 17:11:16 +00:00
Eric Engestrom
a72035f9c5
util: avoid calling kcmp on Android
...
On some combinations of Android version and kernel version, calling kcmp
results in seccomp killing the process.
As there doesn't seem to be a way to query for that in advance, skip
this check altogether on Android.
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20180 >
2023-02-12 17:11:16 +00:00