Pierre-Eric Pelloux-Prayer
45cd75cdad
winsys/amdgpu: add a helper function to submit a no-op job
...
This will be used in the next commit.
Reviewed-by: André Almeida <andrealmeid@igalia.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22290 >
2023-04-27 12:06:08 +00:00
Pierre-Eric Pelloux-Prayer
e528823400
radeonsi: stop reporting reset to app once gpu recovery is done
...
This way apps know they can recreate their contexts when
the status go back to NO_ERROR.
This depends on new UAPI in the kernel; for older kernel, radeonsi
will stop reporting a reset after 3 seconds. Apps will be able to
create new contexts but they'll have to handle not being able to
submit tasks.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7460
Reviewed-by: André Almeida <andrealmeid@igalia.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22290 >
2023-04-27 12:06:08 +00:00
Samuel Pitoiset
e996599ed0
ac/rgp: update SQTT_FILE_CHUNK_TYPE_ASIC_INFO to minor version 5
...
To match PAL. I don't know what the active_pixel_packer_mask field
is used for.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22677 >
2023-04-27 11:31:49 +00:00
Samuel Pitoiset
dd91faaddc
ac/rgp: update SQTT_FILE_CHUNK_TYPE_API_INFO to minor version 2
...
To match PAL.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22677 >
2023-04-27 11:31:49 +00:00
Samuel Pitoiset
4cbb0f7ec3
ac/sqtt: add missing EventUnknown to rgp_sqtt_marker_event_type
...
To match XGL.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22677 >
2023-04-27 11:31:49 +00:00
Samuel Pitoiset
637a6813db
ac/sqtt: add new bits to rgp_sqtt_marker_barrier_end
...
To match XGL.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22677 >
2023-04-27 11:31:49 +00:00
Samuel Pitoiset
930e77e903
radv/sqtt: add support for queue info
...
RGP uses that to report the various queue timings info.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22594 >
2023-04-27 10:55:55 +00:00
Samuel Pitoiset
84a0ef7a33
radv/sqtt: sample CPU/GPU clocks before starting the trace
...
RGP seems to use that to calibrate timestamps. This also introduces
a new helper to reset thread data between captures.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22594 >
2023-04-27 10:55:55 +00:00
Samuel Pitoiset
ee93864117
ac/sqtt: initialize clock calibration/queue info/queue event records
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22594 >
2023-04-27 10:55:55 +00:00
Samuel Pitoiset
94ce6540d8
ac/sqtt: add helpers for initializing ac_thread_trace_data
...
This is common between RADV and RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22594 >
2023-04-27 10:55:55 +00:00
Samuel Pitoiset
23f3aa3491
ac/sqtt: add a helper for adding clock calibration records
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22594 >
2023-04-27 10:55:55 +00:00
Jose Fonseca
16f3e9cd76
wgl: Remove needless if (1) { ... }.
...
Noticed by Craig Scott on https://gitlab.freedesktop.org/mesa/mesa/-/issues/4427#note_857876
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22706 >
2023-04-27 09:58:39 +00:00
Jose Fonseca
9105e771af
wgl: Fix unintentional assignment on assert.
...
Spotted by Nanley Chery.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4427
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22706 >
2023-04-27 09:58:39 +00:00
Lionel Landwerlin
5f43f866a2
anv: enable shaderUniformBufferArrayNonUniformIndexing
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22624 >
2023-04-27 09:08:03 +00:00
Lionel Landwerlin
9fb9ae5ac6
anv: fix anv_nir_lower_ubo_loads pass
...
In order to use load_global_const_block_intel we need to ensure the
64bit address in src[0] is uniform. This is not the case in the
vkd3d-proton test_bindless_cbv tests for example.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22624 >
2023-04-27 09:08:03 +00:00
Lionel Landwerlin
d6e9479d4b
nir/divergence: add missing load_global_constant_* intrinsics
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22624 >
2023-04-27 09:08:03 +00:00
Iago Toral Quiroga
0468ce3791
broadcom/compiler: try harder to merge thread switch earlier
...
We have been stopping as soon as we find a conflict but that doesn't
mean we can't merge it in an earlier slot, so keep going. Going by
shader-db, this sometimes allows us to merge the final thrsw a bit
earlier and avoid emitting NOP instructions at the program end to
make up for its delay slots. I have not observed cases where this
helps with regular thrsw though, but it doesn't hurt to try with
those too.
total instructions in shared programs: 11526876 -> 11526354 (<.01%)
instructions in affected programs: 10760 -> 10238 (-4.85%)
helped: 236
HURT: 0
Instructions are helped.
total max-temps in shared programs: 2231705 -> 2231677 (<.01%)
max-temps in affected programs: 276 -> 248 (-10.14%)
helped: 27
HURT: 0
Max-temps are helped.
total inst-and-stalls in shared programs: 11545177 -> 11544655 (<.01%)
inst-and-stalls in affected programs: 10777 -> 10255 (-4.84%)
helped: 236
HURT: 0
Inst-and-stalls are helped.
total nops in shared programs: 321624 -> 321152 (-0.15%)
nops in affected programs: 751 -> 279 (-62.85%)
helped: 236
HURT: 0
Nops are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22679 >
2023-04-27 08:43:29 +00:00
Gregory Mitrano
13f258fae3
radv/sqtt: Add RGP Markers for Mesh Shaders
...
This change updates the sqtt layer to add mesh shader specific RGP
instrumentation logic. This should allow RGP to correctly identify GPU
work derived from vkCmdDrawMeshTasksEXT, vkCmdDrawMeshTasksIndirectEXT,
and vkCmdDrawMeshTasksIndirectCountEXT API calls.
This change also updates the mesa-to-RGP shader stage translation logic
to handle the mesh & task stages.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21917 >
2023-04-27 07:58:58 +00:00
Gregory Mitrano
01b7371bb4
ac/sqtt: Add RGP Definitions for Mesh Shaders
...
This commit adds RGP marker definitions for the following mesh shader
functions:
- vkCmdDrawMeshTasksEXT
- vkCmdDrawMeshTasksIndirectCountEXT
- vkCmdDrawMeshTasksIndirectEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21917 >
2023-04-27 07:58:58 +00:00
Samuel Pitoiset
f2d5b7cd1c
ac/spm: rename ac_spm_trace_data to ac_spm
...
This is shorter and it's the main struct that controls SPM, while
ac_spm_trace contains the generated data only.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22707 >
2023-04-27 07:24:54 +00:00
Samuel Pitoiset
0d4fa8e5c6
ac/spm: introduce ac_spm_trace and ac_spm_get_trace()
...
For more code isolation.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22707 >
2023-04-27 07:24:54 +00:00
Samuel Pitoiset
44a2e5ba38
radv: only enable extendedDynamicState3ConservativeRasterizationMode on GFX9+
...
If extendedDynamicState3ConservativeRasterizationMode is enabled,
VK_EXT_conservative_rasterization is mandatory.
Fixes recent updates in dEQP-VK.info.device_mandatory_features.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22681 >
2023-04-27 06:15:16 +00:00
Erik Faye-Lund
0a718c9354
nir: clean up white-space in deref-printing
...
Without this, we get some trailing spaces in some cases, and some
double space in some other cases. Let's clean that up a bit.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22550 >
2023-04-27 05:39:57 +00:00
Dave Airlie
d8f3060bd9
radv/video: start adding gfx11 vcn decoder
...
On gfx11 the vcn decoder moved into the vcn encoder ring,
now known as the unified vcn ring.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980 >
2023-04-27 02:00:03 +00:00
Dave Airlie
89df5976f8
radv/video: fix dpb surface programming
...
This just programs the dpb fields directly from the image surface.
Makes things happier on navi33
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980 >
2023-04-27 02:00:03 +00:00
Dave Airlie
6b75c365a8
radv/video: add a video addr gfx mode
...
This will be different on gfx11+ so add a settable field for it
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980 >
2023-04-27 02:00:03 +00:00
Dave Airlie
ca7a2e508d
radv/winsys: handle encoder queue padding/submits.
...
The encoder queue doesn't like padding at all, don't pad in the sysmem
paths for encoder queue.
The encoder queue will be using on gfx11 for decoding.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980 >
2023-04-27 02:00:03 +00:00
Dave Airlie
2fdf75dadf
radv: set a video decode ip block in physical device.
...
This makes it easier to add navi 3x
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980 >
2023-04-27 02:00:03 +00:00
Dave Airlie
d8262e26a2
radv/video: add missing gfx family
...
This is compatible with rdna2 but was just missing.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980 >
2023-04-27 02:00:03 +00:00
Dave Airlie
e895c7ba56
radeonsi/ac: move some vcn defines to common
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980 >
2023-04-27 02:00:03 +00:00
Mike Blumenkrantz
dfd39d1d9d
zink: enable EXT_shader_object for generic precompiles
...
this should match the functionality of GPL, but it should also (theoretically)
have significantly less CPU overhead, so I've enabled this to be the new
default when available
currently I'm not changing any of the requirements for shader object enablement,
so this is probably only be usable on desktops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
29a62dd2ae
zink: make zink_shader_spirv_compile public
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
0b4e8fcd39
zink: use zink_shader_object for pipeline compiles from zink_gfx_program
...
this matches up the rest of the codebase using zink_shader_object
zink_gfx_program::objects is left in place for shader binding so that
the entire array can always be bound in one call
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
8a397b7649
zink: add a union to zink_gfx_pipeline_cache_entry for gpl
...
just code motion for now
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
a0df43f3ee
zink: avoid accessing zink_gfx_program::modules during pipeline compile
...
this allows a different array of modules to be passed in
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
76fbc85220
zink: allow zink_shader_module to be either a shobj or a mod using a bool
...
this allows shader modules to more accurately represent the contents of
the zink_shader_object for which they are containers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
36b014b28d
zink: store spirv onto zink_shader_object structs
...
this makes it convenient for reuse
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
a3730531af
zink: use zink_destroy_shader_module() for compute to deduplicate code
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
6ae2c62b7c
zink: use zink_shader_object for zink_shader_module
...
this streamlines a bit more code, though nothing changes functionally
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
e0c58688c5
zink: delete redundant conditional
...
this is checked literally 2 lines above
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
5922c2efa9
zink: deduplicate separable program replacement handling
...
no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
9d112791a5
zink: use local screen var in zink_gfx_program_update_optimal()
...
no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
1c3bd0f218
zink: add zink_program::uses_shobj for managing shader object binds
...
this is going to be more flexible than just checking for separable+EXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
db4017cf36
zink: explicitly block sample shading in the GPL precompile path
...
this can't be precompiled, so don't bother trying
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
96eeff5660
zink: rename 'separate' param in shader compilation to 'can_shobj'
...
this will better reflect the usage of the param
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
492a1cf49e
zink: add ZINK_DEBUG=noshobj to disable EXT_shader_object
...
for debugging/testing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:17 +00:00
Mike Blumenkrantz
8650aa0560
zink: don't run update_so_info if shader has no outputs
...
this probably means all outputs were eliminated by the linker,
but in any case it's not going to do anything
fixes spec@glsl-1.50 @execution@interface-blocks-api-access-members
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:16 +00:00
Mike Blumenkrantz
bf746b5921
zink: add a workaround for a nir_assign_io_var_locations bug
...
drivers that use nir_assign_io_var_locations() with EXT_shader_object all
have the same bug with a shader interface that looks like this:
shader output block:
* PSIZ
* VAR0
* VAR8
shader input block:
* VAR0
* VAR8
in this case, output driver locations will be assigned like:
* PSIZ=0
* VAR0=1
* VAR8=2
and input driver locations will be:
* VAR0=0
* VAR8=1
which breaks the shaders even though this is a totally legitimate thing
to do
thus, a second set of shaders have to be created without PSIZ to work around
the bug since I've already spent 18+ hours trying to fix it and have only succeeded
in breaking every driver that uses it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725 >
2023-04-27 01:33:16 +00:00
Sviatoslav Peleshko
697ed61e7c
anv: Improve image/view usage bits verification
...
This change makes usage bits verification closer to the Vulkan spec.
i.e. VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT does not always require all formats
to support all the requested usage bits.
Also, VK_IMAGE_CREATE_EXTENDED_USAGE_BIT, when combined with
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT can relax the requirements for the
usage supported by the original image format.
v2: Removed strict verification of the format_list_info formats usage
per chadversary's suggestion. Other minor style/comments tweaks.
v3: Added checking of all compatible formats when
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and VK_IMAGE_CREATE_EXTENDED_USAGE_BIT
are specified, but no list of possible formats was given.
v4: Add VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT handling.
Cc: 22.2 <mesa-stable>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6031
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com >
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17182 >
2023-04-27 01:04:44 +00:00
Sviatoslav Peleshko
9899151361
anv: Handle UNDEFINED format in image format list
...
It's not invalid to have this value in the list, but the only case it
is actually valid as format in the creation of an image or image view
is with Android Hardware Buffers which have their format specified
externally.
So we can just ignore all entries with VK_FORMAT_UNDEFINED.
Cc: 22.2 <mesa-stable>
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com >
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17182 >
2023-04-27 01:04:44 +00:00