Skip to content

Commit

Permalink
Fixed compile issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fLindahl committed Mar 27, 2024
1 parent 6bd630c commit 56b45bc
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 15 deletions.
11 changes: 5 additions & 6 deletions code/addons/audiofeature/audiofeatureunit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ AudioFeatureUnit::~AudioFeatureUnit()
void
AudioFeatureUnit::OnAttach()
{
Game::World* world = Game::GetWorld(WORLD_DEFAULT);
world->RegisterType<AudioEmitter>({ .decay = true, .OnInit = &AudioManager::InitAudioEmitter });
world->RegisterType<SpatialAudioEmission>();
world->RegisterType<AudioListener>();
world->RegisterType<ClipInstance>();
world->RegisterType<PlayAudioEvent>();
Game::RegisterType<AudioEmitter>({ .decay = true, .OnInit = &AudioManager::InitAudioEmitter });
Game::RegisterType<SpatialAudioEmission>();
Game::RegisterType<AudioListener>();
Game::RegisterType<ClipInstance>();
Game::RegisterType<PlayAudioEvent>();
}

//------------------------------------------------------------------------------
Expand Down
7 changes: 3 additions & 4 deletions code/addons/graphicsfeature/graphicsfeatureunit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ GraphicsFeatureUnit::~GraphicsFeatureUnit()
void
GraphicsFeatureUnit::OnAttach()
{
Game::World* world = Game::GetWorld(WORLD_DEFAULT);
world->RegisterType<PointLight>({.decay = true, .OnInit = &GraphicsManager::InitPointLight });
world->RegisterType<Model>({.decay = true, .OnInit = &GraphicsManager::InitModel });
world->RegisterType<Camera>();
Game::RegisterType<PointLight>({.decay = true, .OnInit = &GraphicsManager::InitPointLight });
Game::RegisterType<Model>({.decay = true, .OnInit = &GraphicsManager::InitModel });
Game::RegisterType<Camera>();
}

//------------------------------------------------------------------------------
Expand Down
15 changes: 14 additions & 1 deletion code/addons/memdb/tablesignature.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,20 @@ inline void
TableSignature::SetBit(AttributeId component)
{
int offset = component.id / 128;
n_assert(offset < this->size); // currently, we can't set a bit that is outside the signatures size.
if (offset >= this->size)
{
uint8_t newSize = offset + 1;
__m128i* newMask = (__m128i*)Memory::Alloc(Memory::HeapType::ObjectHeap, newSize * 16);
if (this->mask != nullptr)
{
for (int i = 0; i < this->size; i++)
newMask[i] = _mm_load_si128(this->mask + i);

Memory::Free(Memory::HeapType::ObjectHeap, this->mask);
}
this->mask = newMask;
this->size = newSize;
}
alignas(16) uint64_t partialMask[2] = {0, 0};
uint64_t bit = component.id % 128;
partialMask[bit / 64] |= 1ull << bit;
Expand Down
8 changes: 4 additions & 4 deletions code/render/coregraphics/base/shaderserverbase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ ShaderServerBase::Close()
n_assert(this->isOpen);
#ifndef __linux__
// unwatch
if (IO::IoServer::Instance()->DirectoryExists("home:work/shaders/vk"))
{
IO::FileWatcher::Instance()->Unwatch("home:work/shaders/vk");
}
//if (IO::IoServer::Instance()->DirectoryExists("home:work/shaders/vk"))
//{
// IO::FileWatcher::Instance()->Unwatch("home:work/shaders/vk");
//}
#endif

// unload all currently loaded shaders
Expand Down

0 comments on commit 56b45bc

Please sign in to comment.