Fix async draw wait labels type
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user