本文整理汇总了C#中ShaderStageType类的典型用法代码示例。如果您正苦于以下问题:C# ShaderStageType类的具体用法?C# ShaderStageType怎么用?C# ShaderStageType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ShaderStageType类属于命名空间,在下文中一共展示了ShaderStageType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ConstantBufferPreviewer
public ConstantBufferPreviewer(Core c, ShaderStageType stage, UInt32 slot, UInt32 idx)
{
InitializeComponent();
if (SystemInformation.HighContrast)
toolStrip1.Renderer = new ToolStripSystemRenderer();
m_Core = c;
Stage = stage;
Slot = slot;
ArrayIdx = idx;
shader = m_Core.CurPipelineState.GetShader(stage);
entryPoint = m_Core.CurPipelineState.GetShaderEntryPoint(stage);
UpdateLabels();
ulong offs = 0;
ulong size = 0;
m_Core.CurPipelineState.GetConstantBuffer(Stage, Slot, ArrayIdx, out cbuffer, out offs, out size);
m_Core.Renderer.BeginInvoke((ReplayRenderer r) =>
{
SetVariables(r.GetCBufferVariableContents(shader, entryPoint, Slot, cbuffer, offs));
});
m_Core.AddLogViewer(this);
}
开发者ID:Anteru,项目名称:renderdoc,代码行数:26,代码来源:ConstantBufferPreviewer.cs
示例2: Has
public static DockContent Has(ShaderStageType stage, UInt32 slot)
{
foreach (var cb in m_Docks)
{
if(cb.Stage == stage && cb.Slot == slot)
return cb as DockContent;
}
return null;
}
开发者ID:Lonesled,项目名称:renderdoc,代码行数:10,代码来源:ConstantBufferPreviewer.cs
示例3: ConstantBufferPreviewer
public ConstantBufferPreviewer(Core c, ShaderStageType stage, UInt32 slot, UInt32 idx)
{
InitializeComponent();
if (SystemInformation.HighContrast)
toolStrip1.Renderer = new ToolStripSystemRenderer();
m_Core = c;
Stage = stage;
Slot = slot;
ArrayIdx = idx;
shader = m_Core.CurPipelineState.GetShader(stage);
entryPoint = m_Core.CurPipelineState.GetShaderEntryPoint(stage);
UpdateLabels();
}
开发者ID:Nexuapex,项目名称:renderdoc,代码行数:15,代码来源:ConstantBufferPreviewer.cs
示例4: ConstantBufferPreviewer
public ConstantBufferPreviewer(Core c, ShaderStageType stage, UInt32 slot)
{
InitializeComponent();
m_Core = c;
Stage = stage;
Slot = slot;
shader = m_Core.CurPipelineState.GetShader(stage);
UpdateLabels();
uint offs = 0;
m_Core.CurPipelineState.GetConstantBuffer(Stage, Slot, out cbuffer, out offs);
m_Core.Renderer.BeginInvoke((ReplayRenderer r) =>
{
SetVariables(r.GetCBufferVariableContents(shader, Slot, cbuffer, offs));
});
m_Core.AddLogViewer(this);
}
开发者ID:Waferix,项目名称:renderdoc,代码行数:20,代码来源:ConstantBufferPreviewer.cs
示例5: GetResources
public ResourceId[] GetResources(ShaderStageType stage)
{
if (LogLoaded)
{
if (IsLogD3D11)
{
D3D11PipelineState.ShaderStage s = null;
switch (stage)
{
case ShaderStageType.Vertex: s = m_D3D11.m_VS; break;
case ShaderStageType.Domain: s = m_D3D11.m_DS; break;
case ShaderStageType.Hull: s = m_D3D11.m_HS; break;
case ShaderStageType.Geometry: s = m_D3D11.m_GS; break;
case ShaderStageType.Pixel: s = m_D3D11.m_PS; break;
case ShaderStageType.Compute: s = m_D3D11.m_CS; break;
}
ResourceId[] ret = new ResourceId[s.SRVs.Length];
for (int i = 0; i < s.SRVs.Length; i++)
ret[i] = s.SRVs[i].Resource;
return ret;
}
else if (IsLogGL)
{
ResourceId[] ret = new ResourceId[m_GL.Textures.Length];
for (int i = 0; i < m_GL.Textures.Length; i++)
ret[i] = m_GL.Textures[i].Resource;
return ret;
}
}
return null;
}
开发者ID:Waferix,项目名称:renderdoc,代码行数:36,代码来源:CommonPipelineState.cs
示例6: GetConstantBuffer
public void GetConstantBuffer(ShaderStageType stage, uint BindPoint, out ResourceId buf, out uint ByteOffset)
{
if (LogLoaded)
{
if (IsLogD3D11)
{
D3D11PipelineState.ShaderStage s = null;
switch (stage)
{
case ShaderStageType.Vertex: s = m_D3D11.m_VS; break;
case ShaderStageType.Domain: s = m_D3D11.m_DS; break;
case ShaderStageType.Hull: s = m_D3D11.m_HS; break;
case ShaderStageType.Geometry: s = m_D3D11.m_GS; break;
case ShaderStageType.Pixel: s = m_D3D11.m_PS; break;
case ShaderStageType.Compute: s = m_D3D11.m_CS; break;
}
buf = s.ConstantBuffers[BindPoint].Buffer;
ByteOffset = s.ConstantBuffers[BindPoint].VecOffset * 4 * sizeof(float);
return;
}
else if (IsLogGL)
{
buf = ResourceId.Null;
ByteOffset = 0;
return;
}
}
buf = ResourceId.Null;
ByteOffset = 0;
}
开发者ID:Waferix,项目名称:renderdoc,代码行数:35,代码来源:CommonPipelineState.cs
示例7: GetReflection
public static ShaderReflection GetReflection(Core core, ShaderStageType stage)
{
var curDraw = core.CurDrawcall;
bool copy, compute;
GetDrawContext(core, out copy, out compute);
if (copy)
return null;
else if (compute)
return core.CurPipelineState.GetShaderReflection(ShaderStageType.Compute);
else
return core.CurPipelineState.GetShaderReflection(stage);
}
开发者ID:Anteru,项目名称:renderdoc,代码行数:13,代码来源:TextureViewer.cs
示例8: BuildTargetShader
public ResourceId BuildTargetShader(string entry, string source, UInt32 compileFlags, ShaderStageType type, out string errors)
{
IntPtr mem = CustomMarshal.Alloc(typeof(templated_array));
ResourceId ret = ResourceId.Null;
bool success = ReplayRenderer_BuildTargetShader(m_Real, entry, source, compileFlags, type, ref ret, mem);
if (!success)
ret = ResourceId.Null;
errors = CustomMarshal.TemplatedArrayToUniString(mem, true);
CustomMarshal.Free(mem);
return ret;
}
开发者ID:Lonesled,项目名称:renderdoc,代码行数:17,代码来源:ReplayRenderer.cs
示例9: Has
public static DockContent Has(ShaderStageType stage, UInt32 slot)
{
foreach (var d in m_Docks)
{
ConstantBufferPreviewer cb = d.Controls[0] as ConstantBufferPreviewer;
if(cb.Stage == stage && cb.Slot == slot)
return cb.Parent as DockContent;
}
return null;
}
开发者ID:Waferix,项目名称:renderdoc,代码行数:12,代码来源:ConstantBufferPreviewer.cs
示例10: ShaderViewer
public ShaderViewer(Core core, ShaderReflection shader, ShaderStageType stage, ShaderDebugTrace trace, string debugContext)
{
InitializeComponent();
constantRegs.Font =
variableRegs.Font =
watchRegs.Font =
inSig.Font =
outSig.Font =
core.Config.PreferredFont;
Icon = global::renderdocui.Properties.Resources.icon;
this.SuspendLayout();
mainLayout.Dock = DockStyle.Fill;
constantRegs.Font =
variableRegs.Font =
watchRegs.Font =
inSig.Font =
outSig.Font =
core.Config.PreferredFont;
m_Core = core;
m_ShaderDetails = shader;
m_Trace = trace;
m_Stage = null;
switch (stage)
{
case ShaderStageType.Vertex: m_Stage = m_Core.CurD3D11PipelineState.m_VS; break;
case ShaderStageType.Domain: m_Stage = m_Core.CurD3D11PipelineState.m_DS; break;
case ShaderStageType.Hull: m_Stage = m_Core.CurD3D11PipelineState.m_HS; break;
case ShaderStageType.Geometry: m_Stage = m_Core.CurD3D11PipelineState.m_GS; break;
case ShaderStageType.Pixel: m_Stage = m_Core.CurD3D11PipelineState.m_PS; break;
case ShaderStageType.Compute: m_Stage = m_Core.CurD3D11PipelineState.m_CS; break;
}
if (trace != null)
Text = String.Format("Debugging {0} - {1}", m_Core.CurPipelineState.GetShaderName(stage), debugContext);
else
Text = m_Core.CurPipelineState.GetShaderName(stage);
var disasm = shader.Disassembly;
if (m_Core.Config.ShaderViewer_FriendlyNaming)
{
for (int i = 0; i < m_ShaderDetails.ConstantBlocks.Length; i++)
{
var stem = string.Format("cb{0}", i);
var cbuf = m_ShaderDetails.ConstantBlocks[i];
if (cbuf.variables.Length == 0)
continue;
disasm = FriendlyName(disasm, stem, "", cbuf.variables);
}
foreach (var r in m_ShaderDetails.Resources)
{
if (r.IsSRV)
{
var needle = string.Format(", t{0}([^0-9])", r.bindPoint);
var replacement = string.Format(", {0}$1", r.name);
Regex rgx = new Regex(needle);
disasm = rgx.Replace(disasm, replacement);
}
if (r.IsSampler)
{
var needle = string.Format(", s{0}([^0-9])", r.bindPoint);
var replacement = string.Format(", {0}$1", r.name);
Regex rgx = new Regex(needle);
disasm = rgx.Replace(disasm, replacement);
}
if (r.IsReadWrite)
{
var needle = string.Format(", u{0}([^0-9])", r.bindPoint);
var replacement = string.Format(", {0}$1", r.name);
Regex rgx = new Regex(needle);
disasm = rgx.Replace(disasm, replacement);
}
}
}
{
m_DisassemblyView = MakeEditor("scintillaDisassem", disasm, false);
m_DisassemblyView.IsReadOnly = true;
m_DisassemblyView.TabIndex = 0;
m_DisassemblyView.KeyDown += new KeyEventHandler(m_DisassemblyView_KeyDown);
m_DisassemblyView.KeyDown += new KeyEventHandler(readonlyScintilla_KeyDown);
m_DisassemblyView.Markers[CURRENT_MARKER].BackColor = System.Drawing.Color.LightCoral;
m_DisassemblyView.Markers[CURRENT_MARKER].Symbol = ScintillaNET.MarkerSymbol.Background;
m_DisassemblyView.Markers[CURRENT_MARKER+1].BackColor = System.Drawing.Color.LightCoral;
m_DisassemblyView.Markers[CURRENT_MARKER+1].Symbol = ScintillaNET.MarkerSymbol.ShortArrow;
//.........这里部分代码省略.........
开发者ID:tomas-k,项目名称:renderdoc,代码行数:101,代码来源:ShaderViewer.cs
示例11: ReplayRenderer_BuildTargetShader
private static extern void ReplayRenderer_BuildTargetShader(IntPtr real, IntPtr entry, IntPtr source, UInt32 compileFlags, ShaderStageType type, ref ResourceId shaderID, IntPtr errorMem);
开发者ID:nsurface,项目名称:renderdoc,代码行数:1,代码来源:ReplayRenderer.cs
示例12: GetShaderEntryPoint
public String GetShaderEntryPoint(ShaderStageType stage)
{
if (LogLoaded && IsLogVK)
{
switch (stage)
{
case ShaderStageType.Vertex: return m_Vulkan.VS.entryPoint;
case ShaderStageType.Tess_Control: return m_Vulkan.TCS.entryPoint;
case ShaderStageType.Tess_Eval: return m_Vulkan.TES.entryPoint;
case ShaderStageType.Geometry: return m_Vulkan.GS.entryPoint;
case ShaderStageType.Fragment: return m_Vulkan.FS.entryPoint;
case ShaderStageType.Compute: return m_Vulkan.CS.entryPoint;
}
}
return "";
}
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:17,代码来源:CommonPipelineState.cs
示例13: GetReadWriteResources
public Dictionary<BindpointMap, BoundResource[]> GetReadWriteResources(ShaderStageType stage)
{
var ret = new Dictionary<BindpointMap, BoundResource[]>();
if (LogLoaded)
{
if (IsLogD3D11)
{
if (stage == ShaderStageType.Compute)
{
for (int i = 0; i < m_D3D11.m_CS.UAVs.Length; i++)
{
var key = new BindpointMap(0, i);
var val = new BoundResource();
val.Id = m_D3D11.m_CS.UAVs[i].Resource;
val.HighestMip = (int)m_D3D11.m_CS.UAVs[i].HighestMip;
val.FirstSlice = (int)m_D3D11.m_CS.UAVs[i].FirstArraySlice;
val.typeHint = m_D3D11.m_CS.UAVs[i].Format.compType;
ret.Add(key, new BoundResource[] { val });
}
}
else
{
for (int i = 0; i < m_D3D11.m_OM.UAVs.Length; i++)
{
var key = new BindpointMap(0, i);
var val = new BoundResource();
val.Id = m_D3D11.m_OM.UAVs[i].Resource;
val.HighestMip = (int)m_D3D11.m_OM.UAVs[i].HighestMip;
val.FirstSlice = (int)m_D3D11.m_OM.UAVs[i].FirstArraySlice;
val.typeHint = FormatComponentType.None;
ret.Add(key, new BoundResource[] { val });
}
}
return ret;
}
else if (IsLogGL)
{
for (int i = 0; i < m_GL.Images.Length; i++)
{
var key = new BindpointMap(0, i);
var val = new BoundResource();
val.Id = m_GL.Images[i].Resource;
val.HighestMip = (int)m_GL.Images[i].Level;
val.FirstSlice = (int)m_GL.Images[i].Layer;
val.typeHint = m_GL.Images[i].Format.compType;
ret.Add(key, new BoundResource[] { val });
}
return ret;
}
else if (IsLogVK)
{
VulkanPipelineState.Pipeline.DescriptorSet[] descsets = m_Vulkan.graphics.DescSets;
if (stage == ShaderStageType.Compute)
descsets = m_Vulkan.compute.DescSets;
ShaderStageBits mask = (ShaderStageBits)(1 << (int)stage);
for (int set = 0; set < descsets.Length; set++)
{
var descset = descsets[set];
for (int slot = 0; slot < descset.bindings.Length; slot++)
{
var bind = descset.bindings[slot];
if ((bind.type == ShaderBindType.ReadWriteBuffer ||
bind.type == ShaderBindType.ReadWriteImage ||
bind.type == ShaderBindType.ReadWriteTBuffer
) && (bind.stageFlags & mask) == mask)
{
var key = new BindpointMap(set, slot);
var val = new BoundResource[bind.descriptorCount];
for (UInt32 i = 0; i < bind.descriptorCount; i++)
{
val[i] = new BoundResource();
val[i].Id = bind.binds[i].res;
val[i].HighestMip = (int)bind.binds[i].baseMip;
val[i].FirstSlice = (int)bind.binds[i].baseLayer;
val[i].typeHint = bind.binds[i].viewfmt.compType;
}
ret.Add(key, val);
}
}
}
return ret;
}
}
return ret;
//.........这里部分代码省略.........
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:101,代码来源:CommonPipelineState.cs
示例14: GetReadOnlyResources
public Dictionary<BindpointMap, BoundResource[]> GetReadOnlyResources(ShaderStageType stage)
{
var ret = new Dictionary<BindpointMap, BoundResource[]>();
if (LogLoaded)
{
if (IsLogD3D11)
{
D3D11PipelineState.ShaderStage s = null;
switch (stage)
{
case ShaderStageType.Vertex: s = m_D3D11.m_VS; break;
case ShaderStageType.Domain: s = m_D3D11.m_DS; break;
case ShaderStageType.Hull: s = m_D3D11.m_HS; break;
case ShaderStageType.Geometry: s = m_D3D11.m_GS; break;
case ShaderStageType.Pixel: s = m_D3D11.m_PS; break;
case ShaderStageType.Compute: s = m_D3D11.m_CS; break;
}
for (int i = 0; i < s.SRVs.Length; i++)
{
var key = new BindpointMap(0, i);
var val = new BoundResource();
val.Id = s.SRVs[i].Resource;
val.HighestMip = (int)s.SRVs[i].HighestMip;
val.FirstSlice = (int)s.SRVs[i].FirstArraySlice;
val.typeHint = s.SRVs[i].Format.compType;
ret.Add(key, new BoundResource[] { val });
}
return ret;
}
else if (IsLogGL)
{
for (int i = 0; i < m_GL.Textures.Length; i++)
{
var key = new BindpointMap(0, i);
var val = new BoundResource();
val.Id = m_GL.Textures[i].Resource;
val.HighestMip = (int)m_GL.Textures[i].HighestMip;
val.FirstSlice = (int)m_GL.Textures[i].FirstSlice;
val.typeHint = FormatComponentType.None;
ret.Add(key, new BoundResource[] { val });
}
return ret;
}
else if (IsLogVK)
{
VulkanPipelineState.Pipeline.DescriptorSet[] descsets = m_Vulkan.graphics.DescSets;
if (stage == ShaderStageType.Compute)
descsets = m_Vulkan.compute.DescSets;
ShaderStageBits mask = (ShaderStageBits)(1 << (int)stage);
for (int set = 0; set < descsets.Length; set++)
{
var descset = descsets[set];
for (int slot = 0; slot < descset.bindings.Length; slot++)
{
var bind = descset.bindings[slot];
if ((bind.type == ShaderBindType.ImageSampler ||
bind.type == ShaderBindType.InputAttachment ||
bind.type == ShaderBindType.ReadOnlyImage ||
bind.type == ShaderBindType.ReadOnlyTBuffer
) && (bind.stageFlags & mask) == mask)
{
var key = new BindpointMap(set, slot);
var val = new BoundResource[bind.descriptorCount];
for (UInt32 i = 0; i < bind.descriptorCount; i++)
{
val[i] = new BoundResource();
val[i].Id = bind.binds[i].res;
val[i].HighestMip = (int)bind.binds[i].baseMip;
val[i].FirstSlice = (int)bind.binds[i].baseLayer;
val[i].typeHint = bind.binds[i].viewfmt.compType;
}
ret.Add(key, val);
}
}
}
return ret;
}
}
return ret;
}
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:96,代码来源:CommonPipelineState.cs
示例15: GetConstantBuffer
public void GetConstantBuffer(ShaderStageType stage, uint BufIdx, uint ArrayIdx, out ResourceId buf, out ulong ByteOffset, out ulong ByteSize)
{
if (LogLoaded)
{
if (IsLogD3D11)
{
D3D11PipelineState.ShaderStage s = null;
switch (stage)
{
case ShaderStageType.Vertex: s = m_D3D11.m_VS; break;
case ShaderStageType.Domain: s = m_D3D11.m_DS; break;
case ShaderStageType.Hull: s = m_D3D11.m_HS; break;
case ShaderStageType.Geometry: s = m_D3D11.m_GS; break;
case ShaderStageType.Pixel: s = m_D3D11.m_PS; break;
case ShaderStageType.Compute: s = m_D3D11.m_CS; break;
}
if(BufIdx < s.ConstantBuffers.Length)
{
buf = s.ConstantBuffers[BufIdx].Buffer;
ByteOffset = (ulong)(s.ConstantBuffers[BufIdx].VecOffset * 4 * sizeof(float));
ByteSize = (ulong)(s.ConstantBuffers[BufIdx].VecCount * 4 * sizeof(float));
return;
}
}
else if (IsLogGL)
{
GLPipelineState.ShaderStage s = null;
switch (stage)
{
case ShaderStageType.Vertex: s = m_GL.m_VS; break;
case ShaderStageType.Tess_Control: s = m_GL.m_TCS; break;
case ShaderStageType.Tess_Eval: s = m_GL.m_TES; break;
case ShaderStageType.Geometry: s = m_GL.m_GS; break;
case ShaderStageType.Fragment: s = m_GL.m_FS; break;
case ShaderStageType.Compute: s = m_GL.m_CS; break;
}
if(s.ShaderDetails != null && BufIdx < s.ShaderDetails.ConstantBlocks.Length)
{
if (s.ShaderDetails.ConstantBlocks[BufIdx].bindPoint >= 0)
{
int uboIdx = s.BindpointMapping.ConstantBlocks[s.ShaderDetails.ConstantBlocks[BufIdx].bindPoint].bind;
if (uboIdx >= 0 && uboIdx < m_GL.UniformBuffers.Length)
{
var b = m_GL.UniformBuffers[uboIdx];
buf = b.Resource;
ByteOffset = b.Offset;
ByteSize = b.Size;
return;
}
}
}
}
else if (IsLogVK)
{
VulkanPipelineState.Pipeline pipe = m_Vulkan.graphics;
if (stage == ShaderStageType.Compute)
pipe = m_Vulkan.compute;
VulkanPipelineState.ShaderStage s = null;
switch (stage)
{
case ShaderStageType.Vertex: s = m_Vulkan.VS; break;
case ShaderStageType.Tess_Control: s = m_Vulkan.TCS; break;
case ShaderStageType.Tess_Eval: s = m_Vulkan.TES; break;
case ShaderStageType.Geometry: s = m_Vulkan.GS; break;
case ShaderStageType.Fragment: s = m_Vulkan.FS; break;
case ShaderStageType.Compute: s = m_Vulkan.CS; break;
}
if (s.ShaderDetails != null && BufIdx < s.ShaderDetails.ConstantBlocks.Length)
{
var bind = s.BindpointMapping.ConstantBlocks[s.ShaderDetails.ConstantBlocks[BufIdx].bindPoint];
if (s.ShaderDetails.ConstantBlocks[BufIdx].bufferBacked == false)
{
// dummy values, it would be nice to fetch these properly
buf = ResourceId.Null;
ByteOffset = 0;
ByteSize = 1024;
return;
}
var descriptorBind = pipe.DescSets[bind.bindset].bindings[bind.bind].binds[ArrayIdx];
buf = descriptorBind.res;
ByteOffset = descriptorBind.offset;
ByteSize = descriptorBind.size;
return;
}
}
}
//.........这里部分代码省略.........
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:101,代码来源:CommonPipelineState.cs
示例16: Abbrev
public string Abbrev(ShaderStageType stage)
{
if (IsLogD3D11 || (!LogLoaded && DefaultType == APIPipelineStateType.D3D11))
{
switch (stage)
{
case ShaderStageType.Vertex: return "VS";
case ShaderStageType.Hull: return "HS";
case ShaderStageType.Domain: return "DS";
case ShaderStageType.Geometry: return "GS";
case ShaderStageType.Pixel: return "PS";
case ShaderStageType.Compute: return "CS";
}
}
else if (IsLogGL || (!LogLoaded && DefaultType == APIPipelineStateType.OpenGL) ||
IsLogVK || (!LogLoaded && DefaultType == APIPipelineStateType.Vulkan))
{
switch (stage)
{
case ShaderStageType.Vertex: return "VS";
case ShaderStageType.Tess_Control: return "TCS";
case ShaderStageType.Tess_Eval: return "TES";
case ShaderStageType.Geometry: return "GS";
case ShaderStageType.Fragment: return "FS";
case ShaderStageType.Compute: return "CS";
}
}
return "?S";
}
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:30,代码来源:CommonPipelineState.cs
示例17: GetShaderName
public string GetShaderName(ShaderStageType stage)
{
if (LogLoaded)
{
if (IsLogD3D11)
{
switch (stage)
{
case ShaderStageType.Vertex: return m_D3D11.m_VS.ShaderName;
case ShaderStageType.Domain: return m_D3D11.m_DS.ShaderName;
case ShaderStageType.Hull: return m_D3D11.m_HS.ShaderName;
case ShaderStageType.Geometry: return m_D3D11.m_GS.ShaderName;
case ShaderStageType.Pixel: return m_D3D11.m_PS.ShaderName;
case ShaderStageType.Compute: return m_D3D11.m_CS.ShaderName;
}
}
else if (IsLogD3D12)
{
switch (stage)
{
case ShaderStageType.Vertex: return m_D3D12.PipelineName + " VS";
case ShaderStageType.Domain: return m_D3D12.PipelineName + " DS";
case ShaderStageType.Hull: return m_D3D12.PipelineName + " HS";
case ShaderStageType.Geometry: return m_D3D12.PipelineName + " GS";
case ShaderStageType.Pixel: return m_D3D12.PipelineName + " PS";
case ShaderStageType.Compute: return m_D3D12.PipelineName + " CS";
}
}
else if (IsLogGL)
{
switch (stage)
{
case ShaderStageType.Vertex: return m_GL.m_VS.ShaderName;
case ShaderStageType.Tess_Control: return m_GL.m_TCS.ShaderName;
case ShaderStageType.Tess_Eval: return m_GL.m_TES.ShaderName;
case ShaderStageType.Geometry: return m_GL.m_GS.ShaderName;
case ShaderStageType.Fragment: return m_GL.m_FS.ShaderName;
case ShaderStageType.Compute: return m_GL.m_CS.ShaderName;
}
}
else if (IsLogVK)
{
switch (stage)
{
case ShaderStageType.Vertex: return m_Vulkan.VS.ShaderName;
case ShaderStageType.Domain: return m_Vulkan.TCS.ShaderName;
case ShaderStageType.Hull: return m_Vulkan.TES.ShaderName;
case ShaderStageType.Geometry: return m_Vulkan.GS.ShaderName;
case ShaderStageType.Pixel: return m_Vulkan.FS.ShaderName;
case ShaderStageType.Compute: return m_Vulkan.CS.ShaderName;
}
}
}
return "";
}
开发者ID:Nexuapex,项目名称:renderdoc,代码行数:56,代码来源:CommonPipelineState.cs
示例18: GetShader
public ResourceId GetShader(ShaderStageType stage)
{
if (LogLoaded)
{
if (IsLogD3D11)
{
switch (stage)
{
case ShaderStageType.Vertex: return m_D3D11.m_VS.Shader;
case ShaderStageType.Domain: return m_D3D11.m_DS.Shader;
case ShaderStageType.Hull: return m_D3D11.m_HS.Shader;
case ShaderStageType.Geometry: return m_D3D11.m_GS.Shader;
case ShaderStageType.Pixel: return m_D3D11.m_PS.Shader;
case ShaderStageType.Compute: return m_D3D11.m_CS.Shader;
}
}
else if (IsLogGL)
{
switch (stage)
{
case ShaderStageType.Vertex: return m_GL.m_VS.Shader;
case ShaderStageType.Tess_Control: return m_GL.m_TCS.Shader;
case ShaderStageType.Tess_Eval: return m_GL.m_TES.Shader;
case ShaderStageType.Geometry: return m_GL.m_GS.Shader;
case ShaderStageType.Fragment: return m_GL.m_FS.Shader;
case ShaderStageType.Compute: return m_GL.m_CS.Shader;
}
}
}
return ResourceId.Null;
}
开发者ID:Waferix,项目名称:renderdoc,代码行数:32,代码来源:CommonPipelineState.cs
示例19: GetShaderReflection
// there's a lot of redundancy in these functions
public ShaderReflection GetShaderReflection(ShaderStageType stage)
{
if (LogLoaded)
{
if (IsLogD3D11)
{
switch (stage)
{
case ShaderStageType.Vertex: return m_D3D11.m_VS.ShaderDetails;
case ShaderStageType.Domain: return m_D3D11.m_DS.ShaderDetails;
case ShaderStageType.Hull: return m_D3D11.m_HS.ShaderDetails;
case ShaderStageType.Geometry: return m_D3D11.m_GS.ShaderDetails;
case ShaderStageType.Pixel: return m_D3D11.m_PS.ShaderDetails;
case ShaderStageType.Compute: return m_D3D11.m_CS.ShaderDetails;
}
}
else if (IsLogGL)
{
switch (stage)
{
case ShaderStageType.Vertex: return m_GL.m_VS.ShaderDetails;
case ShaderStageType.Tess_Control: return m_GL.m_TCS.ShaderDetails;
case ShaderStageType.Tess_Eval: return m_GL.m_TES.ShaderDetails;
case ShaderStageType.Geometry: return m_GL.m_GS.ShaderDetails;
case ShaderStageType.Fragment: return m_GL.m_FS.ShaderDetails;
case ShaderStageType.Compute: return m_GL.m_CS.ShaderDetails;
}
}
}
return null;
}
开发者ID:Waferix,项目名称:renderdoc,代码行数:33,代码来源:CommonPipelineState.cs
示例20: BuildTargetShader
public ResourceId BuildTargetShader(string entry, string source, UInt32 compileFlags, ShaderStageType type, out string errors)
{
IntPtr mem = CustomMarshal.Alloc(typeof(templated_array));
ResourceId ret = ResourceId.Null;
IntPtr entry_mem = CustomMarshal.MakeUTF8String(entry);
IntPtr source_mem = CustomMarshal.MakeUTF8String(source);
ReplayRenderer_BuildTargetShader(m_Real, entry_mem, source_mem, compileFlags, type, ref ret, mem);
CustomMarshal.Free(entry_mem);
CustomMarshal.Free(source_mem);
errors = CustomMarshal.TemplatedArrayToString(mem, true);
CustomMarshal.Free(mem);
return ret;
}
开发者ID:nsurface,项目名称:renderdoc,代码行数:20,代码来源:ReplayRenderer.cs
注:本文中的ShaderStageType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论