Tweaks
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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!");
|
||||
|
||||
Reference in New Issue
Block a user