Unbind the SRVs an ore D3D11 pass bound when it finishes
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 61/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- backend-api-design
Direzione di ricerca
The change belongs in source/renderer/ore/d3d11/ore_render_pass_d3d11.cpp, in RenderPassD3D11::finish(). Read how the pass tracks its bound groups and pipeline slots, then check how finish releases bound resources. Done means the pass unbinds the SRVs it bound so the next pass can render to a sampled texture without D3D11 debug layer hazard warnings.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Unbind the SRVs an ore D3D11 pass bound when it finishes.
- source/renderer/ore/d3d11/ore_render_pass_d3d11.cpp: Ore D3D11 pass finish: unbind the shader resource views the pass bound, so the next pass can render into a texture this one sampled without tripping the D3D11 debug layer hazards (STATE_SETTING WARNING #9 and #7)
diff --git a/source/renderer/ore/d3d11/ore_render_pass_d3d11.cpp b/source/renderer/ore/d3d11/ore_render_pass_d3d11.cpp
index be997baaf1a3ae6485d7c51d3a0b7dc23de078b7..247a668fb3b783ec58c6b17ae4f05f22db963110 100644
--- a/source/renderer/ore/d3d11/ore_render_pass_d3d11.cpp
+++ b/source/renderer/ore/d3d11/ore_render_pass_d3d11.cpp
@@ -484,7 +484,37 @@ void RenderPassD3D11::finish()
if (m_finished)
return;
m_finished = true;
+
+ if (m_d3d11Context != nullptr && m_currentPipeline != nullptr)
+ {
+ ID3D11ShaderResourceView* nullView = nullptr;
+ const Pipeline* pipeline = m_currentPipeline.get();
+ const auto unbindView =
+ [&](uint32_t groupIndex, uint32_t binding, SlotSpace space)
+ {
+ const Pipeline::StageSlots slots =
+ pipeline->slots(groupIndex, binding, space);
+ if (slots.vs != BindingMap::kAbsent)
+ m_d3d11Context->VSSetShaderResources(slots.vs, 1, &nullView);
+ if (slots.fs != BindingMap::kAbsent)
+ m_d3d11Context->PSSetShaderResources(slots.fs, 1, &nullView);
+ };
+
+ for (uint32_t g = 0; g < kMaxBindGroups; ++g)
+ {
+ const auto* bg = static_cast<const BindGroupD3D11*>(m_boundGroups[g].get());
+ if (bg == nullptr)
+ continue;
+
+ for (const auto& texture : bg->m_d3d11Textures)
+ unbindView(g, texture.binding, SlotSpace::texture);
+ for (const auto& storage : bg->m_d3d11StorageBuffers)
+ unbindView(g, storage.binding, SlotSpace::buffer);
+ }
+ }
+
releaseBoundResources();
+
if (m_d3d11Context != nullptr)
{
// Unbind render targets so attached textures can be used as SRVs.
- Lingua principale
- C++
- Stelle
- 1.3k
- Fork
- 133
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rive-app/rive-runtime
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 83/100
rive-app/rive-runtime#143 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rive-app/rive-runtime#141 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
rive-app/rive-runtime#140 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
rive-app/rive-runtime#137 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
rive-app/rive-runtime#134 ·
Tutte le issue di rive-app/rive-runtime
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
charmplusplus/charm#4210 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] VPN auth dialog spawned by the secret agent fails with "TLS support is not available" on NixOSApertabug nixos umbriel
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
noctalia-dev/noctalia#5310 ·
I maintainer di solito rispondono entro 1 giorno
-
area/docdb kind/bug priority/medium status/awaiting-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
yugabyte/yugabyte-db#37426 ·
I maintainer di solito rispondono entro 1 giorno
-
[Engine] Two prompt block scorers enabled at once: WMMA silently wins and no log line is printedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Niko1221/Strata#5693 · 2 commenti ·
I maintainer di solito rispondono entro 4 giorni