Skip to content

Commit b299b4d

Browse files
committed
Fix for some devices
1 parent e3b9f56 commit b299b4d

3 files changed

Lines changed: 61 additions & 10 deletions

File tree

src_test/test_depth_stencil.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,11 @@ void test_depth_stencil(LLGI::DeviceType deviceType, DepthStencilTestMode mode)
295295
}
296296
}
297297

298+
commandList->WaitUntilCompleted();
299+
graphics->WaitFinish();
300+
298301
pips.clear();
299302
screenPips.clear();
300-
301-
graphics->WaitFinish();
302303
}
303304

304305
TestRegister DepthStencil_Depth("DepthStencil.Depth",

src_test/test_renderPass.cpp

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,14 @@ void test_renderPass(LLGI::DeviceType deviceType, RenderPassTestMode mode)
293293
}
294294
}
295295

296-
pips.clear();
297-
296+
for (size_t i = 0; i < commandLists.size(); i++)
297+
{
298+
commandLists[i]->WaitUntilCompleted();
299+
}
298300
graphics->WaitFinish();
299301

302+
pips.clear();
303+
300304
LLGI::SafeRelease(sfMemoryPool);
301305
LLGI::SafeRelease(renderTexture);
302306
LLGI::SafeRelease(renderTextureDst);
@@ -305,7 +309,9 @@ void test_renderPass(LLGI::DeviceType deviceType, RenderPassTestMode mode)
305309
LLGI::SafeRelease(renderPass);
306310
LLGI::SafeRelease(texture);
307311
for (size_t i = 0; i < commandLists.size(); i++)
312+
{
308313
LLGI::SafeRelease(commandLists[i]);
314+
}
309315
LLGI::SafeRelease(graphics);
310316
LLGI::SafeRelease(platform);
311317
}
@@ -388,6 +394,10 @@ void test_copyTextureToScreen(LLGI::DeviceType deviceType)
388394
}
389395
}
390396

397+
for (size_t i = 0; i < commandLists.size(); i++)
398+
{
399+
commandLists[i]->WaitUntilCompleted();
400+
}
391401
graphics->WaitFinish();
392402

393403
LLGI::SafeRelease(sfMemoryPool);
@@ -593,17 +603,23 @@ void test_multiRenderPass(LLGI::DeviceType deviceType)
593603
}
594604
}
595605

596-
pips.clear();
597-
606+
for (size_t i = 0; i < commandLists.size(); i++)
607+
{
608+
commandLists[i]->WaitUntilCompleted();
609+
}
598610
graphics->WaitFinish();
599611

612+
pips.clear();
613+
600614
LLGI::SafeRelease(sfMemoryPool);
601615
LLGI::SafeRelease(renderTexture1);
602616
LLGI::SafeRelease(renderTexture2);
603617
LLGI::SafeRelease(renderPass);
604618
LLGI::SafeRelease(texture);
605619
for (size_t i = 0; i < commandLists.size(); i++)
620+
{
606621
LLGI::SafeRelease(commandLists[i]);
622+
}
607623

608624
LLGI::SafeRelease(compiler);
609625
}

src_test/test_simple_render.cpp

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ void test_simple_rectangle(LLGI::DeviceType deviceType, SingleRectangleTestMode
157157
}
158158
}
159159

160+
for (int i = 0; i < 3; i++)
161+
{
162+
auto commandList = commandListPool->Get();
163+
commandList->WaitUntilCompleted();
164+
}
165+
160166
pips.clear();
161167

162168
graphics->WaitFinish();
@@ -263,6 +269,12 @@ void test_index_offset(LLGI::DeviceType deviceType)
263269
}
264270
}
265271

272+
for (size_t i = 0; i < commandLists.size(); i++)
273+
{
274+
auto commandList = commandLists[i];
275+
commandList->WaitUntilCompleted();
276+
}
277+
266278
pips.clear();
267279

268280
graphics->WaitFinish();
@@ -551,10 +563,15 @@ void main()
551563
}
552564
}
553565

554-
pips.clear();
555-
566+
for (int i = 0; i < commandLists.size(); i++)
567+
{
568+
auto commandList = commandLists[i];
569+
commandList->WaitUntilCompleted();
570+
}
556571
graphics->WaitFinish();
557572

573+
pips.clear();
574+
558575
LLGI::SafeRelease(sfMemoryPool);
559576
LLGI::SafeRelease(cb_vs);
560577
LLGI::SafeRelease(cb_ps);
@@ -815,10 +832,15 @@ void main()
815832
}
816833
}
817834

818-
pips.clear();
819-
835+
for (size_t i = 0; i < commandLists.size(); i++)
836+
{
837+
auto commandList = commandLists[i];
838+
commandList->WaitUntilCompleted();
839+
}
820840
graphics->WaitFinish();
821841

842+
pips.clear();
843+
822844
LLGI::SafeRelease(sfMemoryPool);
823845
LLGI::SafeRelease(textureDrawn);
824846
LLGI::SafeRelease(shader_vs);
@@ -942,6 +964,12 @@ void test_instancing(LLGI::DeviceType deviceType)
942964
}
943965
}
944966

967+
for (int i = 0; i < 3; i++)
968+
{
969+
auto commandList = commandListPool->Get();
970+
commandList->WaitUntilCompleted();
971+
}
972+
graphics->WaitFinish();
945973
pips.clear();
946974
}
947975

@@ -1188,6 +1216,12 @@ void test_vtf(LLGI::DeviceType deviceType)
11881216
}
11891217
}
11901218

1219+
for (int i = 0; i < 3; i++)
1220+
{
1221+
auto commandList = commandListPool->Get();
1222+
commandList->WaitUntilCompleted();
1223+
}
1224+
graphics->WaitFinish();
11911225
pips.clear();
11921226
}
11931227

0 commit comments

Comments
 (0)