@@ -372,6 +372,9 @@ class DynamicTextureIndexingApp : public ApplicationBase
372372 mdiCallParams[i].maxCount = pmbData.mdiParameterCount ;
373373 }
374374
375+ //
376+ cpu2gpuParams.beginCommandBuffers ();
377+
375378 // create pipeline
376379 IAssetLoader::SAssetLoadParams lp;
377380 auto vertexShaderBundle = assetManager->getAsset (" ../mesh.vert" , lp);
@@ -417,7 +420,6 @@ class DynamicTextureIndexingApp : public ApplicationBase
417420 }
418421
419422 auto gpuShaders = cpu2gpu.getGPUObjectsFromAssets (shaders, shaders + 2 , cpu2gpuParams);
420- // cpu2gpuParams.waitForCreationToComplete();
421423 IGPUSpecializedShader* shaders[2 ] = { gpuShaders->operator [](0 ).get (), gpuShaders->operator [](1 ).get () };
422424
423425 gpuPipelineLayout = logicalDevice->createGPUPipelineLayout (range, range + 1 , core::smart_refctd_ptr (ds0layout), core::smart_refctd_ptr (ds1layout));
@@ -454,7 +456,6 @@ class DynamicTextureIndexingApp : public ApplicationBase
454456
455457
456458 auto gpuTexture = cpu2gpu.getGPUObjectsFromAssets (&texture, &texture + 1 , cpu2gpuParams)->front ();
457- cpu2gpuParams.waitForCreationToComplete ();
458459
459460 info[bind].image .imageLayout = asset::EIL_UNDEFINED;
460461 info[bind].image .sampler = core::smart_refctd_ptr (sampler);
@@ -487,6 +488,8 @@ class DynamicTextureIndexingApp : public ApplicationBase
487488 }
488489 }
489490
491+ cpu2gpuParams.waitForCreationToComplete ();
492+
490493 core::vectorSIMDf cameraPosition (-4 , 0 , 0 );
491494 matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH (core::radians (60 .0f ), float (WIN_W) / WIN_H, 0.1 , 100000 );
492495 camera = Camera (cameraPosition, core::vectorSIMDf (0 , 0 , 0 ), projectionMatrix, 1 .f , 1 .f );
0 commit comments