nak: Move nak_compiler to nak_private.h

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
Faith Ekstrand 2023-01-30 20:53:19 -06:00 committed by Marge Bot
parent 2bf9cafbe7
commit 5a86cf2b80
5 changed files with 29 additions and 9 deletions

View file

@ -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);

View file

@ -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 });

View file

@ -3,6 +3,4 @@
* SPDX-License-Identifier: MIT
*/
#include "nak.h"
#include "nir.h"
#include "nv_device_info.h"
#include "nak_private.h"

View file

@ -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, ...) ({ \

View 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 */