diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-04-27 17:16:56 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-04-29 11:25:22 -0600 |
| commit | c7df9667ac449038dbf566ffb0c23ed867dda7a5 (patch) | |
| tree | 8b335861014ffabbcfbd50894563f9f0f0913147 /layers/draw_state.cpp | |
| parent | 769eeff3cfd22ae649199715f4c88af1cc5a818c (diff) | |
| download | usermoji-c7df9667ac449038dbf566ffb0c23ed867dda7a5.tar.xz | |
draw_state: Fix another MSVC++ debug assert
Diffstat (limited to 'layers/draw_state.cpp')
| -rwxr-xr-x | layers/draw_state.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index 8ab366fe..1b85873e 100755 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -1009,10 +1009,12 @@ static void resetCB(const VkCmdBuffer cb) { GLOBAL_CB_NODE* pCB = getCBNode(cb); if (pCB) { - while (!pCB->pCmds.empty()) { - delete pCB->pCmds.back(); - pCB->pCmds.pop_back(); + vector<CMD_NODE*> cmd_list = pCB->pCmds; + while (!cmd_list.empty()) { + delete cmd_list.back(); + cmd_list.pop_back(); } + pCB->pCmds.clear(); // Reset CB state VkFlags saveFlags = pCB->flags; uint32_t saveQueueNodeIndex = pCB->queueNodeIndex; @@ -1212,7 +1214,8 @@ static void cbDumpDotFile(string outFileName) if (pCB) { fprintf(pOutFile, "subgraph cluster_cmdBuffer%u\n{\nlabel=\"Command Buffer #%u\"\n", i, i); uint32_t instNum = 0; - for (vector<CMD_NODE*>::iterator ii=pCB->pCmds.begin(); ii!=pCB->pCmds.end(); ++ii) { + vector<CMD_NODE*> cmd_list = pCB->pCmds; + for (vector<CMD_NODE*>::iterator ii= cmd_list.begin(); ii!= cmd_list.end(); ++ii) { if (instNum) { fprintf(pOutFile, "\"CB%pCMD%u\" -> \"CB%pCMD%u\" [];\n", (void*)pCB->cmdBuffer, instNum-1, (void*)pCB->cmdBuffer, instNum); } |
