Fix delay on virtual GPU texture upload

This commit is contained in:
2026-08-09 07:18:21 +02:00
parent 1bcc39179f
commit fff611e7d2
6 changed files with 46 additions and 29 deletions
+10 -2
View File
@@ -115,8 +115,6 @@ void StreamableResource::StopStreaming()
void UpdateResource(StreamableResource* resource, double currentTime)
{
ASSERT(resource && resource->CanBeUpdated());
// Pick group and handler dedicated for that resource
auto group = resource->GetGroup();
auto handler = group->GetHandler();
@@ -328,3 +326,13 @@ GPUSampler* Streaming::GetTextureGroupSampler(int32 index)
}
return sampler;
}
void Streaming::UpdateResource(StreamableResource* resource)
{
if (!resource || !resource->CanBeUpdated())
return;
PROFILE_MEM(ContentStreaming);
ScopeLock lock(ResourcesLock);
const double currentTime = Platform::GetTimeSeconds();
::UpdateResource(resource, currentTime);
}