mirror of
https://github.com/avatarmanz/VIctory-7900XTX.git
synced 2026-12-06 08:38:34 +00:00
Renderer port RT: a test that the switch takes the placed order; the bench without the directory
Measured (Series X 4K/1440p, RT, ports 1/2/5/6/7, -Walk): city standing 145.3 -> 126.2 ms, walking 131.1 -> 118.7 (rts-3 -> rts-2); boat standing 58.2 -> 46.2, walking 94.5 -> 75.6 (rts-5 -> rts-4). No crash; pictures as the control's. The bench: the directory look costs nothing measurable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -1046,6 +1046,21 @@ mod tests {
|
||||
|
||||
/// A copy at its place in a list is in the way of what reads or writes its
|
||||
/// bytes behind it, not of what did ahead of it.
|
||||
/// Renderer port RT is the order's switch too: with it a fill ahead of
|
||||
/// a copy at its place is let through, one behind it still refused.
|
||||
#[test]
|
||||
fn the_port_takes_the_order() {
|
||||
crate::port_rt::PORT_RT_IN_TEST.set(true);
|
||||
assert!(placed_order());
|
||||
let placed = Does::Placed { dst: 2000, src: 3000, len: 64 };
|
||||
let by_order = placed_order();
|
||||
assert!(plan(&[fill(2032, 64, true), placed], 2, by_order, &mut None).is_ok());
|
||||
assert_eq!(plan(&[placed, fill(2032, 64, true)], 2, by_order, &mut None), Err(BEHIND_PLACED));
|
||||
crate::port_rt::PORT_RT_IN_TEST.set(false);
|
||||
// Without it (and without VICTORY_PLACED_ORDER) both were refused.
|
||||
assert_eq!(plan(&[fill(2032, 64, true), placed], 2, false, &mut None), Err(BEHIND_PLACED));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn copies_at_their_place_stand_in_the_way_of_what_is_behind_them() {
|
||||
let placed = Does::Placed { dst: 2000, src: 3000, len: 64 };
|
||||
|
||||
@ -67,9 +67,9 @@ void main(uint id : SV_DispatchThreadID) {
|
||||
uint acc = 0;
|
||||
for (uint i = 0; i < steps; i++) {
|
||||
// The directory: the copy and the byte offset of the node's page.
|
||||
uint2 e = dir.Load2((p >> 10) * 8);
|
||||
uint2 e = spread == 99 ? uint2(0, (p >> 10) * 1024 * 64) : dir.Load2((p >> 10) * 8);
|
||||
uint copy = (e.x + ((id >> spread) & 7)) & 7;
|
||||
if (spread == 0) { copy = e.x; }
|
||||
if (spread == 0 || spread == 99) { copy = e.x; }
|
||||
uint at = e.y + (p & 1023) * 64;
|
||||
uint4 b, c, d;
|
||||
uint4 a = node(copy, at, b, c, d);
|
||||
@ -234,8 +234,9 @@ fn bench_title_memory_reads() {
|
||||
back.Unmap(0, None);
|
||||
ms
|
||||
};
|
||||
let cases: [(&str, u32, u32); 7] = [
|
||||
let cases: [(&str, u32, u32); 8] = [
|
||||
("one view (uniform)", 0, 0),
|
||||
("one view, no directory", 0, 99),
|
||||
("view per lane, all lanes one copy", 1, 0),
|
||||
("one loop per node, all lanes one copy", 2, 0),
|
||||
("the wave's view if shared, all lanes one copy", 3, 0),
|
||||
|
||||
Reference in New Issue
Block a user