Skip to content

Commit

Permalink
[WebGPU] ShaderModule should log source on failed compilation
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=266639
<radar://119870883>

Reviewed by Tadeu Zagallo.

To help triage failures, it is beneficial to see not only
the error but the source as finding the source can be non-trivial.

* Source/WebGPU/WebGPU/ShaderModule.mm:
(WebGPU::Device::createShaderModule):

Canonical link: https://commits.webkit.org/272514@main
  • Loading branch information
mwyrzykowski committed Dec 27, 2023
1 parent 3dee8c9 commit 30edec4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Source/WebGPU/WebGPU/ShaderModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
message.print("\n"_s, error);
}
dataLogLn(message.toString());
dataLogLn(fromAPI(shaderModuleParameters->wgsl.code));
generateAValidationError(message.toString());
return ShaderModule::createInvalid(*this, failedCheck);
}
Expand Down

0 comments on commit 30edec4

Please sign in to comment.