This commit is contained in:
Wojtek Figat
2021-07-06 11:13:43 +02:00
parent 687fa325fa
commit 43e5805e50
3 changed files with 12 additions and 28 deletions

View File

@@ -986,25 +986,17 @@ Asset* Content::load(const Guid& id, const ScriptingTypeHandle& type, AssetInfo&
#endif
// Register asset
{
AssetsLocker.Lock();
ASSERT(result->GetID() == id);
AssetsLocker.Lock();
#if ASSETS_LOADING_EXTRA_VERIFICATION
// Asset id has to be unique
if (Assets.ContainsKey(id))
{
CRASH;
}
#endif
// Add to the list
ASSERT(result->GetID() == id);
Assets.Add(id, result);
AssetsLocker.Unlock();
// Asset id has to be unique
if (Assets.ContainsKey(id))
{
CRASH;
}
#endif
Assets.Add(id, result);
AssetsLocker.Unlock();
// Start asset loading
result->startLoading();

View File

@@ -150,16 +150,10 @@ bool Win32Platform::Init()
CpuInfo.L1CacheSize = processorL1CacheSize;
CpuInfo.L2CacheSize = processorL2CacheSize;
CpuInfo.L3CacheSize = processorL3CacheSize;
// Get page size
SYSTEM_INFO siSysInfo;
GetSystemInfo(&siSysInfo);
CpuInfo.PageSize = siSysInfo.dwPageSize;
// Get clock speed
CpuInfo.ClockSpeed = GetClockFrequency();
// Get cache line size
CpuInfo.ClockSpeed = ClockFrequency;
{
int args[4];
__cpuid(args, 0x80000006);

View File

@@ -348,11 +348,9 @@ void AtmospherePreComputeService::Update()
// Init service
if (!_shader)
{
_shader = Content::LoadAsyncInternal<Shader>(TEXT("Shaders/AtmospherePreCompute"));
if (_shader && !_shader->IsLoaded())
return;
}
if (_shader && !_shader->IsLoaded())
return;
if (init())
{
LOG(Fatal, "Cannot setup Atmosphere Pre Compute!");