Run Grand Theft Auto VI from first boot into the world
The title now boots through every first-boot and menu screen at its own 30 fps, drawing with translated shaders, with input, sound, saves and loading served; it reaches the world, where the host GPU path still fails (see "Not working yet"). Loader and runtime - Crash reports unwind properly, name C++ throws and host GPU failures, carry the title's last debug lines and are appended to crashes.log. - Thread notices on our own threads, reentrant late DLL loading, exit in the console's order, relaunch on a launch-new-game request. - Offline guard: the title cannot reach the network (sockets, name lookups, WinHTTP, the media source resolver); by-name lookups and loads follow the import rules. - Every runtime area the title calls is served (networking hint, packages, store, saves, display, UI, speech stubs, user, async pool). Saves persist; an update is one rename and survives a kill at any step. - DirectStorage reads for real: shared worker pool, priorities, zlib and BCPack. BCPack is our own decoder; the format's constant tables ship in crates/victory-formats/src/bcpack-tables.bin (the asset policy's one exception, see docs/asset-policy.md). - GameInput from XInput pads and the keyboard, with a keyboard stand-in pad; console timers (1 ms) for the whole process. - Audio: XMA2 decoding on the emulated contexts, Opus on the decoder queues, the DSP interface as a stub; title memory placed below 2^40. - Console texture layouts (sizes, tiling, detiling) and the layout library's imports. GPU - Draws, mesh dispatches and compute dispatches run on the host with shaders translated at first use and cached on disk; descriptor heaps, views, root signatures, barriers and host texture states; rectangle lists; comparison samplers. - Title memory reaches the host through persistent mirrors that copy only pages written since the last copy; shader-written buffers are copied back. - Presentation with frame pacing per event kind; framerate in the window caption. Shaders - DXIL emission for vertex, pixel, compute and mesh programs from the console's native code, with a differential test suite against the PC compile. World set: mesh 8,191 of 8,506, vertex/pixel 10,617 of 12,346, compute 1,643 of 2,539; utility set complete. Build - Debugging aids (debug logs, frame capture, stack dumps, scripted keys, the host debug layer, the software adapter) exist only with the `diagnostics` feature; `[profile.diag]` keeps that build apart. Not working yet - In the world the host device is removed within seconds (descriptor handling fixes are in, unproven by a surviving run) and frames present black. - 64-bit image atomics, merged geometry stages and the BVH builder's own shaders do not translate; reverb is silent. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
bc3070991a
commit
2849477415
107 files changed
+42526
-868
No files matched your search
+354
-27
@@ -1,5 +1,5 @@
|
||||
//! Command queues. Nothing is executed yet: submitted lists are dropped and
|
||||
//! fence signals complete at once, as if the GPU were infinitely fast.
|
||||
//! Command queues. Submitted lists run on the host GPU and are waited for,
|
||||
//! so fence signals complete at once.
|
||||
#![allow(clippy::not_unsafe_ptr_arg_deref)]
|
||||
|
||||
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
|
||||
@@ -54,13 +54,50 @@ pub(crate) extern "system" fn create(
|
||||
};
|
||||
tracing::debug!(?desc, "command queue");
|
||||
let queue = Box::new(Queue {
|
||||
object: Object::new(&FUNCTIONS),
|
||||
object: if crate::device::newer() {
|
||||
Object::new(&NEWER_FUNCTIONS)
|
||||
} else {
|
||||
Object::new(&FUNCTIONS)
|
||||
},
|
||||
kind: desc.kind,
|
||||
desc,
|
||||
});
|
||||
object::hand_out(QUEUE, queue, iid, &QUEUE_IIDS, out)
|
||||
}
|
||||
|
||||
/// The console's queue description: an engine or pipe and a queue on it
|
||||
/// in place of PC's priority and node mask.
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub(crate) struct QueueDescX {
|
||||
kind: u32,
|
||||
flags: u32,
|
||||
engine_or_pipe: u32,
|
||||
queue: u32,
|
||||
}
|
||||
|
||||
/// Device method `CreateCommandQueueX`. The host picks engines itself, so
|
||||
/// the queue is created as on PC.
|
||||
pub(crate) extern "system" fn create_x(
|
||||
this: This,
|
||||
desc: *const QueueDescX,
|
||||
iid: *const Iid,
|
||||
out: *mut This,
|
||||
) -> HRESULT {
|
||||
// SAFETY: the title passes a description (null is tolerated).
|
||||
let Some(&x) = (unsafe { desc.as_ref() }) else {
|
||||
return E_INVALIDARG;
|
||||
};
|
||||
tracing::debug!(desc = ?x, "console command queue");
|
||||
let desc = QueueDesc {
|
||||
kind: x.kind,
|
||||
priority: 0,
|
||||
flags: x.flags,
|
||||
nodes: 1,
|
||||
};
|
||||
create(this, &desc, iid, out)
|
||||
}
|
||||
|
||||
extern "system" fn query(this: This, iid: *const Iid, out: *mut This) -> HRESULT {
|
||||
object::answer(
|
||||
QUEUE,
|
||||
@@ -102,6 +139,22 @@ pub(crate) struct Plane {
|
||||
count: u32,
|
||||
resources: *const This,
|
||||
}
|
||||
/// Submission tagged with the frame it belongs to `(count, lists, frame
|
||||
/// token, flags)`; frames are paced elsewhere, so it runs as a plain one.
|
||||
extern "system" fn execute_x(this: This, count: u32, lists: *const This, _token: u64, _flags: u32) {
|
||||
execute(this, count, lists);
|
||||
}
|
||||
/// Signal with sync settings for the top and bottom of the pipe; our
|
||||
/// submissions are complete when they return, so it signals at once.
|
||||
extern "system" fn signal2_x(
|
||||
this: This,
|
||||
fence: This,
|
||||
value: u64,
|
||||
_bottom: *const u8,
|
||||
_top: *const u8,
|
||||
) -> HRESULT {
|
||||
signal(this, fence, value)
|
||||
}
|
||||
/// Markers and events only matter to profilers.
|
||||
extern "system" fn marker(_: This) {}
|
||||
extern "system" fn signal(_: This, fence: This, value: u64) -> HRESULT {
|
||||
@@ -114,15 +167,71 @@ extern "system" fn signal(_: This, fence: This, value: u64) -> HRESULT {
|
||||
extern "system" fn wait(_: This, fence: This, _value: u64) -> HRESULT {
|
||||
if fence.is_null() { E_INVALIDARG } else { S_OK }
|
||||
}
|
||||
/// Ticks per second of GPU timestamps; none are written yet.
|
||||
/// Ticks per second of GPU timestamps (see [`Written::GpuTimestamp`]).
|
||||
extern "system" fn timestamp_frequency(_: This, out: *mut u64) -> HRESULT {
|
||||
if out.is_null() {
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
// SAFETY: checked non-null.
|
||||
unsafe { out.write(100_000_000) };
|
||||
unsafe { out.write(TIMESTAMP_FREQUENCY) };
|
||||
S_OK
|
||||
}
|
||||
const TIMESTAMP_FREQUENCY: u64 = 100_000_000;
|
||||
|
||||
/// What a list's bottom-of-pipe write stores when the list has run.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub(crate) enum Written {
|
||||
Value(u64),
|
||||
/// The GPU clock: [`TIMESTAMP_FREQUENCY`] ticks per second since the
|
||||
/// process started (our GPU work is done on the CPU's timeline).
|
||||
GpuTimestamp,
|
||||
/// The CPU's performance counter.
|
||||
SystemTimestamp,
|
||||
}
|
||||
|
||||
impl Written {
|
||||
/// Stores the low `bytes` (4 or 8) of the value at `at`.
|
||||
pub(crate) fn write(self, at: *mut u8, bytes: usize) {
|
||||
let value = match self {
|
||||
Written::Value(v) => v,
|
||||
Written::GpuTimestamp => {
|
||||
static START: std::sync::OnceLock<std::time::Instant> = std::sync::OnceLock::new();
|
||||
let elapsed = START.get_or_init(std::time::Instant::now).elapsed();
|
||||
(elapsed.as_nanos() / (1_000_000_000 / u128::from(TIMESTAMP_FREQUENCY))) as u64
|
||||
}
|
||||
Written::SystemTimestamp => system_timestamp(),
|
||||
};
|
||||
// SAFETY: the title names writable GPU memory (unified with ours).
|
||||
unsafe {
|
||||
if bytes == 4 {
|
||||
at.cast::<u32>().write_unaligned(value as u32);
|
||||
} else {
|
||||
at.cast::<u64>().write_unaligned(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn system_timestamp() -> u64 {
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let mut count = 0;
|
||||
// SAFETY: a valid out pointer.
|
||||
unsafe { windows_sys::Win32::System::Performance::QueryPerformanceCounter(&mut count) };
|
||||
count as u64
|
||||
}
|
||||
#[cfg(not(windows))]
|
||||
0
|
||||
}
|
||||
|
||||
/// Frames presented so far.
|
||||
static FRAMES: AtomicU64 = AtomicU64::new(0);
|
||||
|
||||
#[cfg(feature = "diagnostics")]
|
||||
pub(crate) fn presented() -> u64 {
|
||||
FRAMES.load(Ordering::Relaxed)
|
||||
}
|
||||
|
||||
/// Shows the first plane's first resource in our window.
|
||||
///
|
||||
/// shortcut: one plane, no scaling or placement, the source expected in
|
||||
@@ -133,10 +242,38 @@ extern "system" fn present(
|
||||
plane_parameters: *const Plane,
|
||||
_parameters: *const u8,
|
||||
) -> HRESULT {
|
||||
static FRAMES: AtomicU64 = AtomicU64::new(0);
|
||||
let frame = FRAMES.fetch_add(1, Ordering::Relaxed) + 1;
|
||||
if frame.is_power_of_two() {
|
||||
tracing::info!(frame, "frame presented");
|
||||
let (draws, dispatches) = crate::list::take_counts();
|
||||
#[cfg(windows)]
|
||||
let (drawn, dispatched) = {
|
||||
static DRAWN: AtomicU64 = AtomicU64::new(0);
|
||||
static DISPATCHED: AtomicU64 = AtomicU64::new(0);
|
||||
let since = |last: &AtomicU64, now: u64| now - last.swap(now, Ordering::Relaxed);
|
||||
(
|
||||
since(&DRAWN, crate::draw::drawn()),
|
||||
since(&DISPATCHED, crate::draw::dispatched()),
|
||||
)
|
||||
};
|
||||
#[cfg(not(windows))]
|
||||
let (drawn, dispatched) = (0, 0);
|
||||
tracing::info!(
|
||||
frame,
|
||||
draws,
|
||||
drawn,
|
||||
dispatches,
|
||||
dispatched,
|
||||
"frame presented (since the last line: draws and dispatches, and those run on the host)"
|
||||
);
|
||||
#[cfg(windows)]
|
||||
if frame >= 256 {
|
||||
let (hits, misses) = crate::shader_cache::counts();
|
||||
tracing::info!(hits, misses, "shaders from the cache and translated so far");
|
||||
}
|
||||
}
|
||||
#[cfg(all(windows, feature = "diagnostics"))]
|
||||
if crate::capture::listed(frame) {
|
||||
crate::capture::dump_targets(frame);
|
||||
}
|
||||
#[cfg(windows)]
|
||||
if planes > 0
|
||||
@@ -152,13 +289,125 @@ extern "system" fn present(
|
||||
const COPY_SOURCE: u32 = 0x800;
|
||||
let state = crate::resource::host_transition(resource, COPY_SOURCE)
|
||||
.map_or(COPY_SOURCE, |(_, before)| before);
|
||||
host.present(texture, state);
|
||||
let shown = host.present(texture, state, frame);
|
||||
crate::resource::host_transition(resource, state);
|
||||
#[cfg(feature = "diagnostics")]
|
||||
blinks(frame, resource, state, shown);
|
||||
#[cfg(not(feature = "diagnostics"))]
|
||||
let _ = shown;
|
||||
}
|
||||
#[cfg(not(windows))]
|
||||
let _ = (planes, plane_parameters);
|
||||
S_OK
|
||||
}
|
||||
/// Diagnostics: logs a presented frame that is black after one that was
|
||||
/// not, with what was presented and how many draws ran since.
|
||||
#[cfg(all(windows, feature = "diagnostics"))]
|
||||
fn blinks(frame: u64, resource: This, state: u32, shown: Option<bool>) {
|
||||
static LAST: std::sync::Mutex<(bool, u64, u64)> = std::sync::Mutex::new((false, 0, 0));
|
||||
let mut last = LAST.lock().unwrap_or_else(|e| e.into_inner());
|
||||
let drawn = crate::draw::drawn();
|
||||
let black = shown.unwrap_or(false);
|
||||
let draws = crate::draw::take_frame();
|
||||
if black && !last.0 {
|
||||
last.2 += 1;
|
||||
tracing::warn!(
|
||||
frame,
|
||||
resource = ?resource,
|
||||
state = format_args!("{state:#x}"),
|
||||
draws = drawn - last.1,
|
||||
copied = shown.is_some(),
|
||||
black_frames = last.2,
|
||||
levels = ?crate::capture::recent_levels(),
|
||||
"a black frame after a frame that was not"
|
||||
);
|
||||
for d in draws {
|
||||
tracing::warn!("black frame {frame}: {d}");
|
||||
}
|
||||
AFTER.store(frame + 6, Ordering::Relaxed);
|
||||
}
|
||||
// Six frames on: the levels around it (a fade or a single drop).
|
||||
static AFTER: AtomicU64 = AtomicU64::new(0);
|
||||
if AFTER.load(Ordering::Relaxed) == frame {
|
||||
tracing::warn!(frame, levels = ?crate::capture::recent_levels(), "levels after the black frame");
|
||||
}
|
||||
*last = (black, drawn, last.2);
|
||||
}
|
||||
|
||||
/// A run of destination pages: how they are mapped (0 pool pages from
|
||||
/// `start` on, 1 pool page `start` each, 2 unmapped, 3 left as they are)
|
||||
/// and how many.
|
||||
#[repr(C)]
|
||||
pub(crate) struct PageRange {
|
||||
kind: u32,
|
||||
start: u32,
|
||||
count: u32,
|
||||
}
|
||||
|
||||
/// The ranges mapped from a destination address on.
|
||||
#[repr(C)]
|
||||
pub(crate) struct PageBatch {
|
||||
destination: u64,
|
||||
count: u32,
|
||||
ranges: *const PageRange,
|
||||
}
|
||||
|
||||
/// Bytes per mapped page.
|
||||
const PAGE: u64 = 64 << 10;
|
||||
|
||||
/// `CopyPageMappingsBatchX(count, batches, pool, pool pages, flags)`: maps
|
||||
/// pages of a pool (memory the title mapped physical pages into) at the
|
||||
/// batches' addresses. Grand Theft Auto VI streams textures into pool pages
|
||||
/// and maps them into its tiled heap this way (title+0xf2c470, ranges of
|
||||
/// one constant page or of unmapped pages). Done at once: every earlier
|
||||
/// submission has run.
|
||||
extern "system" fn copy_page_mappings(
|
||||
_: This,
|
||||
count: u32,
|
||||
batches: *const PageBatch,
|
||||
pool: u64,
|
||||
pool_pages: u32,
|
||||
_flags: u32,
|
||||
) -> HRESULT {
|
||||
let Some(map) = crate::resource::page_mapper() else {
|
||||
return E_INVALIDARG;
|
||||
};
|
||||
if batches.is_null() && count > 0 {
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
let batches = (count > 0).then(|| {
|
||||
// SAFETY: the title passes `count` batches.
|
||||
unsafe { std::slice::from_raw_parts(batches, count as usize) }
|
||||
});
|
||||
let mut ok = true;
|
||||
for b in batches.into_iter().flatten() {
|
||||
if b.ranges.is_null() {
|
||||
continue;
|
||||
}
|
||||
// SAFETY: each batch holds `count` ranges.
|
||||
let ranges = unsafe { std::slice::from_raw_parts(b.ranges, b.count as usize) };
|
||||
let mut at = b.destination;
|
||||
for r in ranges {
|
||||
let len = u64::from(r.count) * PAGE;
|
||||
let inside = |pages: u32| r.start.checked_add(pages).is_some_and(|e| e <= pool_pages);
|
||||
let source = pool + u64::from(r.start) * PAGE;
|
||||
ok &= match r.kind {
|
||||
0 if inside(r.count) => map(at, source, len),
|
||||
1 if inside(1) => (0..u64::from(r.count)).all(|k| map(at + k * PAGE, source, PAGE)),
|
||||
2 => map(at, 0, len),
|
||||
3 => true,
|
||||
_ => false,
|
||||
};
|
||||
at += len;
|
||||
}
|
||||
}
|
||||
if !ok {
|
||||
static ONCE: std::sync::Once = std::sync::Once::new();
|
||||
ONCE.call_once(|| tracing::warn!(pool = format_args!("{pool:#x}"), "a page mapping failed"));
|
||||
}
|
||||
S_OK
|
||||
}
|
||||
|
||||
extern "system" fn desc(this: This, out: *mut QueueDesc) {
|
||||
if !out.is_null() {
|
||||
// SAFETY: checked non-null; the title passes room for a description.
|
||||
@@ -166,30 +415,70 @@ extern "system" fn desc(this: This, out: *mut QueueDesc) {
|
||||
}
|
||||
}
|
||||
|
||||
/// IUnknown 3, object 4, device child 1, queue 26 (12 as on PC, then
|
||||
/// console ones).
|
||||
static FUNCTIONS: Table<34> = {
|
||||
let mut f = object::d3d12_object(object::missing_table::<QUEUE, 34>());
|
||||
f[0] = query as *const ();
|
||||
f[2] = release as *const ();
|
||||
f[7] = object::parent_device as *const (); // 0x38
|
||||
f[10] = execute as *const (); // 0x50
|
||||
f[11] = marker as *const (); // 0x58 set marker
|
||||
f[12] = marker as *const (); // 0x60 begin event
|
||||
f[13] = marker as *const (); // 0x68 end event
|
||||
f[14] = signal as *const (); // 0x70
|
||||
f[15] = wait as *const (); // 0x78
|
||||
f[16] = timestamp_frequency as *const (); // 0x80
|
||||
f[26] = desc as *const (); // 0xd0
|
||||
f[30] = present as *const (); // 0xf0
|
||||
Table(f)
|
||||
};
|
||||
/// The queue methods by their slot in older titles' queues (the 2020-era
|
||||
/// layout): IUnknown 3, object 4, device child 1, queue 26 (12 as on PC,
|
||||
/// then console ones).
|
||||
const METHODS: [(usize, *const ()); 15] = [
|
||||
(0, query as *const ()),
|
||||
(2, release as *const ()),
|
||||
(7, object::parent_device as *const ()), // 0x38
|
||||
(10, execute as *const ()), // 0x50
|
||||
(11, marker as *const ()), // 0x58 set marker
|
||||
(12, marker as *const ()), // 0x60 begin event
|
||||
(13, marker as *const ()), // 0x68 end event
|
||||
(14, signal as *const ()), // 0x70
|
||||
(15, wait as *const ()), // 0x78
|
||||
(16, timestamp_frequency as *const ()), // 0x80
|
||||
(26, desc as *const ()), // 0xd0
|
||||
(29, copy_page_mappings as *const ()), // 0xe8 page mapping batch
|
||||
(30, present as *const ()), // 0xf0
|
||||
(33, execute_x as *const ()), // 0x108
|
||||
(32, signal2_x as *const ()), // 0x100
|
||||
];
|
||||
|
||||
/// Newer titles' queues have two more methods before Signal, which moved
|
||||
/// from 0x70 to 0x80: every slot from 0x70 on is two later (taken here as
|
||||
/// starting exactly at 0x70, the methods before it kept in place).
|
||||
/// Inferred from Grand Theft Auto VI's calls: Signal 0x80 `(fence,
|
||||
/// value)`, timestamp frequency 0x90 (title+0x24841a6), suspend and resume
|
||||
/// 0xb8/0xc0, PresentX 0x100, the frame-token submission 0x118 `(count,
|
||||
/// lists, token, flags)` (title+0x24821dd).
|
||||
const fn newer_slot(slot: usize) -> usize {
|
||||
if slot >= 14 { slot + 2 } else { slot }
|
||||
}
|
||||
|
||||
const fn queue_table(newer: bool) -> [*const (); 36] {
|
||||
let mut f = object::d3d12_object(object::missing_table::<QUEUE, 36>());
|
||||
let mut i = 0;
|
||||
while i < METHODS.len() {
|
||||
let (slot, method) = METHODS[i];
|
||||
f[if newer { newer_slot(slot) } else { slot }] = method;
|
||||
i += 1;
|
||||
}
|
||||
f
|
||||
}
|
||||
|
||||
static FUNCTIONS: Table<36> = Table(queue_table(false));
|
||||
static NEWER_FUNCTIONS: Table<36> = Table(queue_table(true));
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::object::slot;
|
||||
|
||||
/// Where a queue's signal is: newer layouts have it two slots later.
|
||||
/// Another test may switch layouts while this one runs, so the queue's
|
||||
/// own table decides.
|
||||
fn signal_slot(q: This) -> usize {
|
||||
// SAFETY: one of our queues; its first field is the table.
|
||||
let table = unsafe { *q.cast::<*const *const ()>() };
|
||||
if table == NEWER_FUNCTIONS.0.as_ptr() {
|
||||
0x80
|
||||
} else {
|
||||
0x70
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn queue_signals_complete_at_once() {
|
||||
let null = std::ptr::null();
|
||||
@@ -209,7 +498,7 @@ mod tests {
|
||||
crate::fence::create(null, 0, 0, fence_iid, &mut fence),
|
||||
S_OK
|
||||
);
|
||||
let signal = slot::<extern "system" fn(This, This, u64) -> HRESULT>(q, 0x70);
|
||||
let signal = slot::<extern "system" fn(This, This, u64) -> HRESULT>(q, signal_slot(q));
|
||||
assert_eq!(signal(q, fence, 7), S_OK);
|
||||
assert_eq!(
|
||||
slot::<extern "system" fn(This) -> u64>(fence, 0x40)(fence),
|
||||
@@ -217,4 +506,42 @@ mod tests {
|
||||
);
|
||||
assert_eq!(slot::<extern "system" fn(This) -> u32>(q, 0x10)(q), 0);
|
||||
}
|
||||
|
||||
/// Grand Theft Auto VI's compute queue: `{COMPUTE, 0, pipe 1, queue 0}`.
|
||||
#[test]
|
||||
fn console_queues_are_created_as_on_pc() {
|
||||
let null = std::ptr::null();
|
||||
let desc = QueueDescX {
|
||||
kind: 2,
|
||||
flags: 0,
|
||||
engine_or_pipe: 1,
|
||||
queue: 0,
|
||||
};
|
||||
let mut q = null;
|
||||
assert_eq!(create_x(null, &desc, &QUEUE_IIDS[0], &mut q), S_OK);
|
||||
assert_eq!(queue(q).desc.kind, 2);
|
||||
let none = std::ptr::null();
|
||||
assert_eq!(create_x(null, none, &QUEUE_IIDS[0], &mut q), E_INVALIDARG);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn newer_queues_have_their_methods_two_slots_later() {
|
||||
let (old, new) = (queue_table(false), queue_table(true));
|
||||
assert_eq!(old[10], new[10]); // submission stays at 0x50
|
||||
assert_eq!(old[14], new[16]); // signal 0x70 → 0x80
|
||||
assert_eq!(old[30], new[32]); // present 0xf0 → 0x100
|
||||
assert_eq!(new[35], execute_x as *const ()); // 0x118
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn timestamps_and_values_are_written() {
|
||||
let mut at = [0u64; 2];
|
||||
Written::Value(0x1_0000_0002).write(at.as_mut_ptr().cast(), 4);
|
||||
assert_eq!(at[0], 2);
|
||||
Written::GpuTimestamp.write(at[1..].as_mut_ptr().cast(), 8);
|
||||
let first = at[1];
|
||||
std::thread::sleep(std::time::Duration::from_millis(2));
|
||||
Written::GpuTimestamp.write(at[1..].as_mut_ptr().cast(), 8);
|
||||
assert!(at[1] > first);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user