Commit Graph

191603 Commits

Author SHA1 Message Date
Zan Dobersek
a9b781fa54 tu: use either the 16-bit or 32-bit descriptor
Until now, if the 16-bit storage functionality is supported by the
hardware, two separate descriptors were set up, with isam loads and stores
piping through the descriptor of the corresponding size and other storage
access using the 16-bit descriptor.

These changes keep separate descriptors on a650, but leverage post-a650
isam.v functionality that enables use of 16-bit descriptors for 32-bit
loads, removing the need for the separate 32-bit descriptor.

Storage buffer descriptors are set up according to 16-bit storage support
and the indicated isam.v support, using those descriptors for 32-bit isam
loads as well if the latter is present.

Dynamic offset application in tu_CmdBindDescriptorSets is modified to
determine the offset shift value based on the descriptor's format and not
on the descriptor's position in the layout binding.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28254>
2024-07-03 08:31:39 +00:00
Iago Toral Quiroga
1d418a3419 broadcom/compiler: add missing signal compatibilities for V3D 7.x
total instructions in shared programs: 11281777 -> 11246706 (-0.31%)
instructions in affected programs: 2230213 -> 2195142 (-1.57%)
helped: 11830
HURT: 487
Instructions are helped.

total max-temps in shared programs: 2226424 -> 2225398 (-0.05%)
max-temps in affected programs: 16833 -> 15807 (-6.10%)
helped: 722
HURT: 23
Max-temps are helped.

total sfu-stalls in shared programs: 14894 -> 14977 (0.56%)
sfu-stalls in affected programs: 138 -> 221 (60.14%)
helped: 30
HURT: 112
Inconclusive result (%-change mean confidence interval includes 0).

total inst-and-stalls in shared programs: 11296671 -> 11261683 (-0.31%)
inst-and-stalls in affected programs: 2230218 -> 2195230 (-1.57%)
helped: 11796
HURT: 495
Inst-and-stalls are helped.

total nops in shared programs: 270280 -> 270622 (0.13%)
nops in affected programs: 6492 -> 6834 (5.27%)
helped: 145
HURT: 349
Nops are HURT.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29995>
2024-07-03 08:05:37 +02:00
Caio Oliveira
260a5fc7b3 intel/brw: Move brw_reg helpers into brw_reg.h
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:19 +00:00
Caio Oliveira
71ccf8e4cd intel/brw: Rename fs_reg_* helpers to brw_reg_*
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:19 +00:00
Caio Oliveira
3670c24740 intel/brw: Replace uses of fs_reg with brw_reg
And remove the fs_reg alias.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:19 +00:00
Caio Oliveira
fe46efa647 intel/brw: Make fs_reg an alias of brw_reg
And rename the brw_reg_from_fs_reg() function to something more
appropriate.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:19 +00:00
Caio Oliveira
69f4ed3102 intel/brw: Rename brw_reg() helper to brw_make_reg()
To avoid conflict with the name of the type later on.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:18 +00:00
Caio Oliveira
6b2405e1f5 intel/brw: Remove duplicated functions between fs_reg/brw_reg
Update the brw_reg ones and use them.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:18 +00:00
Caio Oliveira
d00329e821 intel/brw: Replace some fs_reg constructors with functions
Create three helper functions for ATTR, UNIFORM and VGRF creation.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:18 +00:00
Caio Oliveira
06fbab3a74 intel/brw: Remove conversion from fs_reg to brw_reg
They are effectively the same now.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:18 +00:00
Caio Oliveira
e4f37c6ab9 intel/brw: Move most member functions from fs_reg to brw_reg
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:18 +00:00
Caio Oliveira
ca1afe2726 intel/brw: Use public inheritance for fs_reg/brw_reg
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:18 +00:00
Caio Oliveira
f54dfbf4fe intel/brw: Move fs_reg data members up to brw_reg
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:18 +00:00
Caio Oliveira
2ce6dcf043 intel/brw: Remove unused variable from test
This would cause warning (and error in GitLab CI) after later changes to
fs_reg/brw_reg.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:18 +00:00
Caio Oliveira
0d9f58db04 intel/brw: Remove RALLOC helper from fs_reg
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:18 +00:00
Caio Oliveira
def70c1673 intel/brw: Remove unused brw_reg related functions
Most of these were used by the vec4 backend that was removed from brw.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
2024-07-03 02:53:18 +00:00
Qiang Yu
8e146512d1 glsl: fix indirect tess factor access for compact_arrays=false drivers
Driver with compact_arrays=false (i.e. radeonsi) is broken when
tess factor is accessed indirectly, for example:
  gl_TessLevelOuter[gl_InvocationID] = xxx;

This fix use nir_vectorize_tess_levels to lower array tess factor
access into direct vector access before nir_lower_io() like clip
and cull distance way.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29799>
2024-07-03 02:06:56 +00:00
Qiang Yu
a071929f8d nir: consider more deref types when fixup deref
Fix ANV and virpipe CI test fail when nir_fixup_deref_types
is used in nir_vectorize_tess_levels by later commits.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29799>
2024-07-03 02:06:56 +00:00
Qiang Yu
f9ed3158b4 nir: nir_vectorize_tess_levels support indirect access
Replace the implementation with nir_lower_array_deref_of_vec.

This will be used by compact_array=false drivers to lower indirect
tess levels array access to direct vector access too.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29799>
2024-07-03 02:06:56 +00:00
Qiang Yu
3151f5ec47 nir: add filter parameter to nir_lower_array_deref_of_vec
To be used by latter commits to limit the lowering to specific
variables.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29799>
2024-07-03 02:06:56 +00:00
Timothy Arceri
370ed7b021 glsl: make warning tests pass linking
The standalone compiler previously ran these tests through a hacked up
partial linker. When this partial linker was recently removed from the
standalone compiler the --link option was turned on because some tests
are testing linking not just compilation. However in a future patchset
we will switch the standalone linker to use the nir linking code and
when this is done all of these shaders will need to pass full linking,
so here we update them to do so.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29991>
2024-07-03 01:20:02 +00:00
Timothy Arceri
a71ce0a6d6 glsl: drop glsl ir optimisation from the standalone compiler
There are no more users of the glsl ir at this point in the standalone compiler
anymore for these optimisations. Later patches will also switch the
standalone compiler to the nir linker.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29991>
2024-07-03 01:20:02 +00:00
Timothy Arceri
063d62f142 glsl: move call to create explicit ifc layout out of glsl_to_nir
We move this later so that we can call glsl_to_nir() on glsl ir that
has not set the array size on unsized ifc members. Later patches will
move sizing of the arrays out of glsl ir and into the nir linker.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29991>
2024-07-03 01:20:02 +00:00
Jianxun Zhang
870be63c7e anv: Disable tracking of clear color on color attachment
Xe2+ platforms don't need it because of its new fast-clear
and compression design.

Fixes: Vulkan CTS
dEQP-VK.pipeline.pipeline_library.multisample.
sample_locations_ext.draw.depth.samples_4.
separate_subpass_clear_attachments

src/intel/vulkan/anv_private.h:5439:
anv_image_get_fast_clear_type_addr: Assertion
`device->info->ver < 20' failed.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29966>
2024-07-03 00:55:13 +00:00
Jianxun Zhang
bd05ef9d91 anv: Support arbitrary fast-clear value on all layouts (xe2)
Xe2+ platforms don't use fast-type buffer for its new design.
We don't have to track different fast-clear types, so we just
return the highest level of support.

Fixes: Vulkan CTS
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image
_one_region.8_bit_not_all_remaining_layers

src/intel/vulkan/anv_private.h:5439: anv_image_get_fast_clear_type_addr:
Assertion `device->info->ver < 20' failed.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29966>
2024-07-03 00:55:13 +00:00
Jianxun Zhang
4034539c00 anv: Fix Vulkan CTS failure related to MCS (xe2)
Fixes: Vulkan CTS
dEQP-VK.pipeline.monolithic.multisample.sampled_image.79x31_1.r32_uint.samples_2

src/intel/vulkan/anv_private.h:5439: anv_image_get_fast_clear_type_addr: Assertion
`device->info->ver < 20' failed.

deqp-vk: ../src/intel/vulkan/genX_cmd_buffer.c:1263: transition_color_buffer:
Assertion `must_init_fast_clear_state' failed.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29966>
2024-07-03 00:55:13 +00:00
Jianxun Zhang
beb0ea2469 anv: Disable tracking fast clear and aux state (xe2)
Xe2+ doesn't use aux tracking buffers, and we should not
have access to the fast-clear type and compression state.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29966>
2024-07-03 00:55:13 +00:00
Christian Gmeiner
01ea13cb6d etnaviv: isa: Extend disasm test
With libetnaviv_parser we are able to parse the resulting string
representation into an etna_inst and assemble that to binary.

As we are not able to parse and/or assemble we need to mark some test
cases with special flags.

This allows us to test: bin -> disasm -> parsing -> assemble

If isa_parse_str(..) is not available we skip this part of the unit
test.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:55 +00:00
Christian Gmeiner
858d42bee9 etnaviv: isa: Add cli assembler
Nothing too fancy.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:55 +00:00
Christian Gmeiner
6db922c0bf etnaviv: isa: Add C function impl
Implement the following C API's:
 - isa_parse_str(..)
 - isa_parse_file(..)
 - isa_asm_result_destroy(..)

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:55 +00:00
Christian Gmeiner
d9bcaa1478 etnaviv: isa: Add parser module
This commit adds the actual parser, which makes use of the IsaParser
derive proc macro.

It provides two public functions:
 - asm_process_str(..)
   Parse the provided isa representation and return an etna_asm_result.
   This will be used by our unit tests.

 - asm_process_file(..)
   Parse a whole file full of isa and return an etna_asm_result. This
   will be used by our cli assembler.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:54 +00:00
Christian Gmeiner
db5e733e1b etnaviv: isa: Add EtnaAsmResultExt trait
The impl of this trait provides some helpers to work with struct
etna_asm_result in Rust.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:54 +00:00
Christian Gmeiner
0f93393cd6 etnaviv: isa: Make etna_asm_result usable in Rust
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:54 +00:00
Christian Gmeiner
2ad2d86e49 etnaviv: isa: Add struct etna_asm_result
This struct contains the result of an assembler run and will be filled
in Rust and consumed via a C API.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:54 +00:00
Christian Gmeiner
863023ceda etnaviv: isa: Add IsaParser proc_macro_derive
This proc derive macro does the following magic:
 - read static rules file
 - parse isaspec xml file
 - generate valid pest PEG grammar and attaches it as grammar_inline to
   the ast
 - calls pest_generator::derive_parser(..) to generate the parser
 - creates FromPestRule trait
 - creates FromPestRule impl for enums and opcodes

This is the fundation of our assembler.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:54 +00:00
Christian Gmeiner
575814af14 etnaviv: isa: Add meson version check
meson had an issue [1] with proc_macro that got fixed in 1.4.0 and newer.

[1] https://github.com/mesonbuild/meson/issues/12758

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:54 +00:00
Christian Gmeiner
0ce255a9f6 etnaviv: isa: Make header C++ safe
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:54 +00:00
Christian Gmeiner
15a784689e etnaviv: isa: Generate Rust FFI bindings for asm.h
We will work with etna_inst_* structs in Rust.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:54 +00:00
Christian Gmeiner
59406a9d85 etnaviv: isa: Add meta elements to instructions
This commits adds a meta elements with the following attributes:
- has_dest: does the instruction has a dest register?

- valid_srcs: which sources need to be valid?
  Is used to generate PEST grammar and defines which of the three source
  registers needs to be != void.

- type: which <template> shall be used?
  Must match a known template name by the last part.
  E.g.: <meta type=tex"/> --> <template name="INSTR_TEX">

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:54 +00:00
Christian Gmeiner
9e3e12e6a9 meson: Add indexmap rust dependencies
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: @LingMan
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:54 +00:00
Christian Gmeiner
02bc51f477 meson: Add roxmltree rust dependency
Will be used for a simple isaspec implementation in rust.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: @LingMan
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:54 +00:00
Christian Gmeiner
e28ff81869 meson: Add pest rust dependencies
Including its dependency ucd-trie.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: @LingMan
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03 00:07:54 +00:00
Mauro Rossi
87ad3ca0ac intel/common: fix building error in intel_common.c
Fixes the following building error:

../out_src/src/intel/common/intel_common.c:29:4: error: implicit declaration of function 'free' is invalid in C99 [-Werror,-Wimplicit-function-declarat
ion]
   free(engine_info);
   ^
1 error generated.

Fixes: 5b8b4f78 ("intel/dev: Add engine_class_supported_count to intel_device_info")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29975>
2024-07-02 23:35:26 +00:00
Jesse Natalie
74ba5cf885 blake3: fix Windows ARM64 build and detect ARM64EC as ARM64
Cherry-picked upstream 0816badf3ada3ec48e712dd4f4cbc2cd60828278

Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29971>
2024-07-02 22:17:17 +00:00
Christian Gmeiner
3f91f2cf31 meson: Update syn subproject
Fixes the following build error for fedora-release.

Error: method `inner` is never used
   --> ../subprojects/syn-2.0.39/src/attr.rs:589:8
    |
585 | pub(crate) trait FilterAttrs<'a> {
    |                  ----------- method in this trait
...
589 |     fn inner(self) -> Self::Ret;
    |        ^^^^^
    |
    = note: `-D dead-code` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(dead_code)]`
error: aborting due to 1 previous error

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29996>
2024-07-02 21:36:14 +00:00
Eric Engestrom
ab0956eec9 lavapipe/ci: skip timing out test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30002>
2024-07-02 21:20:47 +00:00
Mike Blumenkrantz
3d2d4f76d5 lavapipe: maint7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29963>
2024-07-02 21:06:13 +00:00
Iván Briano
9a68be59ca anv: enable VK_KHR_maintenance7
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29968>
2024-07-02 20:24:43 +00:00
Iván Briano
53f196b8e0 vulkan/properties: handle LayeredApiPropertiesListKHR
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29968>
2024-07-02 20:24:43 +00:00
Samuel Pitoiset
384392d729 vulkan: Update XML and headers to 1.3.289
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29968>
2024-07-02 20:24:43 +00:00