Commit Graph

178136 Commits

Author SHA1 Message Date
Francisco Jerez b98eebbcb2 intel/brw: Implement null push constant workaround.
This implements an undocumented workaround for a hardware bug that
affects draw calls with a pixel shader that has 0 push constant cycles
when TBIMR is enabled, which has been seen to lead to a hang with
Fallout 3 and Metal Gear Rising Revengeance.  This hardware bug has
been reported as HSDES#22020184996 which is still pending a resolution
by the hardware team.  However since this workaround found empirically
has been confirmed to fix the issue reliably and it's relatively
harmless it seems worth checking in already even though no final W/A
number is available nor has the W/A json file been updated.

To avoid the issue we simply pad the push constant payload to be at
least 1 register.  This is enabled via a brw_wm_prog_key since the
driver needs to be in agreement with the compiler on whether the dummy
push constant cycle is present, and it can be avoided in cases where
the driver knows that TBIMR will be disabled (e.g. for BLORP).

Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10728
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11399
Fixes: 57decad976 ("intel/xehp: Enable TBIMR by default.")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30031>
2024-07-20 01:13:19 +00:00
Francisco Jerez bb2513918a intel/dev: Add devinfo flag for TBIMR push constant workaround.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30031>
2024-07-20 01:13:19 +00:00
Ian Romanick faee9426ab nir/algebraic: Optimize some masking of extract_u8 operations
I observed this pattern in several Red Dead Redemption 2 shaders.

No shader-db changes on any Intel platform.

v2: Remove duplicated patterns. Noticed by Georg.

fossil-db:

All Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 151519393 -> 151507192 (-0.01%); split: -0.01%, +0.00%
Cycle count: 17208246858 -> 17177437340 (-0.18%); split: -0.25%, +0.07%
Spill count: 80830 -> 80759 (-0.09%); split: -0.09%, +0.00%
Fill count: 152754 -> 152179 (-0.38%); split: -0.40%, +0.02%

Totals from 7531 (1.20% of 630198) affected shaders:
Instrs: 12606141 -> 12593940 (-0.10%); split: -0.10%, +0.00%
Cycle count: 5466605514 -> 5435795996 (-0.56%); split: -0.79%, +0.22%
Spill count: 25251 -> 25180 (-0.28%); split: -0.29%, +0.01%
Fill count: 45143 -> 44568 (-1.27%); split: -1.36%, +0.08%

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30158>
2024-07-20 00:19:05 +00:00
Ian Romanick 1c7e35d4e0 nir/algebraic: Optimize some bit operation nonsense observed in some shaders
In updates (not post at the time of this writing) to !29884, a change
caused many spill and fill regressions shader for OpenGL Tomb
Raider. While looking at that shader, I noticed some odd patterns. I
initially added these patterns to counteract the regressions caused by
the other change, but I had no luck. On Ice Lake... this cuts 99
instructions from the shader.

shader-db:

All Intel platforms had simliar results. (Meteor Lake shown)
total instructions in shared programs: 19732341 -> 19732295 (<.01%)
instructions in affected programs: 1744 -> 1698 (-2.64%)
helped: 1 / HURT: 0

total cycles in shared programs: 916273716 -> 916273068 (<.01%)
cycles in affected programs: 14266 -> 13618 (-4.54%)
helped: 1 / HURT: 0

fossil-db:

All Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 151519575 -> 151519393 (-0.00%)
Cycle count: 17208402120 -> 17208246858 (-0.00%); split: -0.00%, +0.00%

Totals from 159 (0.03% of 630198) affected shaders:
Instrs: 51970 -> 51788 (-0.35%)
Cycle count: 11474176 -> 11318914 (-1.35%); split: -1.36%, +0.01%

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30158>
2024-07-20 00:19:05 +00:00
Ian Romanick 92befad89f nir/range_analysis: Fix errors in fmin and fmax tables
fmin(x, 0.0) must at least be le_zero, and fmax(x, 0.0) be at least be
ge_zero.

shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19733226 -> 19731919 (<.01%)
instructions in affected programs: 196415 -> 195108 (-0.67%)
helped: 615 / HURT: 0

total cycles in shared programs: 916277979 -> 916265288 (<.01%)
cycles in affected programs: 2482535 -> 2469844 (-0.51%)
helped: 346 / HURT: 178

LOST:   2
GAINED: 1

fossil-db:

All Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 151531355 -> 151519575 (-0.01%); split: -0.01%, +0.00%
Cycle count: 17209372399 -> 17208402120 (-0.01%); split: -0.01%, +0.01%
Max live registers: 32016490 -> 32016514 (+0.00%)

Totals from 4307 (0.68% of 630198) affected shaders:
Instrs: 4179418 -> 4167638 (-0.28%); split: -0.28%, +0.00%
Cycle count: 1063492212 -> 1062521933 (-0.09%); split: -0.24%, +0.15%
Max live registers: 359250 -> 359274 (+0.01%)

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30158>
2024-07-20 00:19:05 +00:00
Mike Blumenkrantz 53f249b921 zink: use blake3 instead of sha1 for program cache
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30261>
2024-07-19 23:17:50 +00:00
Mike Blumenkrantz ce1236fe87 zink: use GENERAL layout for depth attachments on some drivers
this matches a vkd3d optimization

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30261>
2024-07-19 23:17:50 +00:00
Mike Blumenkrantz 991244dad4 zink: use local screen variable in zink_prep_fb_attachment
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30261>
2024-07-19 23:17:50 +00:00
Mike Blumenkrantz cdc70013a2 zink: add lavapipe to can_do_invalid_linear_modifier list
lavapipe only has one modifier

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30261>
2024-07-19 23:17:50 +00:00
Mike Blumenkrantz d8d53f72da zink: hash in some driver workaround flags to shader cache
these affect shader generation

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30261>
2024-07-19 23:17:50 +00:00
Mike Blumenkrantz ec3eb87f91 zink: move some flags from driver_workarounds to separate struct
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30261>
2024-07-19 23:17:50 +00:00
Eric Engestrom e2c90da560 venus/ci: skip timing out test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom e64adab9a0 anv+zink/ci: mark a couple of tests as flaky
Seen while trying to merge this series.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom ebef31e4cf anv+zink/ci: document two tests, one failing and one crashing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom 2ed5d362a6 anv+zink/ci: mark some tests as fixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom 8fe147de57 freedreno/ci: document extra variants of failing tests on a618 and a630
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom 734823fe7d freedreno/ci: double job timeout for a306
Based on the predicted remaining time when it gets killed, it need just over 30min.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom e1edf20a4d radeonsi/ci: skip timing out test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom dfd70bab4a loader: gc loader_get_extensions_name() and __DRI_DRIVER_{GET_,}EXTENSIONS defines
Leaving the defines in include/GL/internal/dri_interface.h because I'm
not sure if something needs it.

Fixes: fa541a887c ("loader: delete loader_open_driver()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30266>
2024-07-19 20:38:19 +00:00
Mark Burton 7dfb9ba023 gallivm: Fix compilation errors when using LLVM 13.
Adds missing header file and fixes local variable type.

Fixes: 47cd0eee26 ("gallivm: create a pass manager wrapper.")

Signed-off-by: Mark Burton <markb@smartavionics.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30058>
2024-07-19 19:19:24 +00:00
Jordan Justen bb8063e1f4 anv/generated_indirect_draws: Adjust xe2 simd32 sends_count_expectation
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e9f63df ('intel/dev: Enable LNL PCI IDs without INTEL_FORCE_PROBE')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30093>
2024-07-19 16:09:06 +00:00
Samuel Pitoiset 1846eed38b radv/meta: create the layout for clear depth/stencil on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Samuel Pitoiset 7c62f53b83 radv/meta: rework getting depth stencil clear pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Samuel Pitoiset cfd9d550d8 radv/meta: create the layout for clear color on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Samuel Pitoiset dd188b7e77 radv/meta: rework getting clear color pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Samuel Pitoiset 2af57b1cac radv/meta: create the louts for DCC comp-to-single clear on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Samuel Pitoiset 6c6dae59fb radv/meta: create the layouts for compute resolve on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Samuel Pitoiset fd5526fd87 radv/meta: create the layouts for FMASK expand on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Samuel Pitoiset 4f3f3ccd0d radv/meta: create the layouts for FMASK copy on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Samuel Pitoiset 40724a657a radv/meta: create the layouts for depth decompress on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Samuel Pitoiset e7eb201e18 radv/meta: create the layouts for FS resolve pipelines on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Samuel Pitoiset fc30915637 radv/meta: create the layouts for blit pipelines on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Samuel Pitoiset 5361a50d54 radv/meta: stop creating similar pipeline layouts for depth decompress
Only the pipeline depends on the number of samples.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Samuel Pitoiset 5b7459d0fa radv/meta: remove unnecessary goto
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Samuel Pitoiset c96f2c5e3d radv/meta: stop checking that creating NIR shaders failed
This shouldn't happen in practice.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262>
2024-07-19 14:53:44 +00:00
Daniel Stone 508a3bdd27 u_format: Reword introduction
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29649>
2024-07-19 13:50:42 +00:00
Daniel Stone 974d31dba7 format: Generate sRGB<->linear conversions from table
Instead of having a hardcoded table to convert between sRGB formats and
their linear-gamma equivalents (and vice-versa), generate this from the
information in the format table.

This requires adding a 'sublayout' attribute to differentiate between,
e.g. DXT1 and DXT3, which otherwise appear to be equivalent but for
their name prefix.

As an anonymous union is being used, we also need named initialisers for
the util_format_description entries.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29649>
2024-07-19 13:50:42 +00:00
Daniel Stone e05415a82e format: Generate endian-independent format aliases
Instead of having a hardcoded list of endian-independent format aliases
in the header, generate them from the format definitions.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29649>
2024-07-19 13:50:42 +00:00
Daniel Stone ccc6442d6f u_format: Rewrite format table to use YAML
u_format has always had its format table in CSV. This is kind of nice
for some things, but is a serious pain to extend, especially with
optional fields.

In going through our many (many, many) duplicated tables of format
mappings, it would've been nice to add some descriptions to our central
u_format table, such as mapping to DRM FourCC, to EGLImage mappings, and
to GL internalformats for EGLImage imports. Unfortunately, doing so with
more additional fields would just make the CSV totally unreadable.

Move the CSV table to a YAML-based table and adjust the Python parsers
to suit. The resulting generated files are identical before and after
the transition.

The new parser also has a significant amount of format validation to
make it easier to catch common errors.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29649>
2024-07-19 13:50:42 +00:00
Karol Herbst 3386e1425f rusticl: support read_write images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30242>
2024-07-19 13:26:12 +00:00
Karol Herbst 3d0ec53275 zink: fix OpenCL read_write images
With OpenCL read_write images enabled we can actually hit image_loads.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30242>
2024-07-19 13:26:12 +00:00
Valentine Burley 52cf610975 tu: Enable VK_KHR_shader_subgroup_uniform_control_flow
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29277>
2024-07-19 12:54:09 +00:00
Valentine Burley d43a271175 freedreno/ci: Use the common a6xx-skips on a750
Some tests will have to be skipped on all devices on Turnip.
To avoid duplication use the common a6xx-skips file on a750 as well.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29277>
2024-07-19 12:54:09 +00:00
Valentine Burley c4da848a1a freedreno,tu,ir3: Move threadsize_base and max_waves to fd_dev_info
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29277>
2024-07-19 12:54:09 +00:00
Lionel Landwerlin 692e1ab2c1 anv: get rid of the second dynamic state heap
Pretty big change... Sorry for that.

I can't exactly remember why I created 2 heaps. I think it's because I
mistakenly thought the samplers in the binding sampler pointers needed
to be indexed from the binding table. But that's not the case, they
just need to be in the dynamic state heap.

In the future, this change will allow to also allocate buffers for
push constant data in the newly created dynamic_visible_pool which
will be useful on < Gfx12.0 where this is the only place push constant
data can live for compute shaders.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30047>
2024-07-19 12:21:46 +00:00
Timothy Arceri 355a1f2058 glsl: remove out of date comment
GLSL 4.40 changed the relevant language in Section 8.13.2 (Interpolation
Functions) to:

   "Component selection operators (e.g., .xy) may be used when specifying
    interpolant."

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30239>
2024-07-19 10:59:11 +00:00
Eric Engestrom b2c3dfef75 llvmpipe/ci: mark spec@!opengl 1.1@gl_select tests as fixed
Fixed by a commit in the range d94a40fe...6f02ec5e, likely
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26018

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30260>
2024-07-19 09:57:24 +00:00
Eric Engestrom 4696e9c49b v3d/ci: mark spec@amd_performance_monitor@vc4 tests as fixed
Fixed by a commit in the range 452fed52..decc040a, but no obvious
candidate stands out.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30259>
2024-07-19 09:11:16 +00:00
Georg Lehmann e5b48da908 aco: remove optimize_cmp_subgroup_invocation
The new NIR optimization pass handles all these cases and more.
No Foz-DB changes.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30236>
2024-07-19 08:06:58 +00:00
Georg Lehmann aa6d363634 nir: constant fold inverse_ballot
Foz-DB Navi21:
Totals from 210 (0.26% of 79395) affected shaders:
Instrs: 79583 -> 78892 (-0.87%)
CodeSize: 435636 -> 431680 (-0.91%)
VGPRs: 7208 -> 7224 (+0.22%)
Latency: 660376 -> 658808 (-0.24%); split: -0.38%, +0.14%
InvThroughput: 127489 -> 127544 (+0.04%); split: -0.35%, +0.39%
VClause: 1503 -> 1504 (+0.07%)
SClause: 3970 -> 3947 (-0.58%)
Copies: 4932 -> 4682 (-5.07%); split: -5.17%, +0.10%
Branches: 2411 -> 2406 (-0.21%); split: -0.33%, +0.12%
PreSGPRs: 6395 -> 6434 (+0.61%); split: -0.31%, +0.92%
PreVGPRs: 4100 -> 4103 (+0.07%)
VALU: 48484 -> 48145 (-0.70%); split: -0.70%, +0.00%
SALU: 12499 -> 12202 (-2.38%); split: -2.41%, +0.03%
SMEM: 6448 -> 6420 (-0.43%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30235>
2024-07-19 07:24:34 +00:00