message: Speculative crash fix, protect against invalid indices in cbuffer tag
diff: @@ -551,13 +551,23 @@ ResourceId D3D12PipelineStateViewer::GetResource(RDTreeWidgetItem *item)
  D3D12CBufTag cb = tag.value<D3D12CBufTag>();
  if(cb.idx == ~0U)
  + {
  + if(cb.rootElement < m_Ctx.CurD3D12PipelineState()->rootElements.size())
  + {
  + const D3D12Pipe::RootSignatureRange &range =
  + m_Ctx.CurD3D12PipelineState()->rootElements[cb.rootElement];
  +
  + if(cb.reg < range.constantBuffers.size())
  {
  // unused cbuffer, open regular buffer viewer
  - const D3D12Pipe::ConstantBuffer &buf =
  - m_Ctx.CurD3D12PipelineState()->rootElements[cb.rootElement].constantBuffers[cb.reg];
  + const D3D12Pipe::ConstantBuffer &buf = range.constantBuffers[cb.reg];
  return buf.resourceId;
  }
  + }
  +
  + return ResourceId();
  + }
  return m_Ctx.CurPipelineState().GetConstantBuffer(stage->stage, cb.idx, cb.arrayIdx).resourceId;
  }
  