mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
nak: Move nak_compiler to nak_private.h
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
parent
2bf9cafbe7
commit
5a86cf2b80
5 changed files with 29 additions and 9 deletions
|
|
@ -14,14 +14,11 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct nak_compiler;
|
||||
struct nir_shader_compiler_options;
|
||||
typedef struct nir_shader nir_shader;
|
||||
struct nv_device_info;
|
||||
|
||||
struct nak_compiler {
|
||||
uint8_t sm;
|
||||
};
|
||||
|
||||
struct nak_compiler *nak_compiler_create(const struct nv_device_info *dev);
|
||||
void nak_compiler_destroy(struct nak_compiler *nak);
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ use util::NextMultipleOf;
|
|||
pub extern "C" fn nak_compiler_create(
|
||||
dev: *const nv_device_info,
|
||||
) -> *mut nak_compiler {
|
||||
assert!(!dev.is_null());
|
||||
let dev = unsafe { &*dev };
|
||||
|
||||
let nak = Box::new(nak_compiler { sm: dev.sm });
|
||||
|
|
|
|||
|
|
@ -3,6 +3,4 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "nak.h"
|
||||
#include "nir.h"
|
||||
#include "nv_device_info.h"
|
||||
#include "nak_private.h"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "nak.h"
|
||||
#include "nir.h"
|
||||
#include "nak_private.h"
|
||||
#include "nir_builder.h"
|
||||
|
||||
#define OPT(nir, pass, ...) ({ \
|
||||
|
|
|
|||
25
src/nouveau/compiler/nak_private.h
Normal file
25
src/nouveau/compiler/nak_private.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright © 2022 Collabora, Ltd.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#ifndef NAK_PRIVATE_H
|
||||
#define NAK_PRIVATE_H
|
||||
|
||||
#include "nak.h"
|
||||
#include "nir.h"
|
||||
#include "nv_device_info.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct nak_compiler {
|
||||
uint8_t sm;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* NAK_PRIVATE */
|
||||
Loading…
Add table
Reference in a new issue