From f6673d9420723e7c9f5821cda614a9967e0009af Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Fri, 16 Jul 2021 22:14:09 +0000 Subject: [PATCH] Don't lose the device on shader compile failures Losing the device makes retreiving the problematic shader source difficult. Change compilation failures to be less severe validation errors. Change-Id: Ibcee9f39be66241e26cc8cfcf09c14aa7dfe2d1c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/58080 Auto-Submit: Austin Eng Reviewed-by: Corentin Wallez Commit-Queue: Austin Eng --- src/dawn_native/d3d12/ShaderModuleD3D12.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dawn_native/d3d12/ShaderModuleD3D12.cpp b/src/dawn_native/d3d12/ShaderModuleD3D12.cpp index 614cd7126e..2c1236b74f 100644 --- a/src/dawn_native/d3d12/ShaderModuleD3D12.cpp +++ b/src/dawn_native/d3d12/ShaderModuleD3D12.cpp @@ -128,7 +128,7 @@ namespace dawn_native { namespace d3d12 { std::string message = std::string("DXC compile failed with ") + static_cast(errors->GetBufferPointer()); - return DAWN_INTERNAL_ERROR(message); + return DAWN_VALIDATION_ERROR(message); } ComPtr compiledShader; @@ -163,7 +163,7 @@ namespace dawn_native { namespace d3d12 { &compiledShader, &errors))) { std::string message = std::string("D3D compile failed with ") + static_cast(errors->GetBufferPointer()); - return DAWN_INTERNAL_ERROR(message); + return DAWN_VALIDATION_ERROR(message); } return std::move(compiledShader);