nak: Move the QMD code back into the main nak crate

I only ever pulled it out because I also pulled out the test runner.
Now that the test runner lives inside NAK, this can, too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25167>
This commit is contained in:
Faith Ekstrand
2024-07-29 10:09:32 -05:00
committed by Marge Bot
parent 241e1861da
commit 217c0a489b
3 changed files with 10 additions and 25 deletions

View File

@@ -158,22 +158,6 @@ _libnak_ir_proc_rs = rust.proc_macro(
dependencies : [dep_syn],
)
_libnak_qmd_rs = static_library(
'nak_qmd_rs',
files('nak_qmd/lib.rs'),
gnu_symbol_visibility : 'hidden',
rust_abi : 'c',
rust_args : nak_rust_args,
dependencies : [
dep_paste,
idep_nvidia_headers_rs,
],
link_with: [
_libbitview_rs,
_libnak_bindings_rs,
],
)
_libnak_rs = static_library(
'nak_rs',
files('nak/lib.rs'),
@@ -184,11 +168,14 @@ _libnak_rs = static_library(
# Otherwise, rustc trips up on -pthread
'-Clink-arg=-Wno-unused-command-line-argument',
],
link_with: [
dependencies : [
dep_paste,
idep_nvidia_headers_rs,
],
link_with : [
_libbitview_rs,
_libnak_bindings_rs,
_libnak_ir_proc_rs,
_libnak_qmd_rs,
],
)
@@ -209,7 +196,6 @@ if with_tests and get_option('b_sanitize') == 'none'
idep_nouveau_ws,
idep_compiler.partial_dependency(link_args : true, links : true),
idep_mesautil.partial_dependency(link_args : true, links : true),
idep_nvidia_headers_rs,
idep_nv_push_rs,
],
link_with: [

View File

@@ -24,6 +24,7 @@ mod opt_lop;
mod opt_out;
mod opt_prmt;
mod opt_uniform_instrs;
mod qmd;
mod repair_ssa;
mod sm50;
mod sm70;

View File

@@ -1,9 +1,7 @@
// Copyright © 2024 Collabora, Ltd.
// SPDX-License-Identifier: MIT
extern crate bitview;
extern crate nvidia_headers;
extern crate paste;
use nak_bindings::*;
use nvidia_headers::classes::{cla0c0, clc0c0, clc3c0, clc6c0};
@@ -163,7 +161,7 @@ macro_rules! qmd_impl_set_register_count {
}
mod qmd_0_6 {
use crate::*;
use crate::qmd::*;
use nvidia_headers::classes::cla0c0::qmd as cla0c0;
#[repr(transparent)]
@@ -208,7 +206,7 @@ mod qmd_0_6 {
use qmd_0_6::Qmd0_6;
mod qmd_2_1 {
use crate::*;
use crate::qmd::*;
use nvidia_headers::classes::clc0c0::qmd as clc0c0;
#[repr(transparent)]
@@ -276,7 +274,7 @@ macro_rules! qmd_impl_set_smem_size_bounded {
}
mod qmd_2_2 {
use crate::*;
use crate::qmd::*;
use nvidia_headers::classes::clc3c0::qmd as clc3c0;
#[repr(transparent)]
@@ -304,7 +302,7 @@ mod qmd_2_2 {
use qmd_2_2::Qmd2_2;
mod qmd_3_0 {
use crate::*;
use crate::qmd::*;
use nvidia_headers::classes::clc6c0::qmd as clc6c0;
#[repr(transparent)]