Skip to content

Formats: copy GFX10 tiled textures by cached runs - #84

Merged
devin-ai-integration[bot] merged 2 commits into
mainfrom
devin/gfx10-copy-runs
Nov 25, 2026
Merged

devin-ai-integration[bot] merged 2 commits into
mainfrom
devin/gfx10-copy-runs

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Porta a upstream #2736: cópias tile/detile GFX10 derivam a largura contígua uma vez, percorrem linhas adjacentes e slabs de profundidade enquanto os blocos tiled permanecem quentes em cache.
  • Substitui a camada anterior de runs do fork por essa travessia; os testes exaustivos por elemento continuam passando, inclusive dimensões ímpares, mip tails, arrays, volumes e pitches com padding.
  • Também valida depth_pitch antes de escrever, impedindo que slices de profundidade se sobrescrevam.
  • Adiciona benchmark ignorado detile_throughput.

Impacto upstream medido em Apple M4: cópias tiled até ~2,4x; exemplos incluem RGBA8 1920×1080 64KB_D tile 13,7→29,1 GB/s e volume RGBA8 4KB_S detile 11,3→27,4 GB/s. Nesta VM o benchmark portado roda sem falha (ex.: tail BC7 ~36–39 GB/s), mas não é o hardware-alvo.

Validation

  • cargo test -p victory-formats texture --locked: 16 passed, benchmark ignored
  • cargo test --release -p victory-formats detile_throughput --locked -- --ignored --nocapture
  • cargo fmt --all -- --check
  • RUSTFLAGS='-D warnings' cargo clippy -p victory-formats --all-targets --locked
  • cargo run --locked --quiet --package xtask -- policy

Sem validação real de jogo/GPU/Proton nesta VM.


Devin Review

Co-authored-by: brainbudt <brainbudt@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment on lines +683 to +686
// Multiple depth slices must not overwrite each other.
if depth > 1 && depth_pitch < slice_bytes {
return Err(Error::TooSmall);
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Volume uploads reject shared source rows

For volume uploads, walk now rejects zero depth pitch instead of copying one source plane into every depth slice. copy_into forwards the title’s pitch unchanged, so compatibility depends on the XG copy contract.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A rejeição é intencional e vem da upstream: depth_pitch define a distância entre slices; valores menores que uma slice fazem detile sobrescrever a mesma saída e fazem tile interpretar entrada sobreposta como dados distintos. A validação agora falha antes de qualquer escrita; para texturas 2D (depth == 1) pitch zero continua aceito porque não há segunda slice.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot merged commit b36989d into main Nov 25, 2026
5 checks passed
@devin-ai-integration
devin-ai-integration Bot deleted the devin/gfx10-copy-runs branch November 25, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant