jobsystem: group shared memory with thread_local instead of alloca

This commit is contained in:
Turánszki János
2022-04-26 11:49:20 +02:00
parent e934673562
commit ee8e018038
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -348,7 +348,7 @@ namespace wi::audio
{ XAUDIO2_SEND_USEFILTER, instanceinternal->audio->reverbSubmix }, // this should be last to enable/disable reverb simply
};
XAUDIO2_VOICE_SENDS SFXSendList = {
instance->IsEnableReverb() ? arraysize(SFXSend) : 1,
instance->IsEnableReverb() ? (uint32_t)arraysize(SFXSend) : 1,
SFXSend
};
+3 -1
View File
@@ -87,7 +87,9 @@ namespace wi::jobsystem
args.groupID = job.groupID;
if (job.sharedmemory_size > 0)
{
args.sharedmemory = alloca(job.sharedmemory_size);
thread_local static wi::vector<uint8_t> shared_allocation_data;
shared_allocation_data.reserve(job.sharedmemory_size);
args.sharedmemory = shared_allocation_data.data();
}
else
{
+1 -1
View File
@@ -9,7 +9,7 @@ namespace wi::version
// minor features, major updates, breaking compatibility changes
const int minor = 60;
// minor bug fixes, alterations, refactors, updates
const int revision = 56;
const int revision = 57;
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);