File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1964,6 +1964,14 @@ rdcarray<DescriptorAccess> D3D12Replay::GetDescriptorAccess(uint32_t eventId)
1964
1964
continue ;
1965
1965
}
1966
1966
1967
+ // otherwise the access may be to a rootsig element that's not bound if the current event is
1968
+ // not a valid draw or dispatch
1969
+ if (rootIndex >= rootSig.sigelems .size ())
1970
+ {
1971
+ access.descriptorStore = ResourceId ();
1972
+ continue ;
1973
+ }
1974
+
1967
1975
const D3D12RenderState::SignatureElement &rootEl = rootSig.sigelems [rootIndex];
1968
1976
1969
1977
// this indicates a root parameter
@@ -1982,6 +1990,10 @@ rdcarray<DescriptorAccess> D3D12Replay::GetDescriptorAccess(uint32_t eventId)
1982
1990
access.byteOffset += (uint32_t )rootEl.offset ;
1983
1991
}
1984
1992
}
1993
+
1994
+ // remove any invalid / unbound root element accesses
1995
+ ret.removeIf (
1996
+ [](const DescriptorAccess &access) { return access.descriptorStore == ResourceId (); });
1985
1997
}
1986
1998
1987
1999
return ret;
You can’t perform that action at this time.
0 commit comments