From 875e27d84449c46e938aaa7f30476c0d94ecb217 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 23 Oct 2019 19:42:07 +0100 Subject: [PATCH] Don't bounds check bindset against spaces in D3D12 * In D3D12 bindset != space because spaces can be incredibly sparse and are arbitrary. So we can't check that the bindset is in 0...#spaces. --- renderdoc/api/replay/pipestate.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdoc/api/replay/pipestate.inl b/renderdoc/api/replay/pipestate.inl index 278a19210..6ea352d57 100644 --- a/renderdoc/api/replay/pipestate.inl +++ b/renderdoc/api/replay/pipestate.inl @@ -926,7 +926,7 @@ BoundCBuffer PipeState::GetConstantBuffer(ShaderStage stage, uint32_t BufIdx, ui if(space == -1) return BoundCBuffer(); - if(bind.bindset >= s.spaces.count() || bind.bind >= s.spaces[space].constantBuffers.count()) + if(space >= s.spaces.count() || bind.bind >= s.spaces[space].constantBuffers.count()) return BoundCBuffer(); const D3D12Pipe::ConstantBuffer &descriptor = s.spaces[space].constantBuffers[bind.bind];