This commit is contained in:
Brandon Mak 2023-02-23 13:35:46 +08:00
parent 4dd496a6e8
commit a391d9373e
2 changed files with 4 additions and 1 deletions

View File

@ -464,7 +464,7 @@ namespace SHADE
SHCompileAssetEvent compileShaderEvent SHCompileAssetEvent compileShaderEvent
{ {
.assetName = newPath.filename().stem().string(), .assetName = newPath.filename().stem().string(),
.assetID = id, .assetID = target,
.assetType = AssetType::SHADER, .assetType = AssetType::SHADER,
}; };
SHEventManager::BroadcastEvent<SHCompileAssetEvent>(compileShaderEvent, SH_ASSET_COMPILE_EVENT); SHEventManager::BroadcastEvent<SHCompileAssetEvent>(compileShaderEvent, SH_ASSET_COMPILE_EVENT);

View File

@ -362,7 +362,10 @@ namespace SHADE
{ {
// if it was created before, destroy it // if it was created before, destroy it
if (created) if (created)
{
logicalDeviceHdl->WaitIdle();
logicalDeviceHdl->GetVkLogicalDevice().destroyPipeline(vkPipeline, nullptr); logicalDeviceHdl->GetVkLogicalDevice().destroyPipeline(vkPipeline, nullptr);
}
// Set to false again. If creation succeeds after this, this will be true // Set to false again. If creation succeeds after this, this will be true
created = false; created = false;