@@ -372,6 +372,9 @@ class DynamicTextureIndexingApp : public ApplicationBase
372
372
mdiCallParams[i].maxCount = pmbData.mdiParameterCount ;
373
373
}
374
374
375
+ //
376
+ cpu2gpuParams.beginCommandBuffers ();
377
+
375
378
// create pipeline
376
379
IAssetLoader::SAssetLoadParams lp;
377
380
auto vertexShaderBundle = assetManager->getAsset (" ../mesh.vert" , lp);
@@ -417,7 +420,6 @@ class DynamicTextureIndexingApp : public ApplicationBase
417
420
}
418
421
419
422
auto gpuShaders = cpu2gpu.getGPUObjectsFromAssets (shaders, shaders + 2 , cpu2gpuParams);
420
- // cpu2gpuParams.waitForCreationToComplete();
421
423
IGPUSpecializedShader* shaders[2 ] = { gpuShaders->operator [](0 ).get (), gpuShaders->operator [](1 ).get () };
422
424
423
425
gpuPipelineLayout = logicalDevice->createGPUPipelineLayout (range, range + 1 , core::smart_refctd_ptr (ds0layout), core::smart_refctd_ptr (ds1layout));
@@ -454,7 +456,6 @@ class DynamicTextureIndexingApp : public ApplicationBase
454
456
455
457
456
458
auto gpuTexture = cpu2gpu.getGPUObjectsFromAssets (&texture, &texture + 1 , cpu2gpuParams)->front ();
457
- cpu2gpuParams.waitForCreationToComplete ();
458
459
459
460
info[bind].image .imageLayout = asset::EIL_UNDEFINED;
460
461
info[bind].image .sampler = core::smart_refctd_ptr (sampler);
@@ -487,6 +488,8 @@ class DynamicTextureIndexingApp : public ApplicationBase
487
488
}
488
489
}
489
490
491
+ cpu2gpuParams.waitForCreationToComplete ();
492
+
490
493
core::vectorSIMDf cameraPosition (-4 , 0 , 0 );
491
494
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH (core::radians (60 .0f ), float (WIN_W) / WIN_H, 0.1 , 100000 );
492
495
camera = Camera (cameraPosition, core::vectorSIMDf (0 , 0 , 0 ), projectionMatrix, 1 .f , 1 .f );
0 commit comments