Files
o3de/Gems/PhysX/Code/Source/System/PhysXJob.cpp
T
2021-06-23 10:55:22 -07:00

27 lines
561 B
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <PhysX_precompiled.h>
#include <System/PhysXJob.h>
#include <AzCore/Debug/Profiler.h>
namespace PhysX
{
PhysXJob::PhysXJob(physx::PxBaseTask& pxTask, AZ::JobContext* context)
: AZ::Job(true, context)
, m_pxTask(pxTask)
{
}
void PhysXJob::Process()
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Physics, m_pxTask.getName());
m_pxTask.run();
m_pxTask.release();
}
}