tint: make uniformity analysis failures warnings again
Bug: tint:1728 Change-Id: I7684a49567d2e5c2c49f3c5b1d45a9fe543abbc9 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106940 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
parent
ee42e05101
commit
0640c81073
|
@ -1,5 +1,11 @@
|
|||
# Tint changes during Origin Trial
|
||||
|
||||
## Changes for M109
|
||||
|
||||
### New features
|
||||
|
||||
* Uniformity analysis failures are warnings again [tint:1728](crbug.com/tint/1728)
|
||||
|
||||
## Changes for M108
|
||||
|
||||
### New features
|
||||
|
|
|
@ -872,7 +872,8 @@ TEST_P(ShaderTests, ConflictingBindingsDueToTransformOrder) {
|
|||
|
||||
// Check that chromium_disable_uniformity_analysis can be used. It is normally disallowed as unsafe
|
||||
// but DawnTests allow all unsafe APIs by default.
|
||||
TEST_P(ShaderTests, CheckUsageOf_chromium_disable_uniformity_analysis) {
|
||||
// TODO(crbug.com/tint/1728): Enable again when uniformity failures are errors again
|
||||
TEST_P(ShaderTests, DISABLED_CheckUsageOf_chromium_disable_uniformity_analysis) {
|
||||
wgpu::ShaderModule module = utils::CreateShaderModule(device, R"(
|
||||
enable chromium_disable_uniformity_analysis;
|
||||
|
||||
|
|
|
@ -174,9 +174,11 @@ bool Resolver::ResolveInternal() {
|
|||
|
||||
if (!enabled_extensions_.Contains(ast::Extension::kChromiumDisableUniformityAnalysis)) {
|
||||
if (!AnalyzeUniformity(builder_, dependencies_)) {
|
||||
if (kUniformityFailuresAsError) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool result = true;
|
||||
for (auto* node : builder_->ASTNodes().Objects()) {
|
||||
|
|
|
@ -1672,7 +1672,9 @@ class UniformityGraph {
|
|||
// the `MakeError` function.
|
||||
auto report = [&](Source source, std::string msg) {
|
||||
diag::Diagnostic error{};
|
||||
error.severity = note ? diag::Severity::Note : diag::Severity::Error;
|
||||
auto failureSeverity =
|
||||
kUniformityFailuresAsError ? diag::Severity::Error : diag::Severity::Warning;
|
||||
error.severity = note ? diag::Severity::Note : failureSeverity;
|
||||
error.system = diag::System::Resolver;
|
||||
error.source = source;
|
||||
error.message = msg;
|
||||
|
|
|
@ -25,6 +25,9 @@ class ProgramBuilder;
|
|||
|
||||
namespace tint::resolver {
|
||||
|
||||
/// If true, uniformity analysis failures will be treated as an error, else as a warning.
|
||||
constexpr bool kUniformityFailuresAsError = false;
|
||||
|
||||
/// Analyze the uniformity of a program.
|
||||
/// @param builder the program to analyze
|
||||
/// @param dependency_graph the dependency-ordered module-scope declarations
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue