mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 22:50:45 +00:00
Fix Optick threadTLS nullptr check and OPTICK_SET_MEMORY_ALLOCATOR stub #define
This commit is contained in:
parent
d9d721a73e
commit
18665e34a1
2 changed files with 4 additions and 3 deletions
|
@ -1096,7 +1096,7 @@ struct OptickApp
|
|||
#define OPTICK_STORAGE_PUSH(STORAGE, DESCRIPTION, CPU_TIMESTAMP_START)
|
||||
#define OPTICK_STORAGE_POP(STORAGE, CPU_TIMESTAMP_FINISH)
|
||||
#define OPTICK_SET_STATE_CHANGED_CALLBACK(CALLBACK)
|
||||
#define OPTICK_SET_MEMORY_ALLOCATOR(ALLOCATE_FUNCTION, DEALLOCATE_FUNCTION)
|
||||
#define OPTICK_SET_MEMORY_ALLOCATOR(ALLOCATE_FUNCTION, DEALLOCATE_FUNCTION, INIT_THREAD_CALLBACK)
|
||||
#define OPTICK_SHUTDOWN()
|
||||
#define OPTICK_GPU_INIT_D3D12(DEVICE, CMD_QUEUES, NUM_CMD_QUEUS)
|
||||
#define OPTICK_GPU_INIT_VULKAN(DEVICES, PHYSICAL_DEVICES, CMD_QUEUES, CMD_QUEUES_FAMILY, NUM_CMD_QUEUS, FUNCTIONS)
|
||||
|
|
|
@ -337,7 +337,8 @@ struct ThreadEntry
|
|||
// https://github.com/ulricheck/optick/pull/1/commits/1e5e1919816a64f235caa0f4b0bf20495225b1fa
|
||||
~ThreadEntry()
|
||||
{
|
||||
if((*threadTLS)!=nullptr)
|
||||
// SRS - check threadTLS for null before dereferencing, not *threadTLS
|
||||
if (threadTLS != nullptr)
|
||||
{
|
||||
*threadTLS = nullptr;
|
||||
}
|
||||
|
@ -650,4 +651,4 @@ public:
|
|||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
}
|
||||
|
||||
#endif //USE_OPTICK
|
||||
#endif //USE_OPTICK
|
||||
|
|
Loading…
Reference in a new issue