Allow fetching view params (bound mip, etc) for copy/compute. Refs #292

This commit is contained in:
baldurk
2016-07-12 18:48:03 +02:00
parent 53d739c659
commit 123476fd30
-43
View File
@@ -107,9 +107,6 @@ namespace renderdocui.Windows
bool copy, compute;
GetDrawContext(core, out copy, out compute);
if (copy || compute)
return -1;
return GetBoundResource(core, arrayEl).HighestMip;
}
@@ -119,9 +116,6 @@ namespace renderdocui.Windows
bool copy, compute;
GetDrawContext(core, out copy, out compute);
if (copy || compute)
return -1;
return GetBoundResource(core, arrayEl).FirstSlice;
}
@@ -131,9 +125,6 @@ namespace renderdocui.Windows
bool copy, compute;
GetDrawContext(core, out copy, out compute);
if (copy || compute)
return FormatComponentType.None;
return GetBoundResource(core, arrayEl).typeHint;
}
@@ -142,40 +133,6 @@ namespace renderdocui.Windows
return GetBoundResource(core, arrayEl).Id;
}
public int GetBoundResourceArraySize(Core core)
{
if (Type == FollowType.ReadWrite)
{
var rw = GetReadWriteResources(core);
var mapping = GetMapping(core);
if (index < mapping.ReadWriteResources.Length)
{
var key = mapping.ReadWriteResources[index];
if (rw.ContainsKey(key))
return rw[key].Length;
}
}
else if (Type == FollowType.ReadOnly)
{
var res = GetReadOnlyResources(core);
var mapping = GetMapping(core);
if (index < mapping.ReadOnlyResources.Length)
{
var key = mapping.ReadOnlyResources[index];
if (res.ContainsKey(key))
return res[key].Length;
}
}
return 1;
}
public BoundResource GetBoundResource(Core core, int arrayIdx)
{
BoundResource ret = new BoundResource();