Make sure to skip padding registers when enumerating D3D12 bindings

This commit is contained in:
baldurk
2017-06-21 11:02:44 +01:00
parent 734fa13443
commit 90077f54ee
2 changed files with 18 additions and 0 deletions
@@ -1012,6 +1012,11 @@ QMap<BindpointMap, QVector<BoundResource>> CommonPipelineState::GetReadOnlyResou
BindpointMap key(space, reg);
BoundResource val;
// consider this register to not exist - it's in a gap defined by sparse root signature
// elements
if(bind.RootElement == ~0U)
continue;
val.Id = bind.Resource;
val.HighestMip = (int)bind.HighestMip;
val.FirstSlice = (int)bind.FirstArraySlice;
@@ -1142,6 +1147,11 @@ QMap<BindpointMap, QVector<BoundResource>> CommonPipelineState::GetReadWriteReso
BindpointMap key(space, reg);
BoundResource val;
// consider this register to not exist - it's in a gap defined by sparse root signature
// elements
if(bind.RootElement == ~0U)
continue;
val.Id = bind.Resource;
val.HighestMip = (int)bind.HighestMip;
val.FirstSlice = (int)bind.FirstArraySlice;