本文整理汇总了C#中DeviceContext.End方法的典型用法代码示例。如果您正苦于以下问题:C# DeviceContext.End方法的具体用法?C# DeviceContext.End怎么用?C# DeviceContext.End使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DeviceContext
的用法示例。
在下文中一共展示了DeviceContext.End方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: End
public void End(DeviceContext context)
{
context.End(queryTimeStampEnd);
context.End(queryTimeStampDisjoint);
}
示例2: Begin
public void Begin(DeviceContext context)
{
context.Begin(queryTimeStampDisjoint);
context.End(queryTimeStampStart);
}
示例3: BeginProfilePoint
public static void BeginProfilePoint(DeviceContext context, String profilePointName)
{
context.End(m_HWQueries[m_CurrentQuery]);
m_HWQueriesDescs[m_CurrentQuery] = profilePointName;
m_QueriesStack.Push(m_CurrentQuery);
IncrementCurrentQuery();
}
示例4: EndProfilePoint
public static void EndProfilePoint(DeviceContext context)
{
context.End(m_HWQueries[m_CurrentQuery]);
int beginQuery = m_QueriesStack.Pop();
m_CorrespondingQueryEnds[beginQuery] = m_CurrentQuery;
IncrementCurrentQuery();
}
示例5: EndFrameProfiling
public static void EndFrameProfiling(DeviceContext context)
{
PendingFrameQueries pendingFrame = new PendingFrameQueries();
pendingFrame.m_DisjointQueryId = m_CurrentDisjointQuery;
pendingFrame.m_BeginQuery = m_CurrentFrameFirstQuery;
pendingFrame.m_EndQuery = m_CurrentQuery;
EndProfilePoint(context);
if(m_QueriesStack.Count != 0)
{
throw new Exception("Wrong profile point count! Did you forget about EndProfilePoint?");
}
context.End(m_DisjointQueries[m_CurrentDisjointQuery]);
m_PendingFrames.Enqueue(pendingFrame);
IncrementCurrentDisjointQuery();
// Time to fetch prev frames!
if (m_PendingFrames.Count > 4)
{
pendingFrame = m_PendingFrames.Dequeue();
TimestampQueryData disjointData = context.GetData<TimestampQueryData>(m_DisjointQueries[pendingFrame.m_DisjointQueryId]);
ProfilerTreeMember parent = new ProfilerTreeMember();
ProfilerTreeMember frameParent = parent;
for (int queryIterator = pendingFrame.m_BeginQuery; queryIterator != (pendingFrame.m_EndQuery + 1) % MAX_HW_QUERIES; queryIterator = (queryIterator + 1) % MAX_HW_QUERIES)
{
if (m_CorrespondingQueryEnds[queryIterator] != Int32.MaxValue)
{
var profilerObject = new ProfilerTreeMember();
int correspondingEnd = m_CorrespondingQueryEnds[queryIterator];
long beginProfilePointData = context.GetData<long>(m_HWQueries[queryIterator]);
long endProfilePointData = context.GetData<long>(m_HWQueries[correspondingEnd]);
profilerObject.m_Time = (double)(endProfilePointData - beginProfilePointData) / (double)disjointData.Frequency * 1000.0;
profilerObject.m_Name = m_HWQueriesDescs[queryIterator];
profilerObject.m_Parent = parent;
parent.m_ChildMembers.Add(profilerObject);
parent = profilerObject;
}
else
{
parent = parent.m_Parent;
if (parent == null)
{
throw new Exception("Error while constructing profiler tree");
}
}
}
if (frameParent.m_ChildMembers.Count < 1)
{
throw new Exception("Error while constructing profiler tree");
}
m_CurrentFrameProfilerTree = frameParent.m_ChildMembers[0];
}
}