Return errors in ExtractSpirvInfo instead of sending to the device

BUG=dawn:274

Change-Id: Ieeaffdd356a6f2174a39a8098b306c36d10ef9e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15100
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
Ryan Harrison
2020-01-15 14:56:22 +00:00
committed by Commit Bot service account
parent 3a1746e71c
commit 9af58bbe14
7 changed files with 159 additions and 177 deletions

View File

@@ -138,10 +138,10 @@ namespace dawn_native { namespace null {
spirv_cross::Compiler* compiler =
reinterpret_cast<spirv_cross::Compiler*>(context.GetCompiler());
module->ExtractSpirvInfo(*compiler);
DAWN_TRY(module->ExtractSpirvInfo(*compiler));
} else {
spirv_cross::Compiler compiler(descriptor->code, descriptor->codeSize);
module->ExtractSpirvInfo(compiler);
DAWN_TRY(module->ExtractSpirvInfo(compiler));
}
return module;
}