Marek Olšák
17b7212930
mesa: clean up st_indirect_draw_vbo interface and callers
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
303f867e32
mesa: remove unused code using _mesa_prim
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
59af6be199
mesa: remove _mesa_draw_gallium_fallback by adapting st_feedback_draw_vbo
...
This makes st_feedback_draw_vbo implement the DrawGallium.
That's the last users of the fallback functions.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
c056affa25
mesa: replace ALLOC_PRIMS with persistently-allocated context arrays
...
This is cleaner.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Friedrich Vock
8666b1ffbf
radv: Build acceleration structures using BVH IR
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Friedrich Vock
1c0ab3ba67
radv: Create pipelines for conversion meta shaders
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Friedrich Vock
45a66ab30b
radv: Add conversion shader for leaf nodes
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Friedrich Vock
682dc5c28e
radv: Add conversion shader for internal nodes
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Friedrich Vock
3e6033394e
radv: Add BVH IR types
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Friedrich Vock
ca8061c2a7
radv: Split CmdBuildAccelerationStructuresKHR into different functions
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Friedrich Vock
c039a132d6
radv: Rename internal node shader to lbvh_internal
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Mike Blumenkrantz
41eed5b463
zink: only emit runtime array for ssbos if present
...
it's impossible to accurately determine whether an op will use the base,
sized array or the unsized array due to dynamic indexing, and thus it's
impossible to not violate spec by emitting both arrays at offset=0 so they
can overlap
so instead, just emit the runtime array and blast all bounds checking in
vk drivers into the void
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
93696693b2
zink: remove color_write_missing driver workaround
...
this is no longer used
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
ceb34a2145
zink: allow reordered clear_buffer calls
...
rare to hit, but no point in not promoting them when possible
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
084f3b6664
zink: avoid overflow when clamping bufferviews
...
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
55d6847d22
zink: name bo variables using bitsize
...
debugging++
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
697078c9f4
zink: fix handling for ssbos that are just runtime arrays
...
this used to correctly calculate runtime array size as zero, but since the
switch to glsl_get_explicit_size(), zero can no longer be returned
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
60db522ed8
zink: fix sparse queue creation
...
to use an explicit sparse queue, it has to actually be created along with
the device
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
53004e57d6
zink: always unset var->data.explicit_xfb_buffer
...
ensure that this isn't accidentally triggering for non-xfb shaders
Fixes: 6d40db84c9 ("zink: handle direct xfb output from output variables")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
903aba413d
zink: free vertex_state_cache on shutdown
...
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
1bd0d30a53
zink: fix some batch tracking leaks
...
not leaking over time, just leaking on shutdown
Fixes: 83c76b8efb ("zink: rework batch tracking for resources")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
5f618d84c6
zink: add asserts to verify optimal key state
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
c338f7ae78
zink: copy optimal key always
...
this is going away in the future, but for now it's annoying
Fixes: 7336580408 ("zink: unspaghettify some program update code")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Kenneth Graunke
95d61c5c75
iris: Ignore aux for copy_region source if there's no unresolved color
...
This mirrors the behavior of iris_resource_texture_aux_usage(), which
bypasses the aux metadata when there's no advantage to using it.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18790 >
2022-09-26 20:37:09 +00:00
Mike Blumenkrantz
6db172436a
lavapipe: propagate shader access info across libraries
...
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18827 >
2022-09-26 20:16:18 +00:00
Mike Blumenkrantz
6c935f3f3d
lavapipe: set writemask for compute shader buffers
...
I don't know how this wasn't being set?
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18827 >
2022-09-26 20:16:18 +00:00
Sil Vilerino
e884902b21
d3d12: Replace size_t with uint64_t in d3d12_video_encoder definitions for cross-plat compatibility
...
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18821 >
2022-09-26 19:02:30 +00:00
Mike Blumenkrantz
7336580408
zink: unspaghettify some program update code
...
the initial implementation of optimal_keys was added inline, but really
it's an entirely different codepath. by separating these out, it makes the
code more readable, and it also allows for slightly better optimization of
of the optimal_keys codepath
~4-5% improvement for drawoverhead -test 7
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
809e9462ce
zink: be even more granular with optimal_key program updates
...
since the bits of each key are easily and efficiently comparable,
the draw-time updating here can be made extremely granular to
update exactly the stages that have changed since the last
time the program was used, further reducing overhead instead of
updating every possible key value
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
e4e9461403
zink: simplify bit tracking in zink_gfx_program_update()
...
much nicer now that gfx dirty bits are isolated
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
76ae28e69c
zink: split dirty_shader_stages for gfx and compute
...
this simplifies/clarifies a lot of related code
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
49866c4f77
zink: use optimal_keys to massively reduce size of pipeline cache comparisons
...
since the entire pipeline module key is a uint32_t, this value can be used
for comparisons instead of comparing every shader module
ideally in the future more drivers will support the required features for
optimal_keys, allowing the other variant functions to be deleted
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
325c703624
zink: add 'optimal_keys' handling for shader keys
...
if it's known on init that there are no variants for nonseamless cubes,
or inlined values, or decomposed vertex attrs, then shader keys can be
compressed more optimally to reduce the work needed on program updates
more importantly, this reduces the total hash value for all the shader
modules to a single uint32_t (technically 24 bits), which is much better
than having to manage and incrementally add all the separte module hashes
...but for now using this is incompatible with gpl, so disable that
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
1198568e32
zink: add some padding to small shader keys for byte-alignment
...
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
06e8acbc47
zink: ALWAYS_INLINE bind_gfx_stage
...
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
32f50630d6
zink: move to AoS for gfx program shader modules
...
this matches up better with the actual usage; the zink_shader_module
is still stored in the shader cache
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
745efa1231
zink: copy the non-dirty shader stages when updating gfx program
...
typo during refactoring
Fixes: d8455e5ebf ("zink: change u_foreach_bit to regular for loop in zink_gfx_program_update")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
6df9bcaa10
zink: handle inline uniforms during first-time shader generation
...
this is unlikely but possible
Fixes: a0e69e7601 ("zink: split out first-time shader module creation")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
7a489593d0
zink: remove a bunch of casts from shader key inlines
...
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
f2591d09d7
zink: wrap zink_shader_key_base access for nonseamless cubemap use
...
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
3513bddcbf
zink: check on init whether decomposed attrs are needed
...
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Mike Blumenkrantz
f933ede78e
zink: add a bool flag for decomposed vertex elements
...
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786 >
2022-09-26 17:12:31 +00:00
Erik Faye-Lund
cd81f2d08a
ci/crocus: update ci results
...
Seems we haven't been running the Crocus CI much lately, and some things
has changed. The new failures needs to be investegated and fixed, but
let's update the results for now.
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18822 >
2022-09-26 16:52:48 +00:00
Rhys Perry
3730be9873
aco: mostly implement FS input loads on GFX11
...
Quad-divergent CF and vertex selection doesn't work, but should at least
prevent crashes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17333 >
2022-09-26 14:49:57 +00:00
Rhys Perry
826ed52174
aco/tests: add GFX11 assembly tests
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17333 >
2022-09-26 14:49:57 +00:00
Rhys Perry
48c8c25e68
aco: omit read-only memory_sync_info when printing
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17333 >
2022-09-26 14:49:57 +00:00
Rhys Perry
aadb7aef01
aco: add VINTERP instruction format
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17333 >
2022-09-26 14:49:56 +00:00
Rhys Perry
55cd74d468
aco: add LDSDIR instruction format
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17333 >
2022-09-26 14:49:56 +00:00
Rhys Perry
a7a9aad14d
aco: limit GFX11 to 128 VGPRs for now
...
See https://reviews.llvm.org/D128054
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17333 >
2022-09-26 14:49:56 +00:00
Rhys Perry
4e55b5b851
aco: update assembler for GFX11
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17333 >
2022-09-26 14:49:56 +00:00