[D3D12] Don't crash if failed to compile a shader

This commit is contained in:
Triang3l
2018-08-01 14:02:32 +03:00
parent 235799eecd
commit 2b482352d0
2 changed files with 15 additions and 4 deletions

View File

@@ -265,6 +265,14 @@ PipelineCache::UpdateStatus PipelineCache::UpdateShaderStages(
XELOGE("Failed to translate the pixel shader!");
return UpdateStatus::kError;
}
if (!vertex_shader->is_valid()) {
XELOGE("Failed to prepare the vertex shader!");
return UpdateStatus::kError;
}
if (pixel_shader != nullptr && !pixel_shader->is_valid()) {
XELOGE("Failed to prepare the pixel shader!");
return UpdateStatus::kError;
}
update_desc_.pRootSignature =
command_processor_->GetRootSignature(vertex_shader, pixel_shader);