Chad Versace
1985afdde5
venus: Simplify vn_GetPhysicalDeviceProperties2
...
Reduce approximately 220 lines to 80.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
7d1fb018f2
venus: Simplify vn_GetPhysicalDeviceFeatures2
...
Reduce approximately 300 lines to 60.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
d46a78e74e
vulkan: Make vk_copy_struct_guts() public
...
Venus wants to copy struct guts too.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
3ed2c58047
venus: Sort passthrough extensions
...
Only the Vulkan 1.3 extensions were unsorted.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000 >
2022-08-30 08:09:55 +00:00
Rhys Perry
aa4db00c57
aco: remove dead code for querying image size/samples/levels
...
ac_nir_lower_resinfo() now lowers these.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17991 >
2022-08-30 07:37:08 +00:00
Rhys Perry
52b781760d
radv: enable ac_nir_lower_resinfo for ACO
...
fossil-db (navi21):
Totals from 4022 (2.98% of 134913) affected shaders:
VGPRs: 207824 -> 205264 (-1.23%); split: -1.25%, +0.02%
CodeSize: 18486240 -> 18778488 (+1.58%); split: -0.00%, +1.58%
MaxWaves: 84398 -> 84882 (+0.57%)
Instrs: 3408968 -> 3470936 (+1.82%); split: -0.00%, +1.82%
Latency: 43493420 -> 43168394 (-0.75%); split: -1.57%, +0.82%
InvThroughput: 6911341 -> 6816816 (-1.37%); split: -1.41%, +0.05%
VClause: 88256 -> 82728 (-6.26%); split: -6.31%, +0.04%
SClause: 130061 -> 131526 (+1.13%); split: -0.39%, +1.51%
Copies: 219849 -> 238548 (+8.51%); split: -0.05%, +8.56%
Branches: 79168 -> 79174 (+0.01%); split: -0.00%, +0.01%
PreSGPRs: 180683 -> 184952 (+2.36%); split: -0.17%, +2.53%
PreVGPRs: 179716 -> 178956 (-0.42%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17991 >
2022-08-30 07:37:08 +00:00
Rhys Perry
797150c144
nir/lower_tex: ignore width of cube textures
...
On AMD hardware, height is faster to access and we're already doing so.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17991 >
2022-08-30 07:37:08 +00:00
Rhys Perry
290df95870
aco: add SCC clobber in build_cube_select
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17991 >
2022-08-30 07:37:08 +00:00
Rhys Perry
fc06f0cbd5
nir/print: support nir_texop_descriptor_amd
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Fixes: 3098000e71
("nir: add nir_texop_descriptor_amd")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17991 >
2022-08-30 07:37:08 +00:00
Marek Olšák
b8c861b864
radeonsi: move set_patch_vertices into si_state_shaders.cpp
...
it's a better place for it
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195 >
2022-08-30 04:57:43 +00:00
Marek Olšák
01d351a491
radeonsi: move patch_vertices-related tessellation updates out of si_draw
...
This only depends on the patch_vertices and the TCS.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195 >
2022-08-30 04:57:43 +00:00
Marek Olšák
93cd96b523
radeonsi: remove 1 draw packet order codepath, keep the first one
...
Multi-mode multi-draws will make it more complicated, so let's start with
simpler code.
I changed the order a little: I put the VBO update next to emit_draw_packets.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195 >
2022-08-30 04:57:43 +00:00
Marek Olšák
808893ee69
radeonsi: cosmetic changes in si_emit_rasterizer_prim_state
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195 >
2022-08-30 04:57:43 +00:00
Marek Olšák
dcd80d31cf
radeonsi: set GS_STATE_OUTPRIM and PROVOKING_VTX_INDEX only when they change
...
This moves setting those registers from an unconditional place in draw_vbo
into si_set_rasterized_prim (for draw_vbo), si_update_rasterized_prim
(for bind_xx_shader), and si_bind_rs_state.
It's a little more complicated than expected.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195 >
2022-08-30 04:57:43 +00:00
Marek Olšák
a070a09d00
radeonsi: precompute GS_OUT_PRIM in advance
...
We don't have to do it every draw now if the rasterized prim type
doesn't change.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195 >
2022-08-30 04:57:43 +00:00
Marek Olšák
7144621e94
radeonsi: unify the logic that sets rast_prim
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195 >
2022-08-30 04:57:43 +00:00
Marek Olšák
58539e976b
radeonsi: move fixing ngg_culling into si_update_shaders
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195 >
2022-08-30 04:57:43 +00:00
Marek Olšák
e5a9203159
radeonsi: remove the prim_restart_tri_strips_only option
...
Not used enough, no difference in performance for Dirt Rally on 6800.
Move the variable down.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195 >
2022-08-30 04:57:43 +00:00
Marek Olšák
d8125427cd
radeonsi: move *rs to its only use in si_draw
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195 >
2022-08-30 04:57:43 +00:00
Marek Olšák
e19363a44e
radeonsi: make the primitive type constant with tessellation
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195 >
2022-08-30 04:57:43 +00:00
Marek Olšák
89640f32e0
radeonsi: don't pass num_patches via derived_tess_state, pass it via si_context
...
This removes the parameter from si_emit_derived_tess_state and uses
si_context to pass it. This rework is needed for multi-mode draws
where num_patches will be needed much later.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195 >
2022-08-30 04:57:43 +00:00
Marek Olšák
261e1af570
radeonsi/ci: add skips of tests not built on Linux
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195 >
2022-08-30 04:57:43 +00:00
Jason Ekstrand
2917e849b0
panfrost: Use util/bitpack_helpers.h
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18062 >
2022-08-30 04:28:34 +00:00
Jason Ekstrand
4fab5ae8ba
asahi: Use util/bitpack_helpers.h
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18062 >
2022-08-30 04:28:34 +00:00
Jason Ekstrand
4615153d71
util: Add util_bitpack_[su]fixed_clamp helpers
...
These clamp the value to the fixed-point range instead of asserting.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18062 >
2022-08-30 04:28:34 +00:00
Jason Ekstrand
570f35aa3d
broadcom: Use util/bitpack_helpers.h
...
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18062 >
2022-08-30 04:28:34 +00:00
Jason Ekstrand
c52d5acf15
util,intel: Pull the bit packing helpers from genxml to a common header
...
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18062 >
2022-08-30 04:28:34 +00:00
Mike Blumenkrantz
7fc1ab4928
zink: defer all compute shader creation
...
with other various changes, this should enable the entirety of compute
shader creation to occur in the compile thread
it also enables (slightly) simplifying shader create by moving cube check
out to the caller
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
3652ca08aa
zink: add function to check whether a 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
5489b1a8ff
zink: generate sha1 for compute programs
...
this got broken in the move to u_live_shader_cache, which does not
handle compute programs and thus does not populate the shader's sha1
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
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