当前位置: 首页>>代码示例>>C++>>正文


C++ SCOPE_CYCLE_COUNTER函数代码示例

本文整理汇总了C++中SCOPE_CYCLE_COUNTER函数的典型用法代码示例。如果您正苦于以下问题:C++ SCOPE_CYCLE_COUNTER函数的具体用法?C++ SCOPE_CYCLE_COUNTER怎么用?C++ SCOPE_CYCLE_COUNTER使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SCOPE_CYCLE_COUNTER函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: INC_DWORD_STAT

void UAudioComponent::PlaybackCompleted(bool bFailedToStart)
{
	// Mark inactive before calling destroy to avoid recursion
	bIsActive = false;

	if (!bFailedToStart && GetWorld() != nullptr && (OnAudioFinished.IsBound() || OnAudioFinishedNative.IsBound()))
	{
		INC_DWORD_STAT( STAT_AudioFinishedDelegatesCalled );
		SCOPE_CYCLE_COUNTER( STAT_AudioFinishedDelegates );

		OnAudioFinished.Broadcast();
		OnAudioFinishedNative.Broadcast(this);
	}

	// Auto destruction is handled via marking object for deletion.
	if (bAutoDestroy)
	{
		DestroyComponent();
	}
}
开发者ID:johndpope,项目名称:UE4,代码行数:20,代码来源:AudioComponent.cpp

示例2: checkSlow

const FHullShaderRHIRef& FShaderResource::GetHullShader() 
{ 
	checkSlow(Target.Frequency == SF_Hull);
	if (!IsInitialized())
	{
		STAT(double ShaderInitializationTime = 0);
		{
			SCOPE_CYCLE_COUNTER(STAT_Shaders_FrameRTShaderInitForRenderingTime);
			SCOPE_SECONDS_COUNTER(ShaderInitializationTime);

			InitResourceFromPossiblyParallelRendering();
		}

		INC_FLOAT_STAT_BY(STAT_Shaders_TotalRTShaderInitForRenderingTime,(float)ShaderInitializationTime);
	}

	checkSlow(IsInitialized());

	return HullShader; 
}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:20,代码来源:Shader.cpp

示例3: DYNAMIC_CAST_D3D11RESOURCE

void FD3D11DynamicRHI::RHIBeginDrawingViewport(FViewportRHIParamRef ViewportRHI, FTextureRHIParamRef RenderTarget)
{
	DYNAMIC_CAST_D3D11RESOURCE(Viewport,Viewport);

	SCOPE_CYCLE_COUNTER(STAT_D3D11PresentTime);

	check(!DrawingViewport);
	DrawingViewport = Viewport;

	// Set the render target and viewport.
	if( RenderTarget == NULL )
	{
		RenderTarget = Viewport->GetBackBuffer();
	}
	FRHIRenderTargetView View(RenderTarget);
	RHISetRenderTargets(1,&View,FTextureRHIRef(),0,NULL);

	// Set an initially disabled scissor rect.
	RHISetScissorRect(false,0,0,0,0);
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:20,代码来源:D3D11Viewport.cpp

示例4: SCOPE_CYCLE_COUNTER

void UBodySetup::UpdateTriMeshVertices(const TArray<FVector> & NewPositions)
{
	SCOPE_CYCLE_COUNTER(STAT_UpdateTriMeshVertices);
#if WITH_PHYSX
	if (TriMeshes.Num())
	{
		check(TriMeshes[0] != nullptr);
		PxU32 PNumVerts = TriMeshes[0]->getNbVertices(); // Get num of verts we expect
		PxVec3 * PNewPositions = TriMeshes[0]->getVerticesForModification();	//we only update the first trimesh. We assume this per poly case is not updating welded trimeshes

		int32 NumToCopy = FMath::Min<int32>(PNumVerts, NewPositions.Num()); // Make sure we don't write off end of array provided
		for (int32 i = 0; i < NumToCopy; ++i)
		{
			PNewPositions[i] = U2PVector(NewPositions[i]);
		}

		TriMeshes[0]->refitBVH();
	}
#endif
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:20,代码来源:BodySetup.cpp

示例5: SCOPE_CYCLE_COUNTER

void FVulkanCommandListContext::RHIEndDrawIndexedPrimitiveUP()
{
	SCOPE_CYCLE_COUNTER(STAT_VulkanDrawCallTime);

	FVulkanBoundShaderState& Shader = PendingState->GetBoundShaderState();

	PendingState->SetStreamSource(0, PendingDrawPrimUPVertexAllocInfo.GetHandle(), PendingVertexDataStride, PendingDrawPrimUPVertexAllocInfo.GetBindOffset());

	FVulkanCmdBuffer* CmdBuffer = CommandBufferManager->GetActiveCmdBuffer();
	VkCommandBuffer Cmd = CmdBuffer->GetHandle();
	PendingState->PrepareDraw(this, CmdBuffer, UEToVulkanType((EPrimitiveType)PendingPrimitiveType));
	uint32 NumIndices = GetVertexCountForPrimitiveCount(PendingNumPrimitives, PendingPrimitiveType);
	VulkanRHI::vkCmdBindIndexBuffer(Cmd, PendingDrawPrimUPIndexAllocInfo.GetHandle(), PendingDrawPrimUPIndexAllocInfo.GetBindOffset(), PendingPrimitiveIndexType);
	VulkanRHI::vkCmdDrawIndexed(Cmd, NumIndices, 1, PendingMinVertexIndex, 0, 0);

	if (IsImmediate())
	{
		VulkanRHI::GManager.GPUProfilingData.RegisterGPUWork(PendingNumPrimitives, PendingNumVertices);
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:20,代码来源:VulkanCommands.cpp

示例6: SCOPE_CYCLE_COUNTER

void FDeferredShadingSceneRenderer::SortBasePassStaticData(FVector ViewPosition)
{
	// If we're not using a depth only pass, sort the static draw list buckets roughly front to back, to maximize HiZ culling
	// Note that this is only a very rough sort, since it does not interfere with state sorting, and each list is sorted separately
	if (EarlyZPassMode == DDM_None)
	{
		SCOPE_CYCLE_COUNTER(STAT_SortStaticDrawLists);

		for (int32 DrawType = 0; DrawType < FScene::EBasePass_MAX; DrawType++)
		{
			Scene->BasePassNoLightMapDrawList[DrawType].SortFrontToBack(ViewPosition);
			Scene->BasePassSimpleDynamicLightingDrawList[DrawType].SortFrontToBack(ViewPosition);
			Scene->BasePassCachedVolumeIndirectLightingDrawList[DrawType].SortFrontToBack(ViewPosition);
			Scene->BasePassCachedPointIndirectLightingDrawList[DrawType].SortFrontToBack(ViewPosition);
			Scene->BasePassHighQualityLightMapDrawList[DrawType].SortFrontToBack(ViewPosition);
			Scene->BasePassDistanceFieldShadowMapLightMapDrawList[DrawType].SortFrontToBack(ViewPosition);
			Scene->BasePassLowQualityLightMapDrawList[DrawType].SortFrontToBack(ViewPosition);
		}
	}
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:20,代码来源:DeferredShadingRenderer.cpp

示例7: check

void FVulkanCommandListContext::RHIDrawPrimitive(uint32 PrimitiveType, uint32 BaseVertexIndex, uint32 NumPrimitives, uint32 NumInstances)
{
	check(Device);

	SCOPE_CYCLE_COUNTER(STAT_VulkanDrawCallTime);

	FVulkanBoundShaderState& BSS = PendingState->GetBoundShaderState();

	uint32 NumVertices = GetVertexCountForPrimitiveCount(NumPrimitives, PrimitiveType);

	FVulkanCmdBuffer* CmdBuffer = CommandBufferManager->GetActiveCmdBuffer();
	PendingState->PrepareDraw(this, CmdBuffer, UEToVulkanType((EPrimitiveType)PrimitiveType));
	NumInstances = FMath::Max(1U, NumInstances);
	VulkanRHI::vkCmdDraw(CmdBuffer->GetHandle(), NumVertices, NumInstances, BaseVertexIndex, 0);

	//if (IsImmediate())
	{
		VulkanRHI::GManager.GPUProfilingData.RegisterGPUWork(NumPrimitives * NumInstances, NumVertices * NumInstances);
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:20,代码来源:VulkanCommands.cpp

示例8: DoUpdateCamera

void APlayerCameraManager::UpdateCamera(float DeltaTime)
{
	if ((PCOwner->Player && PCOwner->IsLocalPlayerController()) || !bUseClientSideCameraUpdates || bDebugClientSideCamera)
	{
		DoUpdateCamera(DeltaTime);

		if (bShouldSendClientSideCameraUpdate && IsNetMode(NM_Client))
		{
			SCOPE_CYCLE_COUNTER(STAT_ServerUpdateCamera);

			// compress the rotation down to 4 bytes
			int32 const ShortYaw = FRotator::CompressAxisToShort(CameraCache.POV.Rotation.Yaw);
			int32 const ShortPitch = FRotator::CompressAxisToShort(CameraCache.POV.Rotation.Pitch);
			int32 const CompressedRotation = (ShortYaw << 16) | ShortPitch;

			PCOwner->ServerUpdateCamera(CameraCache.POV.Location, CompressedRotation);
			bShouldSendClientSideCameraUpdate = false;
		}
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:20,代码来源:PlayerCameraManager.cpp

示例9: SCOPE_CYCLE_COUNTER

void FPhysXCPUDispatcherSingleThread::submitTask( PxBaseTask& Task ) 
{
	SCOPE_CYCLE_COUNTER(STAT_PhysXSingleThread);
	check(IsInGameThread());

	TaskStack.Push(&Task);
	if (TaskStack.Num() > 1)
	{
		return;
	}
	Task.run();
	Task.release();
	while (TaskStack.Num() > 1)
	{
		PxBaseTask& ChildTask = *TaskStack.Pop();
		ChildTask.run();
		ChildTask.release();
	}
	verify(&Task == TaskStack.Pop() && !TaskStack.Num());
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:20,代码来源:PhysXSupport.cpp

示例10: SCOPE_CYCLE_COUNTER

FGameplayTagContainer FGameplayTagContainer::Filter(const FGameplayTagContainer& OtherContainer, TEnumAsByte<EGameplayTagMatchType::Type> TagMatchType, TEnumAsByte<EGameplayTagMatchType::Type> OtherTagMatchType) const
{
	SCOPE_CYCLE_COUNTER(STAT_FGameplayTagContainer_Filter);

	FGameplayTagContainer ResultContainer;
	UGameplayTagsManager& TagManager = IGameplayTagsModule::GetGameplayTagsManager();

	
	for (TArray<FGameplayTag>::TConstIterator OtherIt(OtherContainer.GameplayTags); OtherIt; ++OtherIt)
	{
		for (TArray<FGameplayTag>::TConstIterator It(this->GameplayTags); It; ++It)
		{
			if (TagManager.GameplayTagsMatch(*It, TagMatchType, *OtherIt, OtherTagMatchType) == true)
			{
				ResultContainer.AddTag(*It);
			}
		}
	}

	return ResultContainer;
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:21,代码来源:GameplayTagContainer.cpp

示例11: SCOPE_CYCLE_COUNTER

void UGameEngine::RedrawViewports( bool bShouldPresent /*= true*/ )
{
	SCOPE_CYCLE_COUNTER(STAT_RedrawViewports);

	if ( GameViewport != NULL )
	{
		GameViewport->LayoutPlayers();
		if ( GameViewport->Viewport != NULL )
		{
			GameViewport->Viewport->Draw(bShouldPresent);
		}
	}

	// render the secondary viewports
	checkSlow(SecondaryViewportClients.Num() == SecondaryViewportFrames.Num());
	for (int32 SecondaryIndex = 0; SecondaryIndex < SecondaryViewportFrames.Num(); SecondaryIndex++)
	{
		SecondaryViewportFrames[SecondaryIndex]->GetViewport()->Draw(bShouldPresent);
	}

}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:21,代码来源:GameEngine.cpp

示例12: SCOPE_CYCLE_COUNTER

int32 FServiceConnection::FindOrAddThread(const FStatNameAndInfo& Thread)
{
	SCOPE_CYCLE_COUNTER(STAT_PC_FindOrAddThread);

	// The description of a thread group contains the thread id
	const FString Desc = Thread.GetDescription();
	const uint32 ThreadID = FStatsUtils::ParseThreadID( Desc );

	const FName ShortName = Thread.GetShortName();

	// add to the meta data
	FScopeLock ScopeLock( &CriticalSection );
	const int32 OldNum = MetaData.ThreadDescriptions.Num();
	MetaData.ThreadDescriptions.Add( ThreadID, ShortName.ToString() );
	const int32 NewNum = MetaData.ThreadDescriptions.Num();

	// meta data has been updated
	CurrentData.MetaDataUpdated = CurrentData.MetaDataUpdated || OldNum != NewNum;

	return ThreadID;
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:21,代码来源:ProfilerClientManager.cpp

示例13: SCOPE_CYCLE_COUNTER

	void FMixerSource::Update()
	{
		SCOPE_CYCLE_COUNTER(STAT_AudioUpdateSources);

		if (!WaveInstance || !MixerSourceVoice || Paused || !bInitialized)
		{
			return;
		}

		UpdatePitch();

		UpdateVolume();

		UpdateSpatialization();

		UpdateEffects();

		UpdateChannelMaps();

		FSoundSource::DrawDebugInfo();
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:21,代码来源:AudioMixerSource.cpp

示例14: SCOPE_CYCLE_COUNTER

void UTimelineComponent::TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction)
{
	SCOPE_CYCLE_COUNTER(STAT_TimelineCompTick); 

	Super::TickComponent(DeltaTime, TickType, ThisTickFunction);

	if (bIsActive)
	{
		TheTimeline.TickTimeline(DeltaTime);

		if (!IsNetSimulating())
		{
			// Do not deactivate if we are done, since bActive is a replicated property and we shouldn't have simulating
			// clients touch replicated variables.
			if (!TheTimeline.IsPlaying())
			{
				Deactivate();
			}
		}
	}
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:21,代码来源:Timeline.cpp

示例15: SCOPE_CYCLE_COUNTER

void FOnlineVoiceSteam::Tick(float DeltaTime) 
{
	SCOPE_CYCLE_COUNTER(STAT_Voice_Interface);

	// If we aren't in a networked match, no need to update networked voice
	if (SessionInt && SessionInt->GetNumSessions() > 0)
	{
		// Processing voice data only valid with a voice engine to capture/play
		if (VoiceEngine.IsValid())
		{
			VoiceEngine->Tick(DeltaTime);

			// Queue local packets for sending via the network
			ProcessLocalVoicePackets();
			// Submit queued packets to audio system
			ProcessRemoteVoicePackets();
			// Fire off any talking notifications for hud display
			ProcessTalkingDelegates(DeltaTime);
		}
	}
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:21,代码来源:VoiceInterfaceSteam.cpp


注:本文中的SCOPE_CYCLE_COUNTER函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。