Alyssa Rosenzweig
70fd20d2bc
nir/lower_passthrough_edgeflags: return progress
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976 >
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
460d2ca4f3
nir/lower_point_size_mov: return prog
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976 >
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
8b7d765e59
nir/lower_alpha_test: rewrite with intrinsics_pass
...
returns progress now
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976 >
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
086cbe5da2
nir/lower_bitmap: return prog
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976 >
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
4833e42721
nir: return prog from drawpixels
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976 >
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
6fa32b5b83
nir/lower_clip_cull_distance_arrays: return prog
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976 >
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
a36812d9b4
nir/lower_io_to_temporaries: return prog
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976 >
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
caffc3abca
nir/lower_blend: return progress
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976 >
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
29bd0a8ffa
nir/lower_ssbo: rewrite
...
This pass was a mess. Rewrite it as modern NIR, fixing the metadata issues in
the process.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976 >
2024-01-12 01:13:02 +00:00
Yonggang Luo
0b9c96562b
treewide: Use util_is_power_of_two_nonzero{64|_uintptr} when needed
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26909 >
2024-01-11 16:45:57 +00:00
Matt Turner
4ed0957ce7
nir/tests: Reenable tests that failed on big-endian
...
These tests were disabled due to the bug fixed in the previous commit.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26964 >
2024-01-10 21:47:30 +00:00
Matt Turner
5997cf7587
nir: Fix cast
...
We were wrongly telling `nir_const_value_as_uint()` that `iter` had
`bit_size` bits, but in one case it is explicitly i64. This works on
little endian platforms, but caused the nir_loop_unroll_test.fadd{,_rev}
tests to fail on big endian platforms.
Bug: https://bugs.gentoo.org/921297
Fixes: 268ad47c11 ("nir/loop_analyze: Handle bit sizes correctly in calculate_iterations")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26964 >
2024-01-10 21:47:30 +00:00
Alyssa Rosenzweig
8ddd89ffa5
nir,zink: Redefine flat_mask in terms of I/O locations
...
Robust against separable shaders, and still makes sense for lowered I/O drivers,
whereas just counting FS variables and expecting them to match with the VS is...
questionable.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Signed-off-by: antonino <antonino.maniscalco@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26888 >
2024-01-10 14:30:14 +00:00
Alyssa Rosenzweig
97f9f7ab0a
asahi: implement point sprites w/o shader key
...
we can replace varyings with point sprites, we just need to fix up .zw
appropriately. do that with some bcsels, ALU is cheap.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Konstantin Seurer
4c363acf94
vtn: Allow for OpCopyLogical with different but compatible types
...
> Result Type must not equal the type of Operand (see OpCopyObject),
> but Result Type must logically match the Operand type.
Allow for this by setting the expected type and making sure, that both
types match.
cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10163
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26252 >
2024-01-09 21:53:21 +00:00
Alyssa Rosenzweig
3da2773316
vtn: fuse OpenCL mad if we can can
...
clpeak "float" case from 1112 -> 1978 GFLOPS on rusticl on m1.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26932 >
2024-01-09 18:04:19 +00:00
Caio Oliveira
e0eea5ea4e
nir: Disable -Wmisleading-indentation when compiling with GCC
...
When a file is too large, -Wmisleading-indentantion will give the warning
below, that we can't prevent from a #pragma:
```
src/compiler/nir/nir_opt_algebraic.c: In function ‘nir_opt_algebraic’:
src/compiler/nir/nir_opt_algebraic.c:1469069: note: ‘-Wmisleading-indentation’ is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers
1469069 | nir_foreach_function_impl(impl, shader) {
|
src/compiler/nir/nir_opt_algebraic.c:1469069: note: adding ‘-flarge-source-files’ will allow for more column-tracking support, at the expense of compilation time and memory
```
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549 for details.
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25315 >
2024-01-09 01:40:22 +00:00
Konstantin Seurer
8050b89819
vtn: Handle DepthReplacing correctly
...
The meaning of DepthReplacing was clarified in
https://gitlab.khronos.org/spirv/SPIR-V/-/issues/342 .
TLDR: It just means that the shader can write to FragDepth.
We should therefore only overwrite depth_layout if it is equal to NONE,
since NONE means "not written" and all other modes mean "written" plus
some additional information.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10344
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26876 >
2024-01-08 18:52:50 +00:00
Daniel Schürmann
c1ef6037fd
nir/gather_info: fix enumeration of wide subgroup intrinsics
...
nir_intrinsic_ballot_* are no subgroup operations.
nir_intrinsic_rotate was missing.
nir_intrinsic_mbcnt_amd is not a subgroup operation.
nir_intrinsic_writelane_amd only affects a single invocation.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18249 >
2024-01-08 10:01:47 +00:00
Daniel Schürmann
d434a127f9
nir/opt_move_discards_to_top: don't schedule discard/demote across subgroup operations
...
Fixes: b447f5049b ('nir: Add a discard optimization pass')
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18249 >
2024-01-08 10:01:47 +00:00
Konstantin Seurer
4d02543853
vtn: Remove transpose(m0)*m1 fast path
...
This is broken for games that rely on invariant geometry since the usage
of matrices can affect how gl_Position is computed. The fdot fastpath
relied on if and how fdot is lowered for correctness.
Totals from 6578 (7.73% of 85071) affected shaders:
MaxWaves: 147190 -> 147170 (-0.01%)
Instrs: 4451406 -> 4438140 (-0.30%); split: -0.31%, +0.01%
CodeSize: 23553020 -> 23541772 (-0.05%); split: -0.07%, +0.03%
VGPRs: 302304 -> 302328 (+0.01%)
SpillSGPRs: 1309 -> 1329 (+1.53%)
Latency: 22509985 -> 22177164 (-1.48%); split: -1.48%, +0.00%
InvThroughput: 4862795 -> 4842951 (-0.41%); split: -0.41%, +0.01%
VClause: 85035 -> 84998 (-0.04%); split: -0.06%, +0.02%
SClause: 131008 -> 131055 (+0.04%); split: -0.02%, +0.05%
Copies: 298935 -> 298060 (-0.29%); split: -0.71%, +0.41%
PreSGPRs: 266833 -> 267292 (+0.17%); split: -0.85%, +1.03%
PreVGPRs: 249511 -> 249601 (+0.04%)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9562
cc: mesa-stable
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26821 >
2024-01-07 22:14:36 +00:00
Yonggang Luo
aa8ea0f1b9
glsl: Fixes glcpp/tests with mingw/gcc
...
glcpp mingw failing in the following way:
```
49/56 mesa:compiler+glcpp / glcpp test (unix) FAIL 3.39s exit status 1
50/56 mesa:compiler+glcpp / glcpp test (oldmac) FAIL 3.41s exit status 1
51/56 mesa:compiler+glcpp / glcpp test (bizarro) FAIL 3.42s exit status 1
52/56 mesa:compiler+glcpp / glcpp test (windows) FAIL 3.45s exit status 1
```
The test failed because on mingw, the stderr will comes after stdout,
but all the expect files, the stderr is coming first,
so we flush(stderr) first to makesure stderr out before stdout
The failing example:
039-func-arg-obj-macro-with-comma: FAIL
---
+++
@@ -1,3 +1,5 @@
+0:12(21): preprocessor error: Error: macro foo invoked with 2 arguments (expected 1)
+
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26778 >
2024-01-05 21:15:58 +00:00
Rhys Perry
ae54cbeb3f
nir: remove sad_u8x4
...
All uses of this can be replaced with msad_4x8.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26907 >
2024-01-05 18:55:22 +00:00
Rhys Perry
e86ab8173b
nir/algebraic: optimize vkd3d-proton's MSAD
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26907 >
2024-01-05 18:55:22 +00:00
Rhys Perry
0477421f7d
nir: add msad_4x8
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26907 >
2024-01-05 18:55:22 +00:00
Yonggang Luo
b389bccccd
util,compiler: Avoid use align as variable, replace it with other names
...
align is a function and when we want use it, the align variable will shadow it
So replace it with other names
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26885 >
2024-01-05 02:42:05 +00:00
Alyssa Rosenzweig
d32daa3fb2
nir/validate: allow bias on nir_texop_lod
...
AGX seems to support it, and it's very convenient for implementing sampler LOD
bias together with a clamped LOD query.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26861 >
2024-01-04 01:51:07 +00:00
Daniel Schürmann
bf43af984a
nir/opt_loop_cf: generalize removal of "trivial" continues
...
So that is also handles break statements and works in
arbitrarily nested control flow.
Totals from 905 (1.18% of 76636) affected shaders: (RADV, GFX11)
Instrs: 605164 -> 605548 (+0.06%); split: -0.01%, +0.08%
CodeSize: 3162036 -> 3163472 (+0.05%); split: -0.01%, +0.06%
Latency: 2045559 -> 1387622 (-32.16%)
InvThroughput: 352344 -> 231676 (-34.25%)
SClause: 16092 -> 16088 (-0.02%); split: -0.04%, +0.02%
Copies: 41286 -> 41297 (+0.03%); split: -0.02%, +0.05%
Branches: 19949 -> 19929 (-0.10%)
PreSGPRs: 33413 -> 33385 (-0.08%)
PreVGPRs: 19177 -> 19135 (-0.22%)
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24940 >
2024-01-03 20:48:05 +00:00
Daniel Schürmann
bdbf873b0f
nir: remove redundant passes from nir_opt_if()
...
These are now covered by nir_opt_loop():
- opt_if_loop_last_continue()
- opt_merge_breaks()
- opt_if_loop_terminator()
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24940 >
2024-01-03 20:48:05 +00:00
Daniel Schürmann
5b1b5cd794
nir: remove nir_opt_trivial_continues()
...
This pass is superseded by nir_opt_loop()
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24940 >
2024-01-03 20:48:04 +00:00
Daniel Schürmann
a3ed36da1a
treewide: replace calls to nir_opt_trivial_continues() with nir_opt_loop()
...
Totals from 850 (1.11% of 76636) affected shaders: (RADV, GFX11)
MaxWaves: 18134 -> 18130 (-0.02%)
Instrs: 3011298 -> 3008585 (-0.09%); split: -0.17%, +0.08%
CodeSize: 15836804 -> 15841972 (+0.03%); split: -0.09%, +0.12%
VGPRs: 63580 -> 63604 (+0.04%)
SpillSGPRs: 966 -> 1148 (+18.84%); split: -0.83%, +19.67%
Latency: 36102291 -> 30186144 (-16.39%); split: -16.41%, +0.02%
InvThroughput: 9058100 -> 7011821 (-22.59%); split: -22.61%, +0.02%
VClause: 65369 -> 65364 (-0.01%); split: -0.03%, +0.02%
SClause: 100309 -> 100305 (-0.00%); split: -0.04%, +0.04%
Copies: 335658 -> 336472 (+0.24%); split: -0.70%, +0.94%
Branches: 110806 -> 108945 (-1.68%); split: -1.94%, +0.26%
PreSGPRs: 73476 -> 73934 (+0.62%); split: -0.25%, +0.87%
PreVGPRs: 58809 -> 58840 (+0.05%); split: -0.01%, +0.06%
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24940 >
2024-01-03 20:48:04 +00:00
Daniel Schürmann
9808ef0349
nir/opt_loop: move loop control-flow optimizations into separate pass
...
This new pass aims to simplify loop control-flow by reducing the number
of break and continue statements. It also supersedes nir_opt_trivial_continues().
For this purpose, it implements 3 optimizations:
- opt_loop_terminator(), as previously
- opt_loop_merge_break_continue(), similar to opt_merge_breaks() incl. continues
- opt_loop_last_block(), a generalization of opt_if_loop_last_continue()
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24940 >
2024-01-03 20:48:04 +00:00
Christian Gmeiner
0158075b22
nir/opt_peephole_select: handle speculative ubo loads
...
Some platforms may be able to speculate ubo loads safely.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8299 >
2024-01-03 20:02:25 +00:00
Karol Herbst
3ee6339206
clc: remove code supporting pre llvm-10
...
we require llvm-10+ already anyway, see meson.build:1726
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26871 >
2024-01-03 18:30:32 +00:00
Yonggang Luo
18abdb8596
compiler/glsl: Move glsl specific _mesa_glsl_initialize_types out and glsl_symbol_table of glsl_types.h
...
To make sure C-ABI compat,
struct _mesa_glsl_parse_state;
struct gl_shader_program;
struct gl_builtin_uniform_desc;
are wrapped with extern "C"
And getting _mesa_glsl_initialize_variables c-compat for consistence
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26804 >
2024-01-03 06:38:19 +00:00
Caio Oliveira
0b5abf2512
spirv: Use value_id_bound to set initial memory allocated
...
Don't rely on the current default (which is 2048 bytes) buffer size for
blocks -- which ends up being too small for most shaders. Since we
already rely on value_id_bound to allocate an array of vtn_value, use
that to estimate a better value.
In addition to space for the array, we approximate the extra size of
extra data structures with the size of vtn_ssa_value, and skip it to the
next size (double it) to cover the CFG related allocations. This
results in only single system allocation necessary to back the temporary
data for the majority of the shaders.
Parsing code was slightly reordered so we can validate and read the
value_id_bound before the temporary allocator is created.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25279 >
2024-01-02 16:07:06 +00:00
Caio Oliveira
d5b4b7356e
spirv: Use linear_alloc for parsing-only data
...
All the vtn_* structures and arrays are used only during the lifetime of
spirv_to_nir(); we don't need to free them individually nor steal
them out; and some of them are smaller than the 5-pointer header
required for ralloc allocations.
These properties make them a good candidate for using an
arena-style allocation.
Change the code to create a linear_parent and use that for all the vtn_*
allocation. Note that NIR data structures still go through ralloc,
since we steal them (through the nir_shader) at the end, i.e. they
outlive the parsing.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25279 >
2024-01-02 16:07:06 +00:00
Konstantin Seurer
b88ac6b381
nir: Optimize fpow with small constant exponents
...
They would be turned into exp(log(a)*b) instead, which is slow.
Totals from 2146 (2.52% of 85071) affected shaders:
MaxWaves: 35769 -> 35779 (+0.03%); split: +0.03%, -0.01%
Instrs: 6476835 -> 6465494 (-0.18%); split: -0.18%, +0.00%
CodeSize: 35382288 -> 35347092 (-0.10%); split: -0.10%, +0.00%
SpillSGPRs: 1055 -> 1017 (-3.60%)
Latency: 75211743 -> 75063623 (-0.20%); split: -0.20%, +0.00%
InvThroughput: 17525115 -> 17501745 (-0.13%); split: -0.14%, +0.00%
VClause: 200089 -> 200077 (-0.01%); split: -0.01%, +0.01%
SClause: 293566 -> 293480 (-0.03%); split: -0.03%, +0.00%
Copies: 649631 -> 640516 (-1.40%); split: -1.44%, +0.03%
Branches: 268441 -> 268325 (-0.04%)
PreSGPRs: 146868 -> 146045 (-0.56%)
PreVGPRs: 134125 -> 134128 (+0.00%); split: -0.00%, +0.01%
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26727 >
2024-01-02 11:16:14 +01:00
Rhys Perry
10e0518a85
nir/loop_analyze: remove invariance analysis
...
compute_invariance_information() wasn't doing anything. The only variables
not skipped in the list are phis (which are never considered invariant)
and ALU instructions which use the phi as one of it's sources.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23726 >
2024-01-01 14:15:39 +00:00
Yonggang Luo
0210b554d6
treewide: Replace the include of nir_types.h with glsl_types.h
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26753 >
2023-12-30 15:08:11 +00:00
Ian Romanick
6b14da33ad
intel/fs: nir: Add nir_intrinsic_dpas_intel
...
v2: Fix parameter order in nir_intrinsic_dpas_intel to DPAS conversion.
v3: Fix float16 destination DPAS on DG2.
v4: Use nir_component_mask(...) instead of 0xffff. Suggested by Caio.
v5: Rebase on !26323 .
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25994 >
2023-12-29 20:28:43 -08:00
Caio Oliveira
6fccacda1e
compiler/types: Use a typedef for glsl_type
...
Most of the code now will see `const glsl_type *` instead of
`const struct glsl_type *`.
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26708 >
2023-12-22 07:53:25 -08:00
Caio Oliveira
550fdc2026
compiler/types: Remove glsl_type C++ helpers
...
All code now use the C functions. Remove glsl_type_impl.h that
contained the inline C++ wrappers around those.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26707 >
2023-12-22 06:51:01 -08:00
Caio Oliveira
d06f0305f6
glsl: Use glsl_type C helpers
...
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26707 >
2023-12-22 06:51:01 -08:00
Caio Oliveira
db5f73dc9f
compiler/types: Add a few more glsl_type C helpers
...
These will be used once the C++ ones are removed.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26707 >
2023-12-22 06:44:23 -08:00
Caio Oliveira
582c20c431
nir: Use glsl_type C helpers
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26707 >
2023-12-22 06:44:23 -08:00
Karol Herbst
f8afd41667
clc: add workaround for clang always defining __IMAGE_SUPPORT_ and __opencl_c_int64
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26764 >
2023-12-20 11:31:30 +00:00
Bas Nieuwenhuizen
da6a5e1f63
nir: Add pass for clearing memory at the end of a shader.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26679 >
2023-12-20 09:15:45 +00:00
Bas Nieuwenhuizen
bc99b73d70
nir: Add nir_static_workgroup_size helper.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26679 >
2023-12-20 09:15:45 +00:00
Faith Ekstrand
3e042173e4
nir/lower_doubles: Add lowering for fmin/fmax/fsat
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26587 >
2023-12-20 02:40:25 +00:00