Disable shader compilation if any errors are present

このコミットが含まれているのは:
Sergio Pedri committed 2022-04-24 21:04:30 +02:00
1 親 5390d8b27c
コミット fd9d8a6f65
5ファイル変更
+18 -5

検索条件に一致するファイルはありません

@@ -78,8 +78,11 @@ partial class ID2D1ShaderGenerator
{
ImmutableArray<byte> bytecode = ImmutableArray<byte>.Empty;
// No embedded shader was requested
if (sourceInfo.ShaderProfile is null)
// No embedded shader was requested, or there were some errors earlier in the pipeline.
// In this case, skip the compilation, as diagnostic will be emitted for those anyway.
// Compiling would just add overhead and result in more errors, as the HLSL would be invalid.
if (sourceInfo.HasErrors ||
sourceInfo.ShaderProfile is null)
{
diagnostic = null;