Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .teamcity/Windows/Project.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ object Project : Project({
})


class CarbonBuildWindows(buildName: String, configType: String, preset: String) : BuildType({
class CarbonBuildWindows(buildName: String, configType: String, preset: String, vsDevBatSwitches: String = "-arch=x64 -vcvars_ver=14.51") : BuildType({
Comment thread
filipppavlov marked this conversation as resolved.
id(buildName.toId())
this.name = buildName

Expand All @@ -48,10 +48,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
param("env.GIT_TAG_HASH_OVERRIDE", "")
param("github_checkout_folder", "github")
param("env.CTEST_JUNIT_OUTPUT_FILE", "ctest_results.xml")
select("env.VISUAL_STUDIO_PLATFORM_TOOLSET", "v141", label = "Visual Studio Platform Toolset", description = "Specify the toolset for the build. e.g. v141 or v143.",
options = listOf("v141 (2017)" to "v141", "v143 (2022)" to "v143"))
param("VS_DEV_BAT_SWITCHES", "-arch=x64")
param("env.VSDEV_BAT_PATH", "%%ProgramFiles(x86)%%/Microsoft Visual Studio/2017/BuildTools/Common7/Tools/vsdevcmd.bat")
param("VS_DEV_BAT_SWITCHES", vsDevBatSwitches)
param("env.CMAKE_BUILD_TARGETS", "all")
param("env.CMAKE_INSTALL_PREFIX", ".build-artifact")
param("env.CMAKE_CONFIG_TYPE", configType)
Expand Down Expand Up @@ -142,7 +139,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
echo ${'$'}Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList ${'$'}User, ${'$'}Password
echo New-PSDrive -Name "symbols" -PSProvider FileSystem -Root ${'$'}Env:TC_SYMBOL_STORE_PATH -Credential ${'$'}Credential
echo Write-Host "##teamcity[progressMessage 'Storing symbols']"
echo ${'$'}symstoreFlags = ^@^("add","/compress","/t", "CCP Games", "/c", "TeamCity %build.number%", "/s", "${'$'}Env:TC_SYMBOL_STORE_PATH", "/o", "/r", "/f", "%env.CMAKE_BUILD_FOLDER%"^)
echo ${'$'}symstoreFlags = ^@^("add","/compress","/t", "CCP Games", "/c", "TeamCity %build.number%", "/s", "${'$'}Env:TC_SYMBOL_STORE_PATH", "/o", "/r", "/f", "%env.CMAKE_BUILD_FOLDER%"^)
echo ^& ${'$'}Env:TC_SYMSTORE_PATH ${'$'}symstoreFlags ^| Tee-Object -file symstore.txt
echo ${'$'}stored = get-content symstore.txt ^| Select-String "^SYMSTORE: Number of files stored = (.*)${'$'}"
echo ${'$'}stored = ${'$'}stored.Matches.Groups[1].Value
Expand All @@ -168,7 +165,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
${'$'}Password = ConvertTo-SecureString -String "%DOMAIN_USER_PASSWORD%" -AsPlainText -Force
${'$'}Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList ${'$'}User, ${'$'}Password
New-PSDrive -Name "symbols" -PSProvider FileSystem -Root ${'$'}Env:TC_SYMBOL_STORE_PATH -Credential ${'$'}Credential

Write-Host "##teamcity[progressMessage 'Storing symbols']"
${'$'}symstoreFlags = @("add",
"/compress",
Expand All @@ -179,16 +176,16 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
"/r", # Recursive
"/f", "%env.CMAKE_BUILD_FOLDER%") # source folder
& ${'$'}Env:TC_SYMSTORE_PATH ${'$'}symstoreFlags | Tee-Object -file symstore.txt

${'$'}stored = get-content symstore.txt | Select-String "^SYMSTORE: Number of files stored = (.*)${'$'}"
${'$'}stored = ${'$'}stored.Matches.Groups[1].Value

${'$'}errors = get-content symstore.txt | Select-String "^SYMSTORE: Number of errors = (.*)${'$'}"
${'$'}errors = ${'$'}errors.Matches.Groups[1].Value

${'$'}ignored = get-content symstore.txt | Select-String "^SYMSTORE: Number of files ignored = (.*)${'$'}"
${'$'}ignored = ${'$'}ignored.Matches.Groups[1].Value

Write-Host "##teamcity[buildStatus text='Stored: ${'$'}stored, Errors: ${'$'}errors, Ignored: ${'$'}ignored']"
""".trimIndent()
}
Expand Down Expand Up @@ -218,7 +215,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
+:refs/heads/release/*.x
-:refs/heads/release/1.x
""".trimIndent()
filterAuthorRole = PullRequests.GitHubRoleFilter.MEMBER
filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY
}
}
commitStatusPublisher {
Expand Down Expand Up @@ -251,4 +248,4 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
requirements {
startsWith("teamcity.agent.jvm.os.name", "Windows Server")
}
})
})
18 changes: 9 additions & 9 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"name": "x64-windows",
"inherits": "windows",
"cacheVariables": {
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/vendor/github.com/carbonengine/vcpkg-registry/toolchains/x64-windows-carbon.cmake"
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/vendor/github.com/carbonengine/vcpkg-registry/toolchains/x64-windows-145-carbon.cmake"
},
"hidden": true
},
Expand All @@ -71,35 +71,35 @@
"inherits": "x64-windows",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Internal",
"VCPKG_TARGET_TRIPLET": "x64-windows-internal",
"VCPKG_HOST_TRIPLET": "x64-windows-internal"
"VCPKG_TARGET_TRIPLET": "x64-windows-145-internal",
"VCPKG_HOST_TRIPLET": "x64-windows-145-internal"
}
},
{
"name": "x64-windows-release",
"inherits": "x64-windows",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"VCPKG_TARGET_TRIPLET": "x64-windows-release",
"VCPKG_HOST_TRIPLET": "x64-windows-release"
"VCPKG_TARGET_TRIPLET": "x64-windows-145-release",
"VCPKG_HOST_TRIPLET": "x64-windows-145-release"
}
},
{
"name": "x64-windows-debug",
"inherits": "x64-windows",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"VCPKG_TARGET_TRIPLET": "x64-windows-debug",
"VCPKG_HOST_TRIPLET": "x64-windows-debug"
"VCPKG_TARGET_TRIPLET": "x64-windows-145-debug",
"VCPKG_HOST_TRIPLET": "x64-windows-145-debug"
}
},
{
"name": "x64-windows-trinitydev",
"inherits": "x64-windows",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "TrinityDev",
"VCPKG_TARGET_TRIPLET": "x64-windows-trinitydev",
"VCPKG_HOST_TRIPLET": "x64-windows-trinitydev"
"VCPKG_TARGET_TRIPLET": "x64-windows-145-trinitydev",
"VCPKG_HOST_TRIPLET": "x64-windows-145-trinitydev"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion trinity/ContinueOnMainThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void ContinueOnMainThread( std::function<void()>&& action )

void ExecuteMainThreadActions()
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

static std::vector<std::function<void()>> actionsToProcess;

Expand Down
10 changes: 5 additions & 5 deletions trinity/Controllers/Tr2Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ void Tr2Controller::OnListModified( long event, ssize_t key, ssize_t key2, IRoot

void Tr2Controller::Link( IRoot& owner )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );
{

CCP_STATS_INC( controllerLinkCount );
CCP_STATS_SCOPED_TIME( controllerLinkTime );
TRINITY_STATS_SCOPED_TIME( controllerLinkTime );

Unlink();

Expand Down Expand Up @@ -162,7 +162,7 @@ void Tr2Controller::Unlink( UnlinkReason reason )
return;
}

CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );
if( reason != UnlinkReason::DELETING )
{
Stop();
Expand Down Expand Up @@ -245,7 +245,7 @@ void Tr2Controller::Update( float normalizedUpdateFrequency )

{
CCP_STATS_INC( controllerUpdateCount );
CCP_STATS_SCOPED_TIME( controllerUpdateTime );
TRINITY_STATS_SCOPED_TIME( controllerUpdateTime );

auto dirtyVariables = m_dirtyVariables;
m_dirtyVariables = 0;
Expand All @@ -256,7 +256,7 @@ void Tr2Controller::Update( float normalizedUpdateFrequency )
}
if( !m_updateables.empty() )
{
CCP_STATS_SCOPED_TIME( controllerUpdateablesTime );
TRINITY_STATS_SCOPED_TIME( controllerUpdateablesTime );

auto simTime = BeOS->GetCurrentFrameTime();

Expand Down
10 changes: 5 additions & 5 deletions trinity/Controllers/Tr2TimelineController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ Tr2TimelineController::~Tr2TimelineController()

void Tr2TimelineController::Link( IRoot& owner )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );
{

CCP_STATS_INC( controllerLinkCount );
CCP_STATS_SCOPED_TIME( controllerLinkTime );
TRINITY_STATS_SCOPED_TIME( controllerLinkTime );

Unlink();

Expand Down Expand Up @@ -96,7 +96,7 @@ void Tr2TimelineController::Unlink( UnlinkReason reason )
return;
}

CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

if( reason != UnlinkReason::DELETING )
{
Expand Down Expand Up @@ -182,7 +182,7 @@ void Tr2TimelineController::Update( float normalizedUpdateFrequency )

{
CCP_STATS_INC( controllerUpdateCount );
CCP_STATS_SCOPED_TIME( controllerUpdateTime );
TRINITY_STATS_SCOPED_TIME( controllerUpdateTime );

auto simTime = BeOS->GetCurrentFrameTime();
auto dt = TimeAsFloat( simTime - m_lastUpdateTime ) * m_timeScale;
Expand Down Expand Up @@ -222,7 +222,7 @@ void Tr2TimelineController::Update( float normalizedUpdateFrequency )

if( !m_updateables.empty() )
{
CCP_STATS_SCOPED_TIME( controllerUpdateablesTime );
TRINITY_STATS_SCOPED_TIME( controllerUpdateablesTime );

auto realTime = BeOS->GetActualTime();

Expand Down
2 changes: 1 addition & 1 deletion trinity/Curves/TriCurveSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void TriCurveSet::OnSimClockRebase( Be::Time oldTime, Be::Time newTime )

void TriCurveSet::Update( double time )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

if( m_driver != nullptr )
{
Expand Down
12 changes: 6 additions & 6 deletions trinity/Eve/EveComponentRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ EveComponentRegistry::~EveComponentRegistry()

void EveComponentRegistry::Clear()
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );
std::unique_lock<std::shared_mutex> lock( m_componentCollectionLoopGuard );

for( auto& it : m_componentCollections )
Expand All @@ -39,7 +39,7 @@ void EveComponentRegistry::Clear()

void EveComponentRegistry::ReRegister( EveEntity* entity )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

entity->UnRegister( this );
entity->Register( this );
Expand Down Expand Up @@ -86,7 +86,7 @@ void EveComponentRegistry::UnRegister( EveEntity* entity )
// UnRegisters all components for a specific entity
void EveComponentRegistry::UnRegisterAllComponents( EveEntity* entity )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

std::unique_lock<std::shared_mutex> lock( m_componentCollectionLoopGuard );

Expand All @@ -98,7 +98,7 @@ void EveComponentRegistry::UnRegisterAllComponents( EveEntity* entity )

IEveComponentCollection* EveComponentRegistry::GetComponentCollection( const char* componentName ) const
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

for( auto& pair : m_componentCollections )
{
Expand All @@ -113,7 +113,7 @@ IEveComponentCollection* EveComponentRegistry::GetComponentCollection( const cha

void EveComponentRegistry::AddToCollection( IEveComponentCollection* collection, EveEntity* entity )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );
auto collectionBit = collection->GetBit();

if( !entity->GetComponentIndex( collectionBit ).has_value() )
Expand All @@ -128,7 +128,7 @@ void EveComponentRegistry::AddToCollection( IEveComponentCollection* collection,

void EveComponentRegistry::RemoveFromCollection( IEveComponentCollection* collection, EveEntity* entity )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );
auto collectionBit = collection->GetBit();

auto entityIndex = entity->GetComponentIndex( collectionBit );
Expand Down
2 changes: 1 addition & 1 deletion trinity/Eve/EveDistanceField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ float EveDistanceField::CalculateFieldCoverageAndDistance( Be::Time t, const Vec

void EveDistanceField::Update( const EveUpdateContext& updateContext )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

Vector3 posRef( 0, 0, 0 );
if( m_cameraView )
Expand Down
2 changes: 1 addition & 1 deletion trinity/Eve/EveEffectRoot2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ void EveEffectRoot2::OnListModified( long event, ssize_t key, ssize_t key2, IRoo

void EveEffectRoot2::UpdateSyncronous( const EveUpdateContext& updateContext )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

UpdateWorldTransform( updateContext.GetTime() );

Expand Down
14 changes: 7 additions & 7 deletions trinity/Eve/EveInstancedMeshManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ITriRenderBatchAccumulator* FindBatchAccumulator( const T& batches, TriBatchType

void EveInstancedMeshManager::CollectMeshes( EveComponentRegistry& registry )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

USE_MAIN_THREAD_RENDER_CONTEXT();
auto renderedFrame = renderContext.GetRenderedFrameNumber();
Expand Down Expand Up @@ -479,7 +479,7 @@ uint32_t EveInstancedMeshManager::InstanceBuffer::GetSize() const

void EveInstancedMeshManager::PerformFrustumCulling( const TriFrustum& cameraFrustum, float invLodFactor, InstanceFlags filter )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

Tr2ParallelDo(
begin( m_sphereGroups ),
Expand Down Expand Up @@ -524,7 +524,7 @@ void EveInstancedMeshManager::PerformFrustumCulling( const TriFrustum& cameraFru

void EveInstancedMeshManager::PerformFrustumCulling( const TriFrustum& cameraFrustum, const TriFrustum& pickingFrustum, float invLodFactor, InstanceFlags filter )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

Tr2ParallelDo(
begin( m_sphereGroups ),
Expand Down Expand Up @@ -569,7 +569,7 @@ void EveInstancedMeshManager::PerformFrustumCulling( const TriFrustum& cameraFru

void EveInstancedMeshManager::PerformFrustumCulling( const TriFrustum& cameraFrustum, const IEveShadowFrustum& shadowFrustum, float invLodFactor, InstanceFlags filter )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

tbb::parallel_for_each(
begin( m_sphereGroups ),
Expand Down Expand Up @@ -740,7 +740,7 @@ std::pair<IRootPtr, uint32_t> EveInstancedMeshManager::GetPickedObject( uint32_t

void EveInstancedMeshManager::BinVisibleInstances( const std::initializer_list<std::pair<TriBatchType, ITriRenderBatchAccumulator&>>& batches )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

tbb::parallel_for_each(
begin( m_meshInstances ),
Expand All @@ -763,7 +763,7 @@ void EveInstancedMeshManager::BinVisibleInstances( const std::initializer_list<s

void EveInstancedMeshManager::GetPickingBatches( EvePendingPickingReadback& readback, uint32_t objectIdOffset, const std::vector<std::pair<TriBatchType, ITriRenderBatchAccumulator&>>& batches )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );


std::vector<std::pair<IRootPtr, uint32_t>>& traceback = readback.m_instancedTraceback;
Expand Down Expand Up @@ -851,7 +851,7 @@ void EveInstancedMeshManager::GetPickingBatches( EvePendingPickingReadback& read

size_t EveInstancedMeshManager::GetBatches( const std::initializer_list<std::pair<TriBatchType, ITriRenderBatchAccumulator&>>& batches )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

BinVisibleInstances( batches );

Expand Down
2 changes: 1 addition & 1 deletion trinity/Eve/EveRootTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ EveRootTransform::EveRootTransform( IRoot* lockobj ) :

void EveRootTransform::UpdateSyncronous( const EveUpdateContext& updateContext )
{
CCP_STATS_ZONE( __FUNCTION__ );
TRINITY_STATS_ZONE( __FUNCTION__ );

Quaternion rotation;
Vector3 translation;
Expand Down
Loading