Skip to content

Commit

Permalink
properly remove thread refs from occlusion queries
Browse files Browse the repository at this point in the history
fixes infinite loop on exit
related to #276
  • Loading branch information
megai2 committed Aug 11, 2020
1 parent 2e26f8a commit 08443e5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions d912pxy/d912pxy_query_occlusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,16 @@ void d912pxy_query_occlusion::FreePendingQueryObjects()

void d912pxy_query_occlusion::DeInitOccQueryEmulation()
{
//finish outstanding queres so thery are properly freed on exit
d912pxy_query_occlusion_gpu_stack* readStack = &g_gpuStack[!g_writeStack];
if (readStack->count)
{
for (int i = 0; i != readStack->count; ++i)
readStack->stack[i]->SetQueryResult(0);

readStack->count = 0;
}

if (!g_occQueryHeap)
return;

Expand Down

0 comments on commit 08443e5

Please sign in to comment.