List calls written down and translated by threads of ours (VICTORY_THIN=1, off)

The title's 45,000 to 60,000 list calls a frame append their arguments to a
stream; threads of ours translate it, several lists at a time, and the line of
submissions goes on with a submission when its recordings are translated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-25 11:05:14 -06:00
1 parent bc83b16387
commit 4fa965582f
4 files changed
+1096 -22

No files matched your search

+38 -6
View File
@@ -18,6 +18,9 @@ use crate::object::{
use crate::queue::Written;
use crate::resource::PAGEABLE_IIDS;
#[cfg(windows)]
pub(crate) mod thin;
const ALLOCATOR_IIDS: [Iid; 4] = [
guid(
0x6102dee4,
@@ -127,6 +130,10 @@ struct List {
/// at them before it runs `host`.
#[cfg(windows)]
gate: Vec<ValueWait>,
/// With `VICTORY_THIN=1`, of a list the title has: what it wrote down
/// ([`thin`]; then there is no `host`).
#[cfg(windows)]
thin: thin::Front,
}
/// One part of a title list cut at its waits: the waits the queue stands
@@ -560,11 +567,29 @@ fn new_list(
return E_INVALIDARG;
}
tracing::debug!(kind, "command list");
#[cfg(windows)]
if thin::on() {
let mut list = boxed(kind, pipeline, true);
list.thin.begin(kind, pipeline);
return object::hand_out(LIST, list, iid, &LIST_IIDS, out);
}
object::hand_out(LIST, boxed(kind, pipeline, false), iid, &LIST_IIDS, out)
}
/// A list; with `thin` one whose calls are written down (it has no host list).
fn boxed(kind: u32, pipeline: This, thin: bool) -> Box<List> {
#[cfg(not(windows))]
let _ = thin;
let list = Box::new(List {
object: if crate::device::newer() {
Object::new(&NEWER_LIST_FUNCTIONS)
} else {
Object::new(&LIST_FUNCTIONS)
object: match (crate::device::newer(), thin) {
(true, false) => Object::new(&NEWER_LIST_FUNCTIONS),
(false, false) => Object::new(&LIST_FUNCTIONS),
#[cfg(windows)]
(true, true) => Object::new(&NEWER_THIN_FUNCTIONS),
#[cfg(windows)]
(false, true) => Object::new(&THIN_FUNCTIONS),
#[cfg(not(windows))]
_ => Object::new(&LIST_FUNCTIONS),
},
kind,
put: [0; 5],
@@ -575,7 +600,7 @@ fn new_list(
newer: [0; 256],
uploads: Default::default(),
#[cfg(windows)]
host: crate::host::host().and_then(|h| match h.new_list() {
host: crate::host::host().filter(|_| !thin).and_then(|h| match h.new_list() {
Ok(list) => Some(list),
Err(e) => {
tracing::warn!(error = %e, "no host command list");
@@ -592,10 +617,12 @@ fn new_list(
earlier: Vec::new(),
#[cfg(windows)]
gate: Vec::new(),
#[cfg(windows)]
thin: Default::default(),
});
#[cfg(not(windows))]
let _ = pipeline;
object::hand_out(LIST, list, iid, &LIST_IIDS, out)
list
}
extern "system" fn allocator_query(this: This, iid: *const Iid, out: *mut This) -> HRESULT {
@@ -2339,6 +2366,11 @@ const fn list_table(newer: bool) -> [*const (); 160] {
/// titles add.
static LIST_FUNCTIONS: Table<160> = Table(list_table(false));
static NEWER_LIST_FUNCTIONS: Table<160> = Table(list_table(true));
/// Of lists whose calls are written down.
#[cfg(windows)]
static THIN_FUNCTIONS: Table<160> = Table(thin::table(false));
#[cfg(windows)]
static NEWER_THIN_FUNCTIONS: Table<160> = Table(thin::table(true));
#[cfg(test)]
mod tests {