Commit Graph

184807 Commits

Author SHA1 Message Date
Karol Herbst
53df391d27 rusticl/kernel: recalculate scratch and shared memory after opts
Turns out we have to do it regardless as opts after explicit_types could
get rid of even more scratch and shared memory.

Fixes: ea023ff5cd ("rusticl/kernel: no need to reset the scratch size anymore")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27634>
2024-02-15 15:09:23 +00:00
Georg Lehmann
ad5fbc4407 aco: use fmamk/ak instead of fma with inline constant for more VOPD
Foz-DB navi31, forced wave32:
Totals from 24438 (31.29% of 78112) affected shaders:
Instrs: 21632788 -> 21551766 (-0.37%); split: -0.38%, +0.01%
CodeSize: 126181860 -> 126083848 (-0.08%); split: -0.10%, +0.02%
Latency: 162491062 -> 162516234 (+0.02%); split: -0.05%, +0.07%
InvThroughput: 31121194 -> 31002125 (-0.38%); split: -0.40%, +0.02%
VClause: 420176 -> 420169 (-0.00%); split: -0.00%, +0.00%
SClause: 791844 -> 791762 (-0.01%); split: -0.01%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27523>
2024-02-15 12:38:55 +01:00
Caio Oliveira
62a8de99ac intel/blorp: Move brw_compiler.h include to where is needed
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:19 +00:00
Caio Oliveira
f4df4be7e7 intel/blorp: Avoid brw types in blorp_priv.h
Abuse void* here so there's one less file dependent on specific brw
types.  We can revisit if there's a need later, if we ever end up with
a common type for prog_data.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:19 +00:00
Caio Oliveira
b28cf9123b intel/blorp: Move brw_blorp_get_urb_length helper
Moving to blorp_genX_exec.h to help make blorp_priv.h independent of brw
types.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:19 +00:00
Caio Oliveira
b34df9f801 intel/blorp: Remove outdated reference in comment
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:19 +00:00
Caio Oliveira
9377dc417d intel/blorp: Use a struct to return blorp_compile_*() results
Allocate the prog_data instead of expecting one from the user, also
explicitly return both kernel and prog_data size, so that the
plumbing code isn't required to use the exact prog_data type.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:19 +00:00
Caio Oliveira
82ecc219e0 intel/blorp: Simplify blorp_compile_cs() interface
No need to take brw_prog_cs_key.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:19 +00:00
Caio Oliveira
cfad85eed0 intel/blorp: Simplify blorp_compile_fs() interface
Take multisample_fbo parameter instead of a brw_wm_key.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:18 +00:00
Caio Oliveira
16ba2478fa intel/blorp: Remove brw_ prefix when not applicable
Remove the brw_ prefix from some blorp functions and structs to avoid
confusion with what's related to brw and what's not.  Some of those will
become independent of brw in upcoming patches.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:18 +00:00
Caio Oliveira
c8fda63378 intel/blorp: Don't require specific prog_data type in callback
Make interface less dependent on brw types.  If we care, later
might make sense to add a tagged union for the possible types here.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:18 +00:00
Pavel Ondračka
d78a913bda r300: add explicit flrp lowering
Even though we set .lower_flrp32 = true there is no actuall flrp
lowering in nir_opt_algebraic. Mesa does not produce any but nine does,
so lower it explicitly to fix nine.

Fixes: f8a5cba3b4
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27467>
2024-02-15 10:11:51 +00:00
Caio Oliveira
0b751a2134 intel: Rename i965_{asm,disasm} tools to brw_{asm,disasm}
And move them inside the compiler since they (especially asm) rely on
a bunch of internal types.

Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27579>
2024-02-15 09:26:46 +00:00
Caio Oliveira
5992185c8d intel/compiler: Merge intel_disasm.[ch] into corresponding brw files
Rename the functions to match the existing ones.

Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27579>
2024-02-15 09:26:46 +00:00
Caio Oliveira
468a0ffe9c intel/compiler: Include brw_disasm_info.h where its used
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27579>
2024-02-15 09:26:46 +00:00
Caio Oliveira
ff95f00883 intel/compiler: Move disassemble functions to own header file
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27579>
2024-02-15 09:26:46 +00:00
Hans-Kristian Arntzen
786c1b8322 radv: export multiview in VS/TES/GS for depth-only rendering
For depth-only rendering, a VS would not export layer properly.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10606
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27615>
2024-02-15 09:07:42 +00:00
Jordan Justen
62b72b6be9 intel/dev: Add 2 additional ADL-N PCI ids
Ref: https://patchwork.freedesktop.org/patch/578271/?series=129901&rev=1
Ref: bspec 68397
Cc: mesa-stable
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27625>
2024-02-15 08:07:15 +00:00
Caio Oliveira
5732c9d269 intel/compiler: Rename brw_cs_dispatch_info to intel_cs_dispatch_info
And move to the intel_shader_enums.h file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27475>
2024-02-14 22:31:23 -08:00
Caio Oliveira
c5b80de583 intel/compiler: Rename brw_vue_map to intel_vue_map
And move to the intel_shader_enums.h file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27475>
2024-02-14 22:31:23 -08:00
Caio Oliveira
7d85d2c7fd intel/compiler: Rename DISPATCH_MODE_* enums to INTEL_DISPATCH_MODE_*
And move to the intel_shader_enums.h file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27475>
2024-02-14 22:31:23 -08:00
Caio Oliveira
aeda865b6d intel/compiler: Rename BRW_TESS_* enums to INTEL_TESS_*
And move to the intel_shader_enums.h file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27475>
2024-02-14 22:31:23 -08:00
Caio Oliveira
26dd1f0bba intel/compiler: Rename BRW_WM_MSAA_* enums to INTEL_MSAA_*
And move to the intel_shader_enums.h file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27475>
2024-02-14 22:31:23 -08:00
Caio Oliveira
a88084f8be intel/compiler: Rename brw_image_param to isl_image_param
And move them to ISL.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27475>
2024-02-14 22:31:23 -08:00
Jesse Natalie
1314c5b357 microsoft/compiler: Fix wave size control for SM6.8+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27624>
2024-02-15 00:29:50 +00:00
Jesse Natalie
e21774eb0a microsoft/compiler: Fix wave size control for SM6.6+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27624>
2024-02-15 00:29:50 +00:00
Jesse Natalie
0daad70f9f microsoft/compiler: For emulating scan, ensure all threads are active when reading cross-lane
HLSL docs say WaveReadLaneAt is undefined if the target lane is inactive. This makes
sense since the target lane may need to *send* the data, rather than it being pulled
by the calling lane. So don't early-out on the loop, iterate through the whole wave
on all threads and read the cross-lane data before branching.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27624>
2024-02-15 00:29:50 +00:00
Timothy Arceri
219be55807 glsl: add missing error check for half float varying
We should never get here currently as the parser should not even
process float16_t without half float enabled. However it seems
like a good idea to add this for completeness.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27585>
2024-02-14 23:50:21 +00:00
Eric Engestrom
66f36a79ef docs: add sha256sum for 24.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27622>
2024-02-14 22:00:59 +00:00
Eric Engestrom
c9bc04180d docs: add release notes for 24.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27622>
2024-02-14 22:00:59 +00:00
Alyssa Rosenzweig
1ca256b762 docs: update for GL4.6 and ES3.2 on asahi
https://rosenzweig.io/blog/conformant-gl46-on-the-m1.html

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
c7bec0d3c8 asahi: advertise GL4.6 and ES3.2
https://rosenzweig.io/blog/conformant-gl46-on-the-m1.html

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
c116d1efbb agx: add "is helper program?" key bit
so we can enforce correctness a bit more at build-time. if the helper program
does not fit in the required RA, spilling will be broken in the driver; now this
is a build-time failure instead of a silent runtime one.

Closes https://gitlab.freedesktop.org/asahi/mesa/-/issues/36

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
a3f647fde1 asahi: precompile helper program
1. avoids cluttering shaders,internal print
2. reduces screen create overhead. this cuts average "glxinfo" runtime by about
   25%, and seems to shave maybe 0.5% off the CTS job.
3. enforces helper program builds successfully as a build-time assertion
4. reduces the libagx generated blob for now, since g13 binaries are more
   compact than serialized NIR

Closes https://gitlab.freedesktop.org/asahi/mesa/-/issues/37

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
e1644a2307 asahi: reorder compiler before clc
so clc can call the compiler.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
020e2959d2 agx: decouple from libagx
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
4a3b905bb8 agx: move texture lowering into lib
This is a bit annoying, but it gets rid of the libagx dep which is preventing
precompiling helper programs.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
0fa6901f32 agx: call texture lowering in the driver
libagx dependency.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
beb8aca7a2 agx: move SSBO lowering
agxv uses a different path

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
1f465d72dd asahi: split out genxml/ directory
src/asahi/lib is creating dependency hell, let's start splitting it up so we can
ease some of the clc related pains.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
35c671ecef asahi: clean up format table renderability
infer renderability from whether we specify a renderable format. nfc now that
rgb9e5 is fixed.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
0ee0969f79 asahi: use #pragma once
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
951219a4fc ail: use #pragma once
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
3333c2cdeb asahi/lib: use #pragma once
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
a296e7ec3a agx: use #pragma once
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
af04176860 agx: decouple compiler from genxml
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
23b77d3329 agx: rm ridiculous dependency
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
4e8a42645b asahi: quelch gcc warning
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
b39de8bb4a asahi: Implement ARB_texture_barrier by decompression
Your perf goes not stonks, sorry. Passes
KHR-GL40.texture_barrier_ARB.*.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
589338e8fc agx: sink wait_pix
No reason not to, noticed when poking at the earlier parts of the series.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00