fix(gpu): corrige null CBV no create_cbv para evitar DXGI_ERROR_DEVICE_HUNG (0x887A0006) no AMD RDNA2 #117
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/uiliannn--VItoriaBr!117
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-117"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ItzMeGamer on GitHub · 2026-11-26 09:39 UTC · original
ItzMeGamer:fix/null-shader-view-cbv-rdna2→main· +37 −4 · 2 files · 1 commits · openResumo
Porta o tratamento de null CBV do upstream (
78ed12e) paracrates/victory-gpu/src/descriptor.rs(create_cbv), gravandoConstant(0, 0)em vez de retornar antecipadamente e deixar uma view antiga ativa no slot quandoCreateConstantBufferViewrecebedesc = null. Também adiciona os testes unitários correspondentes (null_cbv_clears_a_stale_viewea_null_view_has_no_alias_source).Por que isso resolve o crash no AMD RDNA2
DXGI_ERROR_DEVICE_HUNG (0x887A0006)na transição para a cena 3D quando um slot CBV nulo (u4/u5 nullno DRED) mantinha uma view obsoleta.alias_of(219878a) enull_for(071487f) já estavam presentes na árvore, faltava apenas ocreate_cbvdo commit78ed12e.Verificação
cargo test -p victory-gpu-> 207 passed, 0 failed.DXGI_ERROR_DEVICE_HUNG (0x887A0006)eliminado completamente durante a compilação e execução dos shaders de compute da cena 3D.(Assistido por IA com Antigravity; fixes #18).
English:
Port of upstream VIctory commits:
219878a GPU: a null shader view has no alias source
78ed12e GPU: write a null CBV when CreateConstantBufferView gets a null desc
descriptor.rs (create_cbv): D3D12 accepts a null CBV description and initialises BufferLocation=0, SizeInBytes=0. The old early-return left a stale Constant view in the slot; map null -> Constant(0, 0) so the slot is cleared. host mirroring already emits a null buffer view for Constant views via null_buffer_view, so no host-side change is needed.
resource.rs (alias_of): alias_of already guards is_null() at its top; add the companion test (a_null_view_has_no_alias_source) that documents and exercises that guard, matching the upstream test for alias_source.
descriptor/host.rs null_for: the buffer-dimension fix (
071487f) is already present in this tree (is_some_and(|d| d[1] == 1) for both View::Unordered and View::Shader); no change needed there.Fixes DXGI_ERROR_DEVICE_HUNG (0x887A0006) on AMD RDNA2 when a null shader view or null CBV is bound during indirect/draw commands.
@ItzMeGamer on GitHub · 2026-11-26 09:39 UTC · original
Oi @uiliannn! Testei a fundo na RX 6500 XT 8 GB e consegui isolar e corrigir o crash
DXGI_ERROR_DEVICE_HUNG (0x887A0006)na transição para a cena 3D!O que encontramos no DRED e corrigimos
alias_of(219878a) enull_for(071487f) já estavam na árvore, faltava portar o tratamento de null CBV do commit78ed12eemcrates/victory-gpu/src/descriptor.rs(create_cbv), que retornava antes da hora e deixava uma view antiga ativa no slot (u4/u5 nullno DRED).207 passednovictory-gpue5 passednovictory):null CBV -> Constant(0, 0)): corrige completamente o0x887A0006na RX 6500 XT.VICTORY_PRESET=8gb: aplica automaticamente todas as 11 variáveis recomendadas para GPUs de 8 GB VRAM + HDD em um único comando.Agora estou testando o carregamento completo da cena 3D com a paginação expandida (16 GB RAM + pagefile em SSD/HDD) e já posto os resultados de FPS/VRAM aqui!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.