mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 13:00:32 +00:00
Add bounds check when looking up constant buffer on vulkan
This commit is contained in:
@@ -986,6 +986,11 @@ BoundCBuffer PipeState::GetConstantBuffer(ShaderStage stage, uint32_t BufIdx, ui
|
||||
return ret;
|
||||
}
|
||||
|
||||
if(bind.bindset >= pipe.descriptorSets.count() ||
|
||||
bind.bind >= pipe.descriptorSets[bind.bindset].bindings.count() ||
|
||||
ArrayIdx > pipe.descriptorSets[bind.bindset].bindings[bind.bind].binds.size())
|
||||
return BoundCBuffer();
|
||||
|
||||
const VKPipe::BindingElement &descriptorBind =
|
||||
pipe.descriptorSets[bind.bindset].bindings[bind.bind].binds[ArrayIdx];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user