Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions microprofile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8325,7 +8325,7 @@ void MicroProfileGpuFetchRange(VkCommandBuffer CommandBuffer, uint32_t nNode, ui
if (nCount <= 0)
return;

vkGetQueryPoolResults(S.pGPU->Devices[nNode], S.pGPU->QueryPool[nNode], nBegin, nCount, 8*nCount, &S.pGPU->nResults[nBegin], 8, VK_QUERY_RESULT_64_BIT|VK_QUERY_RESULT_PARTIAL_BIT );
vkGetQueryPoolResults(S.pGPU->Devices[nNode], S.pGPU->QueryPool[nNode], nBegin, nCount, 8*nCount, &S.pGPU->nResults[nBegin], 8, VK_QUERY_RESULT_64_BIT);
vkCmdResetQueryPool(CommandBuffer, S.pGPU->QueryPool[nNode], nBegin, nCount);
for (int i = 0; i < nCount; ++i)
{
Expand Down Expand Up @@ -8540,6 +8540,18 @@ void MicroProfileGpuInitVulkan(VkDevice* pDevices, VkPhysicalDevice* pPhysicalDe

void MicroProfileGpuShutdown()
{
VkAllocationCallbacks* noAlloc = nullptr;
for(uint32_t i = 0; i < S.pGPU->nNodeCount; ++i)
{
for(uint32_t j = 0; j < MICROPROFILE_VULKAN_INTERNAL_DELAY; ++j)
{
auto& F = S.pGPU->Frames[j];
vkDestroyFence(S.pGPU->Devices[i], F.Fences[i], noAlloc);
vkFreeCommandBuffers(S.pGPU->Devices[i], S.pGPU->CommandPool[i], 1, &F.CommandBuffer[i]);
}
vkDestroyCommandPool(S.pGPU->Devices[i], S.pGPU->CommandPool[i], noAlloc);
vkDestroyQueryPool(S.pGPU->Devices[i], S.pGPU->QueryPool[i], noAlloc);
}
MP_FREE(S.pGPU);
S.pGPU = 0;
}
Expand Down Expand Up @@ -12623,7 +12635,7 @@ bool MicroProfileHashTableSet(MicroProfileHashTable* pTable, uint64_t Key, uintp
while(1)
{
const uint32_t nLim = pTable->nLim;
uint32_t B = H % pTable->nAllocated;
uint32_t B = static_cast<uint32_t>(H) % pTable->nAllocated;
MicroProfileHashTableEntry* pEntries = pTable->pEntries;

for(uint32_t i = 0; i < pTable->nAllocated; ++i)
Expand Down Expand Up @@ -12661,7 +12673,7 @@ bool MicroProfileHashTableSet(MicroProfileHashTable* pTable, uint64_t Key, uintp
bool MicroProfileHashTableGet(MicroProfileHashTable* pTable, uint64_t Key, uintptr_t* pValue)
{
uint64_t H = MicroProfileHashTableHash(pTable, Key);
uint32_t B = H % pTable->nAllocated;
uint32_t B = static_cast<uint32_t>(H) % pTable->nAllocated;
MicroProfileHashTableEntry* pEntries = pTable->pEntries;
MicroProfileHashCompareFunction Cmp = pTable->CompareFunc;
for(uint32_t i = 0; i < pTable->nAllocated; ++i)
Expand Down