本文整理汇总了C#中renderdoc.D3D11PipelineState类的典型用法代码示例。如果您正苦于以下问题:C# D3D11PipelineState类的具体用法?C# D3D11PipelineState怎么用?C# D3D11PipelineState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
D3D11PipelineState类属于renderdoc命名空间,在下文中一共展示了D3D11PipelineState类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ExportViewHTML
private object[] ExportViewHTML(D3D11PipelineState.ShaderStage.ResourceView view, int i, ShaderReflection refl, string extraParams)
{
FetchTexture[] texs = m_Core.CurTextures;
FetchBuffer[] bufs = m_Core.CurBuffers;
ShaderResource shaderInput = null;
bool rw = false;
if (refl != null)
{
foreach (var bind in refl.ReadOnlyResources)
{
if (bind.bindPoint == i)
{
shaderInput = bind;
break;
}
}
foreach (var bind in refl.ReadWriteResources)
{
if (bind.bindPoint == i)
{
shaderInput = bind;
rw = true;
break;
}
}
}
string name = "Empty";
string typename = "Unknown";
string format = "Unknown";
UInt64 w = 1;
UInt32 h = 1, d = 1;
UInt32 a = 0;
string viewFormat = view.Format.ToString();
FetchTexture tex = null;
FetchBuffer buf = null;
// check to see if it's a texture
for (int t = 0; t < texs.Length; t++)
{
if (texs[t].ID == view.Resource)
{
w = texs[t].width;
h = texs[t].height;
d = texs[t].depth;
a = texs[t].arraysize;
format = texs[t].format.ToString();
name = texs[t].name;
typename = texs[t].resType.ToString();
tex = texs[t];
}
}
// if not a texture, it must be a buffer
for (int t = 0; t < bufs.Length; t++)
{
if (bufs[t].ID == view.Resource)
{
w = bufs[t].length;
h = 0;
d = 0;
a = 0;
format = view.Format.ToString();
name = bufs[t].name;
typename = "Buffer";
// for structured buffers, display how many 'elements' there are in the buffer
if (view.ElementSize > 0)
{
typename = (rw ? "RWStructuredBuffer" : "StructuredBuffer") + "[" + (bufs[t].length / view.ElementSize) + "]";
}
else if (view.Flags.HasFlag(D3D11BufferViewFlags.Raw))
{
typename = rw ? "RWByteAddressBuffer" : "ByteAddressBuffer";
}
if (view.Flags.HasFlag(D3D11BufferViewFlags.Append) || view.Flags.HasFlag(D3D11BufferViewFlags.Counter))
{
typename += " (Count: " + view.BufferStructCount + ")";
}
if (shaderInput != null && !shaderInput.IsTexture)
{
if (view.Format.compType == FormatComponentType.None)
{
if (shaderInput.variableType.members.Length > 0)
viewFormat = format = "struct " + shaderInput.variableType.Name;
else
viewFormat = format = shaderInput.variableType.Name;
}
else
{
format = view.Format.ToString();
}
//.........这里部分代码省略.........
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:101,代码来源:D3D11PipelineStateViewer.cs
示例2: HasImportantViewParams
private bool HasImportantViewParams(D3D11PipelineState.ShaderStage.ResourceView view, FetchTexture tex)
{
// we don't count 'upgrade typeless to typed' as important, we just display the typed format
// in the row since there's no real hidden important information there. The formats can't be
// different for any other reason (if the SRV format differs from the texture format, the
// texture must have been typeless.
if (view.HighestMip > 0 || view.FirstArraySlice > 0 ||
(view.NumMipLevels < tex.mips && tex.mips > 1) ||
(view.ArraySize < tex.arraysize && tex.arraysize > 1))
return true;
// in the case of the swapchain case, types can be different and it won't have shown
// up as taking the view's format because the swapchain already has one. Make sure to mark it
// as important
if (view.Format.compType != FormatComponentType.None && view.Format != tex.format)
return true;
return false;
}
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:19,代码来源:D3D11PipelineStateViewer.cs
示例3: ExportHTML
private void ExportHTML(XmlTextWriter writer, D3D11PipelineState.Rasterizer rs)
{
{
writer.WriteStartElement("h3");
writer.WriteString("States");
writer.WriteEndElement();
ExportHTMLTable(writer,
new string[] { "Fill Mode", "Cull Mode", "Front CCW" },
new object[] { rs.m_State.FillMode, rs.m_State.CullMode, rs.m_State.FrontCCW ? "Yes" : "No" });
writer.WriteStartElement("p");
writer.WriteEndElement();
ExportHTMLTable(writer,
new string[] { "Scissor Enable", "Line AA Enable", "Multisample Enable", "Forced Sample Count", "Conservative Raster" },
new object[] { rs.m_State.ScissorEnable ? "Yes" : "No", rs.m_State.AntialiasedLineEnable ? "Yes" : "No",
rs.m_State.MultisampleEnable ? "Yes" : "No", rs.m_State.ForcedSampleCount,
rs.m_State.ConservativeRasterization ? "Yes" : "No" });
writer.WriteStartElement("p");
writer.WriteEndElement();
ExportHTMLTable(writer,
new string[] { "Depth Clip", "Depth Bias", "Depth Bias Clamp", "Slope Scaled Bias" },
new object[] { rs.m_State.DepthClip ? "Yes" : "No", rs.m_State.DepthBias,
Formatter.Format(rs.m_State.DepthBiasClamp), Formatter.Format(rs.m_State.SlopeScaledDepthBias)});
}
{
writer.WriteStartElement("h3");
writer.WriteString("Viewports");
writer.WriteEndElement();
List<object[]> rows = new List<object[]>();
int i = 0;
foreach (var v in rs.Viewports)
{
if (v.Width == v.Height && v.Width == 0 && v.Height == 0) continue;
rows.Add(new object[] { i, v.TopLeft[0], v.TopLeft[1], v.Width, v.Height, v.MinDepth, v.MaxDepth });
i++;
}
ExportHTMLTable(writer, new string[] { "Slot", "X", "Y", "Width", "Height", "Min Depth", "Max Depth" }, rows.ToArray());
}
{
writer.WriteStartElement("h3");
writer.WriteString("Scissors");
writer.WriteEndElement();
List<object[]> rows = new List<object[]>();
int i = 0;
foreach (var s in rs.Scissors)
{
if (s.right == 0 && s.bottom == 0) continue;
rows.Add(new object[] { i, s.left, s.top, s.right - s.left, s.bottom - s.top });
i++;
}
ExportHTMLTable(writer, new string[] { "Slot", "X", "Y", "Width", "Height" }, rows.ToArray());
}
}
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:69,代码来源:D3D11PipelineStateViewer.cs
示例4: ShowCBuffer
private void ShowCBuffer(D3D11PipelineState.ShaderStage stage, UInt32 slot)
{
var existing = ConstantBufferPreviewer.Has(stage.stage, slot);
if (existing != null)
{
existing.Show();
return;
}
var prev = new ConstantBufferPreviewer(m_Core, stage.stage, slot);
var dock = Helpers.WrapDockContent(m_DockContent.DockPanel, prev);
dock.DockState = DockState.DockRight;
dock.DockAreas |= DockAreas.Float;
ConstantBufferPreviewer.ShowDock(dock, m_DockContent.Pane, DockAlignment.Right, 0.3);
}
开发者ID:n1nj4n,项目名称:renderdoc,代码行数:16,代码来源:D3D11PipelineStateViewer.cs
示例5: ViewTexTag
public ViewTexTag(D3D11PipelineState.ShaderStage.ResourceView v, FetchTexture t)
{
view = v;
tex = t;
}
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:5,代码来源:D3D11PipelineStateViewer.cs
示例6: ShowCBuffer
private void ShowCBuffer(D3D11PipelineState.ShaderStage stage, UInt32 bindPoint)
{
bool found = false;
UInt32 slot = UInt32.MaxValue;
if (stage.ShaderDetails != null)
{
UInt32 i = 0;
foreach (var cb in stage.ShaderDetails.ConstantBlocks)
{
if (cb.bindPoint == bindPoint)
{
slot = i;
found = true;
break;
}
i++;
}
}
if (!found)
{
// unused cbuffer, open regular buffer viewer
var viewer = new BufferViewer(m_Core, false);
if (stage.ConstantBuffers.Length < bindPoint)
return;
var buf = stage.ConstantBuffers[bindPoint];
viewer.ViewRawBuffer(true, buf.VecOffset * 4 * sizeof(float), buf.VecCount * 4 * sizeof(float), buf.Buffer);
viewer.Show(m_DockContent.DockPanel);
return;
}
var existing = ConstantBufferPreviewer.Has(stage.stage, slot, 0);
if (existing != null)
{
existing.Show();
return;
}
var prev = new ConstantBufferPreviewer(m_Core, stage.stage, slot, 0);
prev.ShowDock(m_DockContent.Pane, DockAlignment.Right, 0.3);
}
开发者ID:Nexuapex,项目名称:renderdoc,代码行数:47,代码来源:D3D11PipelineStateViewer.cs
示例7: ShowCBuffer
private void ShowCBuffer(D3D11PipelineState.ShaderStage stage, UInt32 slot)
{
if (stage.ShaderDetails != null &&
(stage.ShaderDetails.ConstantBlocks.Length <= slot ||
stage.ShaderDetails.ConstantBlocks[slot].name.Length == 0)
)
{
// unused cbuffer, open regular buffer viewer
var viewer = new BufferViewer(m_Core, false);
if (stage.ConstantBuffers.Length < slot)
return;
var buf = stage.ConstantBuffers[slot];
viewer.ViewRawBuffer(true, buf.VecOffset * 4 * sizeof(float), buf.VecCount * 4 * sizeof(float), buf.Buffer);
viewer.Show(m_DockContent.DockPanel);
return;
}
var existing = ConstantBufferPreviewer.Has(stage.stage, slot, 0);
if (existing != null)
{
existing.Show();
return;
}
var prev = new ConstantBufferPreviewer(m_Core, stage.stage, slot, 0);
prev.ShowDock(m_DockContent.Pane, DockAlignment.Right, 0.3);
}
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:31,代码来源:D3D11PipelineStateViewer.cs
示例8: LoadLogfile
//.........这里部分代码省略.........
}
m_EventID = 0;
m_FrameInfo = null;
m_APIProperties = null;
// fetch initial data like drawcalls, textures and buffers
m_Renderer.Invoke((ReplayRenderer r) =>
{
m_FrameInfo = r.GetFrameInfo();
m_APIProperties = r.GetAPIProperties();
postloadProgress = 0.2f;
m_DrawCalls = FakeProfileMarkers(r.GetDrawcalls());
bool valid = HasValidMarkerColors(m_DrawCalls);
if (!valid)
RemoveMarkerColors(m_DrawCalls);
postloadProgress = 0.4f;
m_Buffers = r.GetBuffers();
postloadProgress = 0.7f;
var texs = new List<FetchTexture>(r.GetTextures());
m_Textures = texs.OrderBy(o => o.name).ToArray();
postloadProgress = 0.9f;
m_D3D11PipelineState = r.GetD3D11PipelineState();
m_D3D12PipelineState = r.GetD3D12PipelineState();
m_GLPipelineState = r.GetGLPipelineState();
m_VulkanPipelineState = r.GetVulkanPipelineState();
m_PipelineState.SetStates(m_APIProperties, m_D3D11PipelineState, m_D3D12PipelineState, m_GLPipelineState, m_VulkanPipelineState);
UnreadMessageCount = 0;
AddMessages(m_FrameInfo.debugMessages);
postloadProgress = 1.0f;
});
Thread.Sleep(20);
DateTime today = DateTime.Now;
DateTime compare = today.AddDays(-21);
if (compare.CompareTo(Config.DegradedLog_LastUpdate) >= 0 && m_APIProperties.degraded)
{
Config.DegradedLog_LastUpdate = today;
MessageBox.Show(String.Format("{0}\nThis log opened with degraded support - " +
"this could mean missing hardware support caused a fallback to software rendering.\n\n" +
"This warning will not appear every time this happens, " +
"check debug errors/warnings window for more details.", origFilename),
"Degraded support of log", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
m_LogLoaded = true;
progressThread = false;
if (local)
{
开发者ID:Anteru,项目名称:renderdoc,代码行数:67,代码来源:Core.cs
示例9: SetEventID
private void SetEventID(ILogViewerForm exclude, UInt32 eventID, bool force)
{
m_EventID = eventID;
m_Renderer.Invoke((ReplayRenderer r) =>
{
r.SetFrameEvent(m_EventID, force);
m_D3D11PipelineState = r.GetD3D11PipelineState();
m_D3D12PipelineState = r.GetD3D12PipelineState();
m_GLPipelineState = r.GetGLPipelineState();
m_VulkanPipelineState = r.GetVulkanPipelineState();
m_PipelineState.SetStates(m_APIProperties, m_D3D11PipelineState, m_D3D12PipelineState, m_GLPipelineState, m_VulkanPipelineState);
});
foreach (var logviewer in m_LogViewers)
{
if(logviewer == exclude)
continue;
Control c = (Control)logviewer;
if (c.InvokeRequired)
c.Invoke(new Action(() => logviewer.OnEventSelected(eventID)));
else
logviewer.OnEventSelected(eventID);
}
}
开发者ID:Anteru,项目名称:renderdoc,代码行数:26,代码来源:Core.cs
示例10: SetStates
public void SetStates(APIProperties props, D3D11PipelineState d3d11, GLPipelineState gl)
{
m_APIProps = props;
m_D3D11 = d3d11;
m_GL = gl;
}
开发者ID:Waferix,项目名称:renderdoc,代码行数:6,代码来源:CommonPipelineState.cs
示例11: AddResourceRegister
private void AddResourceRegister(ShaderResource slot, D3D11PipelineState.ShaderStage.ResourceView res)
{
bool found = false;
var name = slot.bindPoint + " (" + slot.name + ")";
foreach (var tex in m_Core.CurTextures)
{
if (tex.ID == res.Resource)
{
var node = new TreelistView.Node(new object[] {
"t" + name, "Texture",
tex.width + "x" + tex.height + "x" + (tex.depth > 1 ? tex.depth : tex.arraysize) +
"[" + tex.mips + "] @ " + tex.format + " - " + tex.name
});
node.Tag = null;
constantRegs.Nodes.Add(node);
found = true;
break;
}
}
if (!found)
{
foreach (var buf in m_Core.CurBuffers)
{
if (buf.ID == res.Resource)
{
string prefix = "u";
if (slot.IsSRV)
prefix = "t";
var node = new TreelistView.Node(new object[] {
prefix + name, "Buffer",
buf.length + " - " + buf.name
});
node.Tag = null;
constantRegs.Nodes.Add(node);
found = true;
break;
}
}
}
if (!found)
{
string prefix = "u";
if (slot.IsSRV)
prefix = "t";
var node = new TreelistView.Node(new object[] {
prefix + name, "Resource",
"unknown"
});
node.Tag = null;
constantRegs.Nodes.Add(node);
}
}
开发者ID:Nexuapex,项目名称:renderdoc,代码行数:63,代码来源:ShaderViewer.cs
示例12: SetStates
public void SetStates(APIProperties props, D3D11PipelineState d3d11, GLPipelineState gl, VulkanPipelineState vk)
{
m_APIProps = props;
m_D3D11 = d3d11;
m_GL = gl;
m_Vulkan = vk;
}
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:7,代码来源:CommonPipelineState.cs
示例13: ViewTexTag
public ViewTexTag(D3D11PipelineState.ShaderStage.ResourceView v, FetchTexture t)
{
view = v;
tex = t;
DepthReadOnly = false;
StencilReadOnly = false;
}
开发者ID:Nexuapex,项目名称:renderdoc,代码行数:8,代码来源:D3D11PipelineStateViewer.cs
示例14: SetShaderState
// Set a shader stage's resources and values
private void SetShaderState(FetchTexture[] texs, FetchBuffer[] bufs,
D3D11PipelineState.ShaderStage stage,
Label shader, TreelistView.TreeListView resources, TreelistView.TreeListView samplers,
TreelistView.TreeListView cbuffers, TreelistView.TreeListView classes)
{
ShaderReflection shaderDetails = stage.ShaderDetails;
if (stage.Shader == ResourceId.Null)
shader.Text = "Unbound";
else
shader.Text = stage.ShaderName;
if (shaderDetails != null && shaderDetails.DebugInfo.entryFunc.Length > 0 && shaderDetails.DebugInfo.files.Length > 0)
{
string shaderfn = "";
int entryFile = shaderDetails.DebugInfo.entryFile;
if (entryFile < 0 || entryFile >= shaderDetails.DebugInfo.files.Length)
entryFile = 0;
shaderfn = shaderDetails.DebugInfo.files[entryFile].BaseFilename;
shader.Text = shaderDetails.DebugInfo.entryFunc + "()" + " - " + shaderfn;
}
int vs = 0;
vs = resources.VScrollValue();
resources.BeginUpdate();
resources.Nodes.Clear();
if (stage.SRVs != null)
{
int i = 0;
foreach (var r in stage.SRVs)
{
ShaderResource shaderInput = null;
if (shaderDetails != null)
{
foreach (var bind in shaderDetails.ReadOnlyResources)
{
if (bind.IsSRV && bind.bindPoint == i)
{
shaderInput = bind;
break;
}
}
}
bool filledSlot = (r.Resource != ResourceId.Null);
bool usedSlot = (shaderInput != null);
// show if
if (usedSlot || // it's referenced by the shader - regardless of empty or not
(showDisabled.Checked && !usedSlot && filledSlot) || // it's bound, but not referenced, and we have "show disabled"
(showEmpty.Checked && !filledSlot) // it's empty, and we have "show empty"
)
{
string slotname = i.ToString();
if (shaderInput != null && shaderInput.name.Length > 0)
slotname += ": " + shaderInput.name;
UInt64 w = 1;
UInt32 h = 1, d = 1;
UInt32 a = 1;
string format = "Unknown";
string name = "Shader Resource " + r.Resource.ToString();
string typename = "Unknown";
object tag = null;
bool viewDetails = false;
if (!filledSlot)
{
name = "Empty";
format = "-";
typename = "-";
w = h = d = a = 0;
}
// check to see if it's a texture
for (int t = 0; t < texs.Length; t++)
{
if (texs[t].ID == r.Resource)
{
w = texs[t].width;
h = texs[t].height;
d = texs[t].depth;
a = texs[t].arraysize;
format = texs[t].format.ToString();
name = texs[t].name;
typename = texs[t].resType.Str();
if (texs[t].resType == ShaderResourceType.Texture2DMS ||
texs[t].resType == ShaderResourceType.Texture2DMSArray)
{
typename += String.Format(" {0}x", texs[t].msSamp);
}
//.........这里部分代码省略.........
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:101,代码来源:D3D11PipelineStateViewer.cs
示例15: SetShaderState
// Set a shader stage's resources and values
private void SetShaderState(FetchTexture[] texs, FetchBuffer[] bufs,
D3D11PipelineState.ShaderStage stage,
Label shader, TreelistView.TreeListView resources, TreelistView.TreeListView samplers,
TreelistView.TreeListView cbuffers, TreelistView.TreeListView classes)
{
ShaderReflection shaderDetails = stage.ShaderDetails;
if (stage.Shader == ResourceId.Null)
shader.Text = "Unbound";
else
shader.Text = stage.ShaderName;
if (shaderDetails != null && shaderDetails.DebugInfo.entryFunc != "" && shaderDetails.DebugInfo.files.Length > 0)
shader.Text = shaderDetails.DebugInfo.entryFunc + "()" + " - " +
Path.GetFileName(shaderDetails.DebugInfo.files[0].filename);
resources.BeginUpdate();
resources.Nodes.Clear();
if (stage.SRVs != null)
{
int i = 0;
foreach (var r in stage.SRVs)
{
ShaderResource shaderInput = null;
if (shaderDetails != null)
{
foreach (var bind in shaderDetails.Resources)
{
if (bind.IsSRV && bind.bindPoint == i)
shaderInput = bind;
}
}
bool filledSlot = (r.Resource != ResourceId.Null);
bool usedSlot = (shaderInput != null);
// show if
if (usedSlot || // it's referenced by the shader - regardless of empty or not
(showDisabled.Checked && !usedSlot && filledSlot) || // it's bound, but not referenced, and we have "show disabled"
(showEmpty.Checked && !filledSlot) // it's empty, and we have "show empty"
)
{
string slotname = i.ToString();
if (shaderInput != null && shaderInput.name != "")
slotname += ": " + shaderInput.name;
UInt32 w = 1, h = 1, d = 1;
UInt32 a = 1;
string format = "Unknown";
string name = "Shader Resource " + r.Resource.ToString();
string typename = "Unknown";
object tag = null;
if (!filledSlot)
{
name = "Empty";
format = "-";
typename = "-";
w = h = d = a = 0;
}
// check to see if it's a texture
for (int t = 0; t < texs.Length; t++)
{
if (texs[t].ID == r.Resource)
{
w = texs[t].width;
h = texs[t].height;
d = texs[t].depth;
a = texs[t].arraysize;
format = texs[t].format.ToString();
name = texs[t].name;
typename = string.Format("Texture{0}D", texs[t].dimension);
if(texs[t].cubemap)
typename = "TexCube";
tag = texs[t];
}
}
// if not a texture, it must be a buffer
for (int t = 0; t < bufs.Length; t++)
{
if (bufs[t].ID == r.Resource)
{
w = bufs[t].length;
h = 0;
d = 0;
a = 0;
format = "";
name = bufs[t].name;
typename = "Buffer";
// for structured buffers, display how many 'elements' there are in the buffer
if (bufs[t].structureSize > 0)
typename = "StructuredBuffer[" + (bufs[t].length / bufs[t].structureSize) + "]";
//.........这里部分代码省略.........
开发者ID:Lonesled,项目名称:renderdoc,代码行数:101,代码来源:D3D11PipelineStateViewer.cs
示例16: ViewBufTag
public ViewBufTag(D3D11PipelineState.ShaderStage.ResourceView v, FetchBuffer b)
{
view = v;
buf = b;
}
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:5,代码来源:D3D11PipelineStateViewer.cs
示例17: CloseLogfile
public void CloseLogfile()
{
if (!m_LogLoaded) return;
m_LogFile = "";
m_Renderer.CloseThreadSync();
m_Renderer = new RenderManager();
m_APIProperties = null;
m_FrameInfo = null;
m_DrawCalls = null;
m_Buffers = null;
m_Textures = null;
m_D3D11PipelineState = null;
m_GLPipelineState = null;
m_PipelineState.SetStates(null, null, null);
DebugMessages.Clear();
UnreadMessageCount = 0;
m_LogLoaded = false;
foreach (var logviewer in m_LogViewers)
{
Control c = (Control)logviewer;
if (c.InvokeRequired)
c.Invoke(new Action(() => logviewer.OnLogfileClosed()));
else
logviewer.OnLogfileClosed();
}
}
开发者ID:Clever-Boy,项目名称:renderdoc,代码行数:33,代码来源:Core.cs
示例18: LoadLogfile
//.........这里部分代码省略.........
m_Config.Serialize(Core.ConfigFilename);
}
m_FrameID = 0;
m_EventID = 0;
m_FrameInfo = null;
m_APIProperties = null;
// fetch initial data like drawcalls, textures and buffers
m_Renderer.Invoke((ReplayRenderer r) =>
{
m_FrameInfo = r.GetFrameInfo();
m_APIProperties = r.GetAPIProperties();
postloadProgress = 0.2f;
m_DrawCalls = new FetchDrawcall[m_FrameInfo.Length][];
postloadProgress = 0.4f;
for (int i = 0; i < m_FrameInfo.Length; i++)
m_DrawCalls[i] = FakeProfileMarkers(i, r.GetDrawcalls((UInt32)i));
postloadProgress = 0.7f;
m_Buffers = r.GetBuffers();
postloadProgress = 0.8f;
var texs = new List<FetchTexture>(r.GetTextures());
m_Textures = texs.OrderBy(o => o.name).ToArray();
postloadProgress = 0.9f;
m_D3D11PipelineState = r.GetD3D11PipelineState();
m_GLPipelineState = r.GetGLPipelineState();
m_PipelineState.SetStates(m_APIProperties, m_D3D11PipelineState, m_GLPipelineState);
UnreadMessageCount = 0;
AddMessages(m_FrameInfo[0].debugMessages);
postloadProgress = 1.0f;
});
Thread.Sleep(20);
DateTime today = DateTime.Now;
DateTime compare = today.AddDays(-21);
if (compare.CompareTo(Config.DegradedLog_LastUpdate) >= 0 && m_APIProperties.degraded)
{
Config.DegradedLog_LastUpdate = today;
MessageBox.Show(String.Format("{0}\nThis log opened with degraded support - " +
"this could mean missing hardware support caused a fallback to software rendering.\n\n" +
"This warning will not appear every time this happens, " +
"check debug errors/warnings window for more details.", logFile),
"Degraded support of log", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
m_LogLoaded = true;
progressThread = false;
List<ILogViewerForm> logviewers = new List<ILogViewerForm>();
logviewers.AddRange(m_LogViewers);
// notify all the registers log viewers that a log has been loaded
foreach (var logviewer in logviewers)
{
if (logviewer == null || !(logviewer is Control)) continue;
Control c = (Control)logviewer;
if (c.InvokeRequired)
{
if (!c.IsDisposed)
{
c.Invoke(new Action(() => {
try
{
logviewer.OnLogfileLoaded();
}
catch (Exception ex)
{
throw new AccessViolationException("Rethrown from Invoke:\n" + ex.ToString());
}
}));
}
}
else if (!c.IsDisposed)
logviewer.OnLogfileLoaded();
}
m_LogLoadingInProgress = false;
modal.LogfileProgress(1.0f);
foreach (var p in m_ProgressListeners)
p.LogfileProgress(1.0f);
}
开发者ID:Clever-Boy,项目名称:renderdoc,代码行数:101,代码来源:Core.cs
示例19: SetEventID
public void SetEventID(ILogViewerForm exclude, UInt32 frameID, UInt32 eventID)
{
m_FrameID = frameID;
m_EventID = eventID;
m_DeferredEvent = 0;
m_Renderer.Invoke((ReplayRenderer r) => { r.SetContextFilter(ResourceId.Null, 0, 0); });
m_Renderer.Invoke((ReplayRenderer r) =>
{
r.SetFrameEvent(m_FrameID, m_EventID);
m_D3D11PipelineState = r.GetD3D11PipelineState();
m_GLPipelineState = r.GetGLPipelineState();
m_PipelineState.SetStates(m_APIProperties, m_D3D11PipelineState, m_GLPipelineState);
});
foreach (var logviewer in m_LogViewers)
{
if(logviewer == exclude)
continue;
Control c = (Control)logviewer;
if (c.InvokeRequired)
c.BeginInvoke(new Action(() => logviewer.OnEventSelected(frameID, eventID)));
else
logviewer.OnEventSelected(frameID, eventID);
}
}
开发者ID:Clever-Boy,项目名称:renderdoc,代码行数:28,代码来源:Core.cs
示例20: SetContextFilter
// setting a context filter allows replaying of deferred events. You can set the deferred
// events to replay in a context, after replaying up to a given event on the main thread
public void SetContextFilter(ILogViewerForm exclude, UInt32 eventID,
ResourceId ctx, UInt32 firstDeferred, UInt32 lastDeferred)
{
m_EventID = eventID;
m_DeferredEvent = lastDeferred;
m_Renderer.Invoke((ReplayRenderer r) => { r.SetContextFilter(ctx, firstDeferred, lastDeferred); });
m_Renderer.Invoke((ReplayRenderer r) => {
r.SetFrameEvent(m_EventID, true);
m_D3D11PipelineState = r.GetD3D11PipelineState();
m_GLPipelineState = r.GetGLPipelineState();
m_VulkanPipelineState = r.GetVulkanPipelineState();
m_PipelineState.SetStates(m_APIProperties, m_D3D11PipelineState, m_GLPipelineState, m_VulkanPipelineState);
});
foreach (var logviewer in m_LogViewers)
{
if (logviewer == exclude)
continue;
Control c = (Control)logviewer;
if (c.InvokeRequired)
c.BeginInvoke(new Action(() => logviewer.OnEventSelected(eventID)));
else
logviewer.OnEventSelected(eventID);
}
}
开发者ID:Cry-Filami,项目名称:renderdoc,代码行数:30,代码来源:Core.cs
注:本文中的renderdoc.D3D11PipelineState类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论