For APIs with proper separate sampler objects use debug names. Refs #273

This commit is contained in:
baldurk
2016-05-26 23:51:09 +02:00
parent e99660bebc
commit 1914a8a029
9 changed files with 61 additions and 3 deletions
@@ -156,6 +156,11 @@ namespace renderdoc
public class Sampler
{
public ResourceId Samp;
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string SamplerName;
public bool customSamplerName;
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string AddressU, AddressV, AddressW;
[CustomMarshalAs(CustomUnmanagedType.FixedArray, FixedLength = 4)]
@@ -56,6 +56,10 @@ namespace renderdoc
public ResourceId res;
public ResourceId sampler;
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string SamplerName;
public bool customSamplerName;
public UInt32 baseMip;
public UInt32 baseLayer;
@@ -409,6 +409,9 @@ namespace renderdocui.Windows.PipelineState
if (shaderInput != null && shaderInput.name.Length > 0)
slotname += ": " + shaderInput.name;
if (s.customSamplerName)
slotname += "(" + s.SamplerName + ")";
string borderColor = s.BorderColor[0].ToString() + ", " +
s.BorderColor[1].ToString() + ", " +
s.BorderColor[2].ToString() + ", " +
@@ -308,7 +308,7 @@ namespace renderdocui.Windows.PipelineState
lod += String.Format(" Bias {0}", descriptor.mipBias);
return new object[] {
"", bindset, slotname, "Sampler", "Sampler " + descriptor.sampler.ToString(),
"", bindset, slotname, "Sampler", descriptor.SamplerName,
addressing,
filter,
lod