Daniel Schürmann
957b271a9f
nir/opt_load_store_vectorize: only attempt to vectorize shared2 after exhausting other possibilities
...
Totals from 249 (0.31% of 79839) affected shaders: (Navi48)
Instrs: 276401 -> 275918 (-0.17%); split: -0.29%, +0.11%
CodeSize: 1477072 -> 1474440 (-0.18%); split: -0.26%, +0.08%
VGPRs: 12748 -> 12760 (+0.09%); split: -0.28%, +0.38%
Latency: 1397959 -> 1398846 (+0.06%); split: -0.10%, +0.16%
InvThroughput: 424767 -> 424496 (-0.06%); split: -0.09%, +0.02%
VClause: 5183 -> 5186 (+0.06%); split: -0.10%, +0.15%
SClause: 6537 -> 6538 (+0.02%); split: -0.05%, +0.06%
Copies: 21295 -> 21098 (-0.93%); split: -1.21%, +0.29%
Branches: 4324 -> 4325 (+0.02%)
PreSGPRs: 9719 -> 9717 (-0.02%)
PreVGPRs: 8857 -> 8847 (-0.11%); split: -0.24%, +0.12%
VALU: 144514 -> 144334 (-0.12%); split: -0.20%, +0.07%
SALU: 38970 -> 38944 (-0.07%); split: -0.08%, +0.01%
VOPD: 884 -> 898 (+1.58%); split: +1.92%, -0.34%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36133 >
2025-08-19 14:28:14 +00:00
Caleb Callaway
20171f23d6
spirv: Fix RT raygen hit attribute validation error
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13677
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36729 >
2025-08-13 10:20:35 +00:00
Gert Wollny
8c65da0c9d
r600/sfn: cleanup GS shader emission
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Now that we lower all load_per_vertex_input to
r600_load_per_vertex_input we can remove some dead code
and also change the intrinsic to use only one source value.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36488 >
2025-08-12 14:30:17 +00:00
Georg Lehmann
8818d7367d
nir/opt_load_skip_helpers: optionally handle intrinsics
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36610 >
2025-08-12 08:56:37 +00:00
Georg Lehmann
cd687e277f
nir: add access for scratch loads
...
To be able to use ACCESS_SKIP_HELPERS.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36610 >
2025-08-12 08:56:37 +00:00
Georg Lehmann
2d16f457c5
nir: add ACCESS_SKIP_HELPERS
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36610 >
2025-08-12 08:56:37 +00:00
Georg Lehmann
91572a99bb
nir: rename to nir_opt_load_skip_helpers and add options struct
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36610 >
2025-08-12 08:56:37 +00:00
Georg Lehmann
fbae0893a6
nir: print skip_helpers for tex instrs
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36610 >
2025-08-12 08:56:37 +00:00
Georg Lehmann
6577f68ad4
nir/opt_tex_skip_helpers: never require helpers for stores/atomics
...
Helpers never execute stores/atomics.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36610 >
2025-08-12 08:56:37 +00:00
Georg Lehmann
26e6c4c092
nir/opt_tex_skip_helpers: don't skip helpers for terminate_if source
...
Helpers must be terminated correctly.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36610 >
2025-08-12 08:56:37 +00:00
Qiang Yu
bfd7f498a5
nir/opt_varying: remove assert for mesh shader crash
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This assert is not true when mesh shader.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596 >
2025-08-11 01:44:45 +00:00
Qiang Yu
5f1983f346
glsl,gallium,mesa: replace MESA_SHADER_STAGES with MESA_SHADER_MESH_STAGES
...
Prepare for mesh shader support, change all shared code to
use MESA_SHADER_MESH_STAGES.
Use command:
find src/gallium/auxiliary/ -type f -not -path '*/.git/*' -exec sed -i 's/\bMESA_SHADER_STAGES\b/MESA_SHADER_MESH_STAGES/g' {} +
find src/compiler -type f -not -path '*/.git/*' -exec sed -i 's/\bMESA_SHADER_STAGES\b/MESA_SHADER_MESH_STAGES/g' {} +
find src/mesa -type f -not -path '*/.git/*' -exec sed -i 's/\bMESA_SHADER_STAGES\b/MESA_SHADER_MESH_STAGES/g' {} +
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596 >
2025-08-11 01:44:44 +00:00
Qiang Yu
d42936c6a7
compiler: adjust comments for mesa_shader_stage
...
We're going to support mesh shader in GL, the stage order
is not sorted as comment described.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596 >
2025-08-11 01:44:42 +00:00
Caio Oliveira
12cdcccf24
spirv: Update headers and metadata from latest Khronos commit
...
This corresponds to a7361efd139bf65de0e86d43b01b01e0b34d387f
("Fixed typo in operand name of OpSubgroupAvcImeSetDualReferenceINTEL (#537 )")
in https://github.com/KhronosGroup/SPIRV-Headers .
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36681 >
2025-08-08 22:41:14 +00:00
Alyssa Rosenzweig
8566a566e6
nir: plumb ballot options
...
glsl needs to plumb this from the backend. we should clean up
nir_lower_subgroups to use this later but I don't have time to churn everything
right now.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36649 >
2025-08-08 20:51:03 +00:00
Alyssa Rosenzweig
1af0897452
nir/lower_subgroups: add lower_fp64 option
...
This is needed for doubles lowering to do the right thing.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36649 >
2025-08-08 20:51:03 +00:00
Yonggang Luo
2a6ac3a79c
util: Add namespace over float16_t in half_float.h
...
As float16_t may comes from arm_neon.h:
arm_neon.h:74:16: error: conflicting declaration 'typedef __fp16 float16_t'
74 | typedef __fp16 float16_t;
Also it is std::float16_t from <stdfloat> as part of C++23
So place it under namespace mesa to avoid conflict when upgrading xxhash.h to v0.8.3
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36654 >
2025-08-08 19:38:54 +00:00
Yonggang Luo
723eeac89b
util: Refactoring util_dl_get_path_from_proc out of clc/clc_helpers.cpp
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
For getting clc_helpers.cpp can be compiled with gcc/mingw
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36597 >
2025-08-07 21:15:13 +00:00
John Anthony
000bd3046d
nir,spirv: Add support for SPV_ARM_core_builtins
...
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36019 >
2025-08-07 11:46:33 +02:00
John Anthony
a68a825aad
nir,agx: unvendor core_id_agx
...
core_id will be used by SPV_ARM_core_builtins
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36019 >
2025-08-07 11:46:33 +02:00
Marek Olšák
ba6f731ead
glsl: remove gl_shader_compiler_options
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
unused
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36582 >
2025-08-06 17:41:40 -04:00
Marek Olšák
10b7f0e95d
glsl: move PositionAlwaysInvariant/Precise options to gl_constants
...
They are only set for 1 shader stage.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36582 >
2025-08-06 17:39:05 -04:00
Marek Olšák
c57af04c9f
glsl: replace LowerPrecisionConstants with pipe caps
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36582 >
2025-08-06 17:38:57 -04:00
Marek Olšák
2fc83bca1f
glsl: replace LowerPrecision16BitLoadDst with pipe caps
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36582 >
2025-08-06 17:38:55 -04:00
Marek Olšák
6defdf6518
glsl: replace LowerPrecisionFloat16Uniforms with pipe caps
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36582 >
2025-08-06 17:38:39 -04:00
Marek Olšák
7290cc6eef
glsl: replace LowerPrecisionDerivatives with pipe caps
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36582 >
2025-08-06 17:38:35 -04:00
Marek Olšák
3b252cbe92
glsl: replace LowerPrecisionFP16/Int16 with pipe caps
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36582 >
2025-08-06 17:38:33 -04:00
Marek Olšák
7fa7240ae1
glsl: replace LowerBuiltinVariablesXfb with pipe caps
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36582 >
2025-08-06 17:38:02 -04:00
Marek Olšák
0c14420169
glsl: use pipe caps in opt_shader
...
do_algebraic doesn't use any options
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36582 >
2025-08-06 17:38:00 -04:00
Marek Olšák
91cee75e63
mesa: stop using inc_mesa in most places that have nothing to do with GL
...
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36562 >
2025-08-06 20:35:26 +00:00
Marek Olšák
ebdecb8d45
mesa: remove inc_mapi
...
We don't need this to be in include dirs.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36562 >
2025-08-06 20:35:26 +00:00
Qiang Yu
b22806705c
compiler,gallium: remove PIPE_SHADER_* and adjust some macro usage
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:41 +08:00
Qiang Yu
c135ed1eb9
all: rename gl_shader_stage_name to mesa_shader_stage_name
...
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:41 +08:00
Qiang Yu
e0397b1ee0
all: rename gl_shader_stage_can_set_fragment_shading_rate
...
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:41 +08:00
Qiang Yu
260bdad074
all: rename gl_shader_stage_is_rt to mesa_shader_stage_is_rt
...
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:41 +08:00
Qiang Yu
807d693421
compiler: rename gl_shader_stage_is_callable to mesa_shader_stage_is_callable
...
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:41 +08:00
Qiang Yu
4847e0b380
all: rename gl_shader_stage_uses_workgroup to mesa_shader_stage_uses_workgroup
...
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:41 +08:00
Qiang Yu
4ff341f2fc
compiler: remove gl_shader_stage_is_graphics
...
It's not used by anyone.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:41 +08:00
Qiang Yu
b27c8c9eb8
all: rename gl_shader_stage_is_mesh to mesa_shader_stage_is_mesh
...
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:41 +08:00
Qiang Yu
7a91473192
all: rename gl_shader_stage_is_compute to mesa_shader_stage_is_compute
...
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:41 +08:00
Qiang Yu
f972e76148
all: rename pipe_shader_type to mesa_shader_stage
...
Use command:
find . -type f -not -path '*/.git/*' -exec sed -i 's/\benum pipe_shader_type\b/mesa_shader_stage/g' {} +
find . -type f -not -path '*/.git/*' -exec sed -i 's/\bpipe_shader_type\b/mesa_shader_stage/g' {} +
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:40 +08:00
Qiang Yu
196569b1a4
all: rename gl_shader_stage to mesa_shader_stage
...
It's not only for GL, change to a generic name.
Use command:
find . -type f -not -path '*/.git/*' -exec sed -i 's/\bgl_shader_stage\b/mesa_shader_stage/g' {} +
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:40 +08:00
Qiang Yu
4c7244fac5
glsl: remove miss declaration of struct gl_shader_stage
...
There is no such struct.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:40 +08:00
Qiang Yu
799806d85e
all: rename PIPE_SHADER_MESH_TYPES to MESA_SHADER_MESH_STAGES
...
Use command:
find . -type f -not -path '*/.git/*' -exec sed -i 's/\bPIPE_SHADER_MESH_TYPES\b/MESA_SHADER_MESH_STAGES/g' {} +
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:40 +08:00
Qiang Yu
7729920d92
all: rename PIPE_SHADER_MESH to MESA_SHADER_MESH
...
Use command:
find . -type f -not -path '*/.git/*' -exec sed -i 's/\bPIPE_SHADER_MESH\b/MESA_SHADER_MESH/g' {} +
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:39 +08:00
Qiang Yu
f60ea0a3cd
all: rename PIPE_SHADER_COMPUTE to MESA_SHADER_COMPUTE
...
Use command:
find . -type f -not -path '*/.git/*' -exec sed -i 's/PIPE_SHADER_COMPUTE/MESA_SHADER_COMPUTE/g' {} +
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:39 +08:00
Marek Olšák
fee8e92855
nir: use gc_ctx for nir_variable to reduce ralloc/malloc overhead
...
gc_ctx uses a slab allocator. This reduces GLSL compile times by 1-3%
with the gallium noop driver.
This reduces the number of ralloc_size calls for Heaven shaders by 14.3%.
Note that gc_ctx also uses ralloc_size, so the reduction is a net change.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36538 >
2025-08-05 22:55:14 +00:00
Marek Olšák
44350bce1f
nir: add nir_variable_create_zeroed helper
...
This will allow us to switch nir_variable from ralloc to gc_ctx,
which uses a slab allocator.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36538 >
2025-08-05 22:55:14 +00:00
Marek Olšák
b769d5dcde
nir: don't use variables as ralloc parents, use the shader instead
...
so that we can switch variables to gc_ctx
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36538 >
2025-08-05 22:55:13 +00:00
Marek Olšák
dadd4e4555
nir/clone: don't call ralloc_strdup with a NULL pointer for intrinsic names
...
No impact, but it was affecting my ralloc_strdup stats for
nir_intrinsic_instr names.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36538 >
2025-08-05 22:55:13 +00:00