mesa/src/intel/executor/meson.build
Caio Oliveira e72bf2d02f intel: Add executor tool
Add a tool that programs the hardware the minimum amount to be
able to execute compute shaders and then executes a script that
can perform data manipulation and dispatch execution of the shaders
(written in Xe assembly).

The goal is to have a tool to experiment directly with certain
assembly instructions and the shared units without having to
instrument the drivers.

To make more convenient to write assembly, a few macros (indicated by
the @-symbol) will be processed into the full instruction.

For example, the script

```
  local r = execute {
    data={ [42] = 0x100 },
    src=[[
      @mov     g1      42
      @read    g2      g1

      @id      g3

      add(8)   g4<1>UD  g2<8,8,1>UD  g3<8,8,1>UD  { align1 @1 1Q };

      @write   g3       g4
      @eot
    ]]
  }

  dump(r, 4)
```

produces

```
  [0x00000000] 0x00000100 0x00000101 0x00000102 0x00000103
```

There's a help message inside the code that describes the script
environment and the macros for assembly sources.

Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30062>
2024-08-14 03:03:46 +00:00

58 lines
1.1 KiB
Meson

# Copyright © 2024 Intel Corporation
# SPDX-License-Identifier: MIT
if not dep_lua.found()
subdir_done()
endif
executor_flags = [
no_override_init_args,
sse2_args,
]
executor_includes = [
inc_include,
inc_src,
inc_intel,
]
executor_hw_libs = []
foreach v: ['90', '110', '120', '125', '200']
executor_hw_libs += static_library(
'executor_hw_ver@0@'.format(v),
['executor_genx.c', gen_xml_pack],
include_directories: [executor_includes],
c_args: [
executor_flags,
'-DGFX_VERx10=@0@'.format(v),
],
gnu_symbol_visibility: 'hidden',
dependencies: [
dep_valgrind,
idep_genxml,
],
)
endforeach
executor = executable(
'executor',
[
'executor_main.c',
'executor_macros.c',
],
dependencies: [
dep_libdrm,
dep_lua,
dep_valgrind,
idep_brw_asm,
idep_genxml,
idep_intel_decoder_brw,
idep_intel_dev,
idep_libintel_common,
],
include_directories: [executor_includes],
link_with: [executor_hw_libs],
c_args: [executor_flags],
gnu_symbol_visibility: 'hidden',
install: true
)