Update D3D12 pipeline state to roughly match D3D12 state

This commit is contained in:
baldurk
2016-09-20 14:04:38 +02:00
parent af9017af0a
commit 8b1a26287d
9 changed files with 332 additions and 1288 deletions
+152 -136
View File
@@ -28,10 +28,14 @@
struct D3D12PipelineState
{
D3D12PipelineState() {}
D3D12PipelineState() : customName(false) {}
ResourceId pipeline;
bool32 customName;
rdctype::str PipelineName;
struct InputAssembler
{
InputAssembler() : Bytecode(NULL), customName(false) {}
InputAssembler() : indexStripCutValue(0) {}
struct LayoutInput
{
LayoutInput()
@@ -47,17 +51,14 @@ struct D3D12PipelineState
uint32_t InstanceDataStepRate;
};
rdctype::array<LayoutInput> layouts;
ResourceId layout;
ShaderReflection *Bytecode;
bool32 customName;
rdctype::str LayoutName;
struct VertexBuffer
{
VertexBuffer() : Buffer(), Stride(0), Offset(0) {}
ResourceId Buffer;
uint64_t Offset;
uint32_t Size;
uint32_t Stride;
uint32_t Offset;
};
rdctype::array<VertexBuffer> vbuffers;
@@ -65,137 +66,163 @@ struct D3D12PipelineState
{
IndexBuffer() : Buffer(), Offset(0) {}
ResourceId Buffer;
uint32_t Offset;
uint64_t Offset;
uint32_t Size;
} ibuffer;
uint32_t indexStripCutValue;
} m_IA;
struct ShaderStage
{
ShaderStage() : Shader(), customName(false), ShaderDetails(NULL), stage(eShaderStage_Vertex) {}
ResourceId Shader;
rdctype::str ShaderName;
bool32 customName;
ShaderStage() : Present(false), ShaderDetails(NULL), stage(eShaderStage_Vertex) {}
bool32 Present;
ShaderReflection *ShaderDetails;
ShaderBindpointMapping BindpointMapping;
ShaderStageType stage;
struct ResourceView
{
ResourceView()
: View(),
Resource(),
Format(),
Structured(false),
BufferStructCount(0),
ElementSize(0),
ElementOffset(0),
ElementWidth(0),
FirstElement(0),
NumElements(1),
Flags(0),
HighestMip(0),
NumMipLevels(1),
ArraySize(1),
FirstArraySlice(0)
{
}
ResourceId View;
ResourceId Resource;
rdctype::str Type;
ResourceFormat Format;
bool32 Structured;
uint32_t BufferStructCount;
uint32_t ElementSize;
// Buffer (SRV)
uint32_t ElementOffset;
uint32_t ElementWidth;
// Buffer (UAV)
uint32_t FirstElement;
uint32_t NumElements;
// BufferEx
uint32_t Flags;
// Texture
uint32_t HighestMip;
uint32_t NumMipLevels;
// Texture Array
uint32_t ArraySize;
uint32_t FirstArraySlice;
};
rdctype::array<ResourceView> SRVs;
rdctype::array<ResourceView> UAVs;
struct Sampler
{
Sampler()
: Samp(),
customSamplerName(false),
UseBorder(false),
UseComparison(false),
MaxAniso(0),
MaxLOD(0.0f),
MinLOD(0.0f),
MipLODBias(0.0f)
{
BorderColor[0] = BorderColor[1] = BorderColor[2] = BorderColor[3] = 0.0f;
}
ResourceId Samp;
rdctype::str SamplerName;
bool32 customSamplerName;
rdctype::str AddressU, AddressV, AddressW;
float BorderColor[4];
rdctype::str Comparison;
rdctype::str Filter;
bool32 UseBorder;
bool32 UseComparison;
uint32_t MaxAniso;
float MaxLOD;
float MinLOD;
float MipLODBias;
};
rdctype::array<Sampler> Samplers;
struct CBuffer
{
CBuffer() : Buffer(), VecOffset(0), VecCount(0) {}
ResourceId Buffer;
uint32_t VecOffset;
uint32_t VecCount;
};
rdctype::array<CBuffer> ConstantBuffers;
rdctype::array<rdctype::str> ClassInstances;
} m_VS, m_HS, m_DS, m_GS, m_PS, m_CS;
struct ResourceView
{
ResourceView()
: Resource(),
Format(),
BufferFlags(0),
BufferStructCount(0),
ElementSize(0),
FirstElement(0),
NumElements(1),
CounterByteOffset(0),
HighestMip(0),
NumMipLevels(1),
ArraySize(1),
FirstArraySlice(0),
MinLODClamp(0.0f)
{
swizzle[0] = eSwizzle_Red;
swizzle[1] = eSwizzle_Green;
swizzle[2] = eSwizzle_Blue;
swizzle[3] = eSwizzle_Alpha;
}
ResourceId Resource;
rdctype::str Type;
ResourceFormat Format;
TextureSwizzle swizzle[4];
uint32_t BufferFlags;
uint32_t BufferStructCount;
uint32_t ElementSize;
uint64_t FirstElement;
uint32_t NumElements;
ResourceId CounterResource;
uint64_t CounterByteOffset;
// Texture
uint32_t HighestMip;
uint32_t NumMipLevels;
// Texture Array
uint32_t ArraySize;
uint32_t FirstArraySlice;
float MinLODClamp;
};
struct Sampler
{
Sampler()
: UseBorder(false),
UseComparison(false),
MaxAniso(0),
MaxLOD(0.0f),
MinLOD(0.0f),
MipLODBias(0.0f)
{
BorderColor[0] = BorderColor[1] = BorderColor[2] = BorderColor[3] = 0.0f;
}
rdctype::str AddressU, AddressV, AddressW;
float BorderColor[4];
rdctype::str Comparison;
rdctype::str Filter;
bool32 UseBorder;
bool32 UseComparison;
uint32_t MaxAniso;
float MaxLOD;
float MinLOD;
float MipLODBias;
};
struct CBuffer
{
CBuffer() : Buffer(), Offset(0), ByteSize(0) {}
ResourceId Buffer;
uint64_t Offset;
uint32_t ByteSize;
};
struct RootSignature
{
ResourceId obj;
struct RootElem
{
ShaderStageBits VisibilityMask;
// true for root constants and root descriptors
bool32 RootElement;
// for tables this is the expanded list of all the ranges and their values, for
// root constants and root descriptors there's only one element with their value
struct Descriptor
{
uint32_t RegSpace;
uint32_t RegIndex;
ShaderBindType Type;
rdctype::array<uint32_t> Constants;
CBuffer ConstantBuffer;
ResourceView View;
};
rdctype::array<Descriptor> Descriptors;
};
rdctype::array<RootElem> Elements;
} m_RootSig;
struct Streamout
{
struct Output
{
Output() : Buffer(), Offset(0) {}
Output() : Buffer(), Offset(0), Size(0), WrittenCountBuffer(), WrittenCountOffset(0) {}
ResourceId Buffer;
uint32_t Offset;
uint64_t Offset;
uint64_t Size;
ResourceId WrittenCountBuffer;
uint64_t WrittenCountOffset;
};
rdctype::array<Output> Outputs;
} m_SO;
struct Rasterizer
{
Rasterizer() : SampleMask(~0U) {}
uint32_t SampleMask;
struct Viewport
{
Viewport() : Width(0.0f), Height(0.0f), MinDepth(0.0f), MaxDepth(0.0f), Enabled(false)
Viewport() : Width(0.0f), Height(0.0f), MinDepth(0.0f), MaxDepth(0.0f)
{
TopLeft[0] = 0.0f;
TopLeft[1] = 0.0f;
}
Viewport(float TX, float TY, float W, float H, float MN, float MX, bool en)
: Width(W), Height(H), MinDepth(MN), MaxDepth(MX), Enabled(en)
Viewport(float TX, float TY, float W, float H, float MN, float MX)
: Width(W), Height(H), MinDepth(MN), MaxDepth(MX)
{
TopLeft[0] = TX;
TopLeft[1] = TY;
@@ -203,41 +230,33 @@ struct D3D12PipelineState
float TopLeft[2];
float Width, Height;
float MinDepth, MaxDepth;
bool32 Enabled;
};
rdctype::array<Viewport> Viewports;
struct Scissor
{
Scissor() : left(0), top(0), right(0), bottom(0), Enabled(false) {}
Scissor(int l, int t, int r, int b, bool en)
: left(l), top(t), right(r), bottom(b), Enabled(en)
{
}
Scissor() : left(0), top(0), right(0), bottom(0) {}
Scissor(int l, int t, int r, int b) : left(l), top(t), right(r), bottom(b) {}
int32_t left, top, right, bottom;
bool32 Enabled;
};
rdctype::array<Scissor> Scissors;
struct RasterizerState
{
RasterizerState()
: State(),
FillMode(eFill_Solid),
: FillMode(eFill_Solid),
CullMode(eCull_None),
FrontCCW(false),
DepthBias(0),
DepthBiasClamp(0.0f),
SlopeScaledDepthBias(0.0f),
DepthClip(false),
ScissorEnable(false),
MultisampleEnable(false),
AntialiasedLineEnable(false),
ForcedSampleCount(0),
ConservativeRasterization(false)
{
}
ResourceId State;
TriangleFillMode FillMode;
TriangleCullMode CullMode;
bool32 FrontCCW;
@@ -245,7 +264,6 @@ struct D3D12PipelineState
float DepthBiasClamp;
float SlopeScaledDepthBias;
bool32 DepthClip;
bool32 ScissorEnable;
bool32 MultisampleEnable;
bool32 AntialiasedLineEnable;
uint32_t ForcedSampleCount;
@@ -255,23 +273,24 @@ struct D3D12PipelineState
struct OutputMerger
{
OutputMerger() : UAVStartSlot(0), DepthReadOnly(false), StencilReadOnly(false) {}
OutputMerger()
: DepthReadOnly(false), StencilReadOnly(false), multiSampleCount(1), multiSampleQuality(0)
{
}
struct DepthStencilState
{
DepthStencilState()
: State(),
: DepthWrites(false),
DepthEnable(false),
DepthWrites(false),
StencilEnable(false),
StencilReadMask(0),
StencilWriteMask(0),
StencilRef(0)
{
}
ResourceId State;
bool32 DepthEnable;
rdctype::str DepthFunc;
bool32 DepthWrites;
rdctype::str DepthFunc;
bool32 StencilEnable;
byte StencilReadMask;
byte StencilWriteMask;
@@ -289,13 +308,11 @@ struct D3D12PipelineState
struct BlendState
{
BlendState() : AlphaToCoverage(false), IndependentBlend(false), SampleMask(0)
BlendState() : AlphaToCoverage(false), IndependentBlend(false)
{
BlendFactor[0] = BlendFactor[1] = BlendFactor[2] = BlendFactor[3] = 0.0f;
}
ResourceId State;
bool32 AlphaToCoverage;
bool32 IndependentBlend;
@@ -318,16 +335,15 @@ struct D3D12PipelineState
rdctype::array<RTBlend> Blends;
float BlendFactor[4];
uint32_t SampleMask;
} m_BlendState;
rdctype::array<ShaderStage::ResourceView> RenderTargets;
rdctype::array<ResourceView> RenderTargets;
uint32_t UAVStartSlot;
rdctype::array<ShaderStage::ResourceView> UAVs;
ShaderStage::ResourceView DepthTarget;
ResourceView DepthTarget;
bool32 DepthReadOnly;
bool32 StencilReadOnly;
uint32_t multiSampleCount;
uint32_t multiSampleQuality;
} m_OM;
};
+1
View File
@@ -90,6 +90,7 @@ enum ShaderResourceType
enum ShaderBindType
{
eBindType_Unknown = 0,
eBindType_ConstantBuffer,
eBindType_Sampler,
eBindType_ImageSampler,
eBindType_ReadOnlyImage,
+2 -2
View File
@@ -326,8 +326,8 @@ APIProperties D3D12Replay::GetAPIProperties()
{
APIProperties ret;
ret.pipelineType = eGraphicsAPI_D3D11;
ret.localRenderer = eGraphicsAPI_D3D11;
ret.pipelineType = eGraphicsAPI_D3D12;
ret.localRenderer = eGraphicsAPI_D3D12;
ret.degraded = false;
return ret;
+2 -2
View File
@@ -3527,13 +3527,13 @@ void VulkanReplay::SavePipelineState()
dst.bindings[b].type = eBindType_ReadWriteTBuffer;
break;
case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER:
dst.bindings[b].type = eBindType_ReadOnlyBuffer;
dst.bindings[b].type = eBindType_ConstantBuffer;
break;
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER:
dst.bindings[b].type = eBindType_ReadWriteBuffer;
break;
case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC:
dst.bindings[b].type = eBindType_ReadOnlyBuffer;
dst.bindings[b].type = eBindType_ConstantBuffer;
dynamicOffset = true;
break;
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC:
+5 -2
View File
@@ -1643,9 +1643,12 @@ void ReplayRenderer::FetchPipelineState()
&m_D3D12PipelineState.m_GS, &m_D3D12PipelineState.m_PS, &m_D3D12PipelineState.m_CS,
};
const char *stageNames[] = {"VS", "HS", "DS", "GS", "PS", "CS"};
for(int i = 0; i < 6; i++)
if(stages[i]->Shader != ResourceId())
stages[i]->ShaderDetails = m_pDevice->GetShader(m_pDevice->GetLiveID(stages[i]->Shader), "");
if(stages[i]->Present)
stages[i]->ShaderDetails =
m_pDevice->GetShader(m_pDevice->GetLiveID(m_D3D12PipelineState.pipeline), stageNames[i]);
}
{
+121 -123
View File
@@ -31,19 +31,14 @@ namespace renderdoc
[StructLayout(LayoutKind.Sequential)]
public class D3D12PipelineState
{
public ResourceId pipeline;
public bool customName;
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string PipelineName;
[StructLayout(LayoutKind.Sequential)]
public class InputAssembler
{
private void PostMarshal()
{
if (_ptr_Bytecode != IntPtr.Zero)
Bytecode = (ShaderReflection)CustomMarshal.PtrToStructure(_ptr_Bytecode, typeof(ShaderReflection), false);
else
Bytecode = null;
_ptr_Bytecode = IntPtr.Zero;
}
[StructLayout(LayoutKind.Sequential)]
public class LayoutInput
{
@@ -59,20 +54,14 @@ namespace renderdoc
};
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public LayoutInput[] layouts;
public ResourceId layout;
private IntPtr _ptr_Bytecode;
[CustomMarshalAs(CustomUnmanagedType.Skip)]
public ShaderReflection Bytecode;
public bool customName;
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string LayoutName;
[StructLayout(LayoutKind.Sequential)]
public class VertexBuffer
{
public ResourceId Buffer;
public UInt64 Offset;
public UInt32 Size;
public UInt32 Stride;
public UInt32 Offset;
};
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public VertexBuffer[] vbuffers;
@@ -81,10 +70,13 @@ namespace renderdoc
public class IndexBuffer
{
public ResourceId Buffer;
public UInt32 Offset;
public UInt64 Offset;
public UInt32 Size;
};
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public IndexBuffer ibuffer;
public UInt32 indexStripCutValue;
};
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public InputAssembler m_IA;
@@ -103,9 +95,7 @@ namespace renderdoc
}
public ResourceId Shader;
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string ShaderName;
public bool customName;
public bool Present;
private IntPtr _ptr_ShaderDetails;
[CustomMarshalAs(CustomUnmanagedType.Skip)]
public ShaderReflection ShaderDetails;
@@ -113,95 +103,106 @@ namespace renderdoc
public ShaderBindpointMapping BindpointMapping;
public ShaderStageType stage;
[StructLayout(LayoutKind.Sequential)]
public class ResourceView
{
public ResourceId View;
public ResourceId Resource;
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string Type;
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public ResourceFormat Format;
public bool Structured;
public UInt32 BufferStructCount;
public UInt32 ElementSize;
// Buffer (SRV)
public UInt32 ElementOffset;
public UInt32 ElementWidth;
// Buffer (UAV)
public UInt32 FirstElement;
public UInt32 NumElements;
// BufferEx
public D3DBufferViewFlags Flags;
// Texture
public UInt32 HighestMip;
public UInt32 NumMipLevels;
// Texture Array
public UInt32 ArraySize;
public UInt32 FirstArraySlice;
};
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public ResourceView[] SRVs;
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public ResourceView[] UAVs;
[StructLayout(LayoutKind.Sequential)]
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)]
public float[] BorderColor;
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string Comparison;
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string Filter;
public bool UseBorder;
public bool UseComparison;
public UInt32 MaxAniso;
public float MaxLOD;
public float MinLOD;
public float MipLODBias;
};
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public Sampler[] Samplers;
[StructLayout(LayoutKind.Sequential)]
public class CBuffer
{
public ResourceId Buffer;
public UInt32 VecOffset;
public UInt32 VecCount;
};
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public CBuffer[] ConstantBuffers;
[StructLayout(LayoutKind.Sequential)]
public class ClassInstance
{
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
string name;
};
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public ClassInstance[] ClassInstances;
};
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public ShaderStage m_VS, m_HS, m_DS, m_GS, m_PS, m_CS;
[StructLayout(LayoutKind.Sequential)]
public class ResourceView
{
public ResourceId Resource;
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string Type;
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public ResourceFormat Format;
[CustomMarshalAs(CustomUnmanagedType.FixedArray, FixedLength = 4)]
public TextureSwizzle[] swizzle;
public D3DBufferViewFlags BufferFlags;
public UInt32 BufferStructCount;
public UInt32 ElementSize;
public UInt32 FirstElement;
public UInt32 NumElements;
public ResourceId CounterResource;
public UInt64 CounterByteOffset;
// Texture
public UInt32 HighestMip;
public UInt32 NumMipLevels;
// Texture Array
public UInt32 ArraySize;
public UInt32 FirstArraySlice;
public float MinLODClamp;
};
[StructLayout(LayoutKind.Sequential)]
public class Sampler
{
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string AddressU, AddressV, AddressW;
[CustomMarshalAs(CustomUnmanagedType.FixedArray, FixedLength = 4)]
public float[] BorderColor;
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string Comparison;
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string Filter;
public bool UseBorder;
public bool UseComparison;
public UInt32 MaxAniso;
public float MaxLOD;
public float MinLOD;
public float MipLODBias;
};
[StructLayout(LayoutKind.Sequential)]
public class CBuffer
{
public ResourceId Buffer;
public UInt64 Offset;
public UInt32 ByteSize;
};
[StructLayout(LayoutKind.Sequential)]
public class RootSignature
{
public ResourceId Obj;
[StructLayout(LayoutKind.Sequential)]
public class RootElem
{
public ShaderStageBits VisibilityMask;
public bool RootElement;
[StructLayout(LayoutKind.Sequential)]
public class Descriptor
{
public UInt32 RegSpace;
public UInt32 RegIndex;
public ShaderBindType Type;
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public UInt32[] Constants;
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
CBuffer ConstantBuffer;
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
ResourceView View;
};
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public Descriptor[] Descriptors;
};
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public RootElem[] Elements;
};
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public RootSignature m_RootSig;
[StructLayout(LayoutKind.Sequential)]
public class Streamout
{
@@ -209,7 +210,11 @@ namespace renderdoc
public class Output
{
public ResourceId Buffer;
public UInt32 Offset;
public UInt64 Offset;
public UInt64 Size;
public ResourceId WrittenCountBuffer;
public UInt64 WrittenCountOffset;
};
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public Output[] Outputs;
@@ -220,6 +225,8 @@ namespace renderdoc
[StructLayout(LayoutKind.Sequential)]
public class Rasterizer
{
public UInt32 SampleMask;
[StructLayout(LayoutKind.Sequential)]
public class Viewport
{
@@ -227,7 +234,6 @@ namespace renderdoc
public float[] TopLeft;
public float Width, Height;
public float MinDepth, MaxDepth;
public bool Enabled;
};
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public Viewport[] Viewports;
@@ -236,7 +242,6 @@ namespace renderdoc
public class Scissor
{
public Int32 left, top, right, bottom;
public bool Enabled;
};
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public Scissor[] Scissors;
@@ -244,7 +249,6 @@ namespace renderdoc
[StructLayout(LayoutKind.Sequential)]
public class RasterizerState
{
public ResourceId State;
public TriangleFillMode FillMode;
public TriangleCullMode CullMode;
public bool FrontCCW;
@@ -252,7 +256,6 @@ namespace renderdoc
public float DepthBiasClamp;
public float SlopeScaledDepthBias;
public bool DepthClip;
public bool ScissorEnable;
public bool MultisampleEnable;
public bool AntialiasedLineEnable;
public UInt32 ForcedSampleCount;
@@ -270,11 +273,10 @@ namespace renderdoc
[StructLayout(LayoutKind.Sequential)]
public class DepthStencilState
{
public ResourceId State;
public bool DepthEnable;
public bool DepthWrites;
[CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)]
public string DepthFunc;
public bool DepthWrites;
public bool StencilEnable;
public byte StencilReadMask;
public byte StencilWriteMask;
@@ -302,8 +304,6 @@ namespace renderdoc
[StructLayout(LayoutKind.Sequential)]
public class BlendState
{
public ResourceId State;
public bool AlphaToCoverage;
public bool IndependentBlend;
@@ -335,22 +335,20 @@ namespace renderdoc
[CustomMarshalAs(CustomUnmanagedType.FixedArray, FixedLength = 4)]
public float[] BlendFactor;
public UInt32 SampleMask;
};
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public BlendState m_BlendState;
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public ShaderStage.ResourceView[] RenderTargets;
public UInt32 UAVStartSlot;
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public ShaderStage.ResourceView[] UAVs;
public ResourceView[] RenderTargets;
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public ShaderStage.ResourceView DepthTarget;
public ResourceView DepthTarget;
public bool DepthReadOnly;
public bool StencilReadOnly;
public UInt32 multiSampleCount;
public UInt32 multiSampleQuality;
};
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public OutputMerger m_OM;
+2
View File
@@ -93,6 +93,7 @@ namespace renderdoc
public enum ShaderBindType
{
Unknown = 0,
ConstantBuffer,
Sampler,
ImageSampler,
ReadOnlyImage,
@@ -856,6 +857,7 @@ namespace renderdoc
{
switch (bindType)
{
case ShaderBindType.ConstantBuffer: return "Constants";
case ShaderBindType.Sampler: return "Sampler";
case ShaderBindType.ImageSampler: return "Image&Sampler";
case ShaderBindType.ReadOnlyImage: return "Image";
File diff suppressed because it is too large Load Diff
@@ -453,8 +453,7 @@ namespace renderdocui.Windows.PipelineState
if (!usedSlot && !stageBitsIncluded)
return;
// these are treated as uniform buffers
if (bindType == ShaderBindType.ReadOnlyBuffer)
if (bindType == ShaderBindType.ConstantBuffer)
return;
// TODO - check compatibility between bindType and shaderRes.resType ?
@@ -808,7 +807,7 @@ namespace renderdocui.Windows.PipelineState
}
VulkanPipelineState.Pipeline.DescriptorSet.DescriptorBinding.BindingElement[] slotBinds = null;
ShaderBindType bindType = ShaderBindType.ReadOnlyBuffer;
ShaderBindType bindType = ShaderBindType.ConstantBuffer;
ShaderStageBits stageBits = (ShaderStageBits)0;
if (bindset < pipe.DescSets.Length && bind < pipe.DescSets[bindset].bindings.Length)
@@ -825,8 +824,7 @@ namespace renderdocui.Windows.PipelineState
if (!usedSlot && !stageBitsIncluded)
return;
// these are treated as uniform buffers
if (bindType != ShaderBindType.ReadOnlyBuffer)
if (bindType != ShaderBindType.ConstantBuffer)
return;
// consider it filled if any array element is filled (or it's push constants)
@@ -1493,12 +1491,12 @@ namespace renderdocui.Windows.PipelineState
if (v.vp.Width == 0 || v.vp.Height == 0 || v.vp.MinDepth == v.vp.MaxDepth)
EmptyRow(node);
i++;
node = scissors.Nodes.Add(new object[] { i, v.scissor.x, v.scissor.y, v.scissor.width, v.scissor.height });
if (v.scissor.width == 0 || v.scissor.height == 0)
EmptyRow(node);
i++;
}
}