mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
nouveau: Add initial headers and meson for the new compoiler
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
parent
9ef621ec2e
commit
40f9327c8a
3 changed files with 75 additions and 1 deletions
|
|
@ -0,0 +1,22 @@
|
|||
libnak_c_files = files(
|
||||
'nak.h',
|
||||
)
|
||||
|
||||
libnak_deps = [
|
||||
idep_mesautil,
|
||||
idep_nir_headers,
|
||||
]
|
||||
|
||||
_libnak = static_library(
|
||||
'nak',
|
||||
libnak_c_files,
|
||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium],
|
||||
dependencies : libnak_deps,
|
||||
c_args : [no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
)
|
||||
|
||||
idep_nak = declare_dependency(
|
||||
include_directories : include_directories('.'),
|
||||
link_with : _libnak,
|
||||
)
|
||||
50
src/nouveau/compiler/nak.h
Normal file
50
src/nouveau/compiler/nak.h
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright © 2022 Collabora, Ltd.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#ifndef NAK_H
|
||||
#define NAK_H
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct nir_shader_compiler_options;
|
||||
typedef struct nir_shader nir_shader;
|
||||
|
||||
struct nak_compiler {
|
||||
};
|
||||
|
||||
void nak_optimize_nir(nir_shader *nir, const struct nak_compiler *nak);
|
||||
void nak_preprocess_nir(nir_shader *nir, const struct nak_compiler *nak);
|
||||
void nak_postprocess_nir(nir_shader *nir, const struct nak_compiler *nak);
|
||||
|
||||
struct nak_shader_info {
|
||||
/** Number of GPRs used */
|
||||
uint8_t num_gprs;
|
||||
|
||||
/** Size of thread-local storage */
|
||||
uint32_t tls_size;
|
||||
|
||||
struct {
|
||||
/* Local workgroup size */
|
||||
uint16_t local_size[3];
|
||||
|
||||
/* Shared memory size */
|
||||
uint16_t smem_size;
|
||||
} cs;
|
||||
|
||||
/** Shader header for 3D stages */
|
||||
uint32_t hdr[32];
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* NAK_H */
|
||||
|
|
@ -19,7 +19,9 @@
|
|||
# SOFTWARE.
|
||||
|
||||
subdir('nvidia-headers')
|
||||
subdir('compiler')
|
||||
if with_nouveau_vk
|
||||
subdir('compiler')
|
||||
endif
|
||||
subdir('winsys')
|
||||
if with_tools.contains('drm-shim')
|
||||
subdir('drm-shim')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue