Fix async draw wait labels type

This commit is contained in:
Wojtek Figat
2025-08-05 12:28:29 +02:00
parent 761ea094d6
commit a1a6d4738f
4 changed files with 4 additions and 4 deletions

View File

@@ -1233,7 +1233,7 @@ void Foliage::Draw(RenderContextBatch& renderContextBatch)
_renderContextBatch = &renderContextBatch;
Function<void(int32)> func;
func.Bind<Foliage, &Foliage::DrawFoliageJob>(this);
const uint64 waitLabel = JobSystem::Dispatch(func, FoliageTypes.Count());
const int64 waitLabel = JobSystem::Dispatch(func, FoliageTypes.Count());
renderContextBatch.WaitLabels.Add(waitLabel);
return;
}

View File

@@ -513,7 +513,7 @@ API_STRUCT(NoDefault) struct RenderContextBatch
/// <summary>
/// The Job System labels to wait on, after draw calls collecting.
/// </summary>
API_FIELD() Array<uint64, InlinedAllocation<8>> WaitLabels;
API_FIELD() Array<int64, InlinedAllocation<8>> WaitLabels;
/// <summary>
/// Enables using async tasks via Job System when performing drawing.

View File

@@ -91,7 +91,7 @@ void SceneRendering::Draw(RenderContextBatch& renderContextBatch, DrawCategory c
// Run in async via Job System
Function<void(int32)> func;
func.Bind<SceneRendering, &SceneRendering::DrawActorsJob>(this);
const uint64 waitLabel = JobSystem::Dispatch(func, JobSystem::GetThreadsCount());
const int64 waitLabel = JobSystem::Dispatch(func, JobSystem::GetThreadsCount());
renderContextBatch.WaitLabels.Add(waitLabel);
}
else

View File

@@ -454,7 +454,7 @@ void RenderInner(SceneRenderTask* task, RenderContext& renderContext, RenderCont
// Wait for async jobs to finish
JobSystem::SetJobStartingOnDispatch(true);
for (const uint64 label : renderContextBatch.WaitLabels)
for (const int64 label : renderContextBatch.WaitLabels)
JobSystem::Wait(label);
renderContextBatch.WaitLabels.Clear();