Commit graph

170418 commits

Author SHA1 Message Date
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
Sviatoslav Peleshko
0ed8a48ce9 isl: Check all channels in isl_formats_have_same_bits_per_channel
Cc: 22.2 <mesa-stable>
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17182>
2023-04-27 01:04:44 +00:00
Gert Wollny
337dc7d766 r600: remove TGSI code path
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7780
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7342

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21521>
2023-04-27 00:44:39 +00:00
Harri Nieminen
608ed04cc1 glx: fix typos
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22663>
2023-04-26 23:52:21 +00:00
Harri Nieminen
523dffe6cd egl: fix typos
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22663>
2023-04-26 23:52:21 +00:00
Erik Faye-Lund
9aefd97cfd docs: use custom html theme
This uses the new custom HTML theme for Sphinx, so our documentation
looks similar to our website.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8399>
2023-04-26 22:45:41 +00:00
Erik Faye-Lund
3b6f549e96 docs: remove support for old sphinx-versions
We're not using them, so no point in keeping support around.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8399>
2023-04-26 22:45:41 +00:00
Erik Faye-Lund
e64dae9441 docs: translate admonitions into bootstrap alerts
Sphinx and Bootstraps disagree on what these are called. Let's try to
bridge that gap, by rewriting things a bit.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8399>
2023-04-26 22:45:41 +00:00
Erik Faye-Lund
f72033bb70 docs: add bootstrap extension
To get Sphinx and Bootstrap to work well together, we need to massage
the output from Sphinx a bit. This adds an extension to do such changes,
based on work from here:

https://github.com/pydata/pydata-sphinx-theme

...However, because we don't ship as an external theme, we can't just do
things as a part of __init__.py, so instead we register an extension
that does the heavy lifting for us.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8399>
2023-04-26 22:45:41 +00:00
Erik Faye-Lund
7da0482636 docs: add custom html theme
This custom theme will make the docs look more like the main website,
which makes it slightly less confusing to navigate around when crossing
between the two.

The icon link.svg is from Feathericons:
https://feathericons.com/?query=link

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8399>
2023-04-26 22:45:41 +00:00
Erik Faye-Lund
3e612aa86e docs: sort extensions
It's easier to keep this sorted if we have each element on a separate
line. Let's do that for long-term ease of maintainability.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8399>
2023-04-26 22:45:41 +00:00
Axel Davy
ad1e64551d frontend/nine: Fix num_textures count
util_last_bit already included the +1

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11865?commit_id=9205a45da50ebc6159169ba42b02d8475b09bfd7
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8894

cc: mesa-stable

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22645>
2023-04-26 21:45:02 +00:00
Mike Blumenkrantz
13eaa7cdd0 zink: reapply VkImageViewUsageCreateInfo when rebinding a surface
attachment bits must always be removed if they are not supported

fixes (ANV):
KHR-GL46.texture_view.view_classes

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22713>
2023-04-26 21:22:43 +00:00
Mike Blumenkrantz
792c2956ac zink: break out VkImageViewUsageCreateInfo applying for reuse
no functional changes

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22713>
2023-04-26 21:22:43 +00:00
Patrick Lerda
c39a2d67ea crocus: fix refcnt imbalance related to framebuffer
Indeed, the hardcoded framebuffer cleanup doesn't handle "resolve".

For instance, this issue is triggered with "piglit/bin/glx-copy-sub-buffer -samples=2 -auto"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: f5bde99cbd ("gallium: plumb resolve attachments through from frontends -> pipe_framebuffer_state")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22554>
2023-04-26 21:07:44 +00:00
Karol Herbst
3af2ab02f3 rusticl/program: use if let to get rid of an unwrap in build
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22434>
2023-04-26 20:49:42 +00:00
Karol Herbst
f745a07b36 rusticl/program: rework dynamic Program state
We had a lot of implicit locks going on even though there was strictly no
need in doing so. This makes the compilation APIs more atomic while also
providing a cleaner interface.

Not in the mood of splitting it up without deadlocking in the middle. So
it's one big commit sadly.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22434>
2023-04-26 20:49:42 +00:00