mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-08 23:13:12 +00:00
Check index is in valid range for pipeline arrays.
This commit is contained in:
1 parent
c5a74f0ad5
commit
92c1df0573
1 file changed
+6
-2
@@ -124,7 +124,9 @@ namespace renderdocui.Windows
|
||||
|
||||
if (Type == FollowType.RT_UAV)
|
||||
{
|
||||
id = core.CurPipelineState.GetOutputTargets()[index];
|
||||
var outputs = core.CurPipelineState.GetOutputTargets();
|
||||
if(outputs.Length > index)
|
||||
id = outputs[index];
|
||||
}
|
||||
else if (Type == FollowType.Depth)
|
||||
{
|
||||
@@ -132,7 +134,9 @@ namespace renderdocui.Windows
|
||||
}
|
||||
else if (Type == FollowType.PSResource)
|
||||
{
|
||||
id = core.CurPipelineState.GetResources(ShaderStageType.Pixel)[index];
|
||||
var res = core.CurPipelineState.GetResources(ShaderStageType.Pixel);
|
||||
if(res.Length > index)
|
||||
id = res[index];
|
||||
}
|
||||
|
||||
return id;
|
||||
|
||||
Reference in new issue
Block a user