mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 09:30:44 +00:00
Allow fetching view params (bound mip, etc) for copy/compute. Refs #292
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user