Always run the Tint renamer, even with dump_translated_shaders
Not running the renamer can produce code that fails to compile on the backend, resulting in device lost errors. Change-Id: I4a841a281142bb8eda1402e1ebd6a5d23b77bfe0 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57745 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
4773e8d0f9
commit
0a58972309
|
@ -258,10 +258,7 @@ namespace dawn_native { namespace d3d12 {
|
||||||
layout->GetFirstIndexOffsetRegisterSpace());
|
layout->GetFirstIndexOffsetRegisterSpace());
|
||||||
}
|
}
|
||||||
transformManager.Add<tint::transform::BindingRemapper>();
|
transformManager.Add<tint::transform::BindingRemapper>();
|
||||||
|
transformManager.Add<tint::transform::Renamer>();
|
||||||
if (!GetDevice()->IsToggleEnabled(Toggle::DumpTranslatedShaders)) {
|
|
||||||
transformManager.Add<tint::transform::Renamer>();
|
|
||||||
}
|
|
||||||
|
|
||||||
// D3D12 registers like `t3` and `c3` have the same bindingOffset number in the
|
// D3D12 registers like `t3` and `c3` have the same bindingOffset number in the
|
||||||
// remapping but should not be considered a collision because they have different types.
|
// remapping but should not be considered a collision because they have different types.
|
||||||
|
@ -292,11 +289,7 @@ namespace dawn_native { namespace d3d12 {
|
||||||
}
|
}
|
||||||
*remappedEntryPointName = it->second;
|
*remappedEntryPointName = it->second;
|
||||||
} else {
|
} else {
|
||||||
if (GetDevice()->IsToggleEnabled(Toggle::DumpTranslatedShaders)) {
|
return DAWN_VALIDATION_ERROR("Transform output missing renamer data.");
|
||||||
*remappedEntryPointName = entryPointName;
|
|
||||||
} else {
|
|
||||||
return DAWN_VALIDATION_ERROR("Transform output missing renamer data.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tint::writer::hlsl::Options options;
|
tint::writer::hlsl::Options options;
|
||||||
|
|
|
@ -123,10 +123,7 @@ namespace dawn_native { namespace metal {
|
||||||
transformManager.Add<tint::transform::BoundArrayAccessors>();
|
transformManager.Add<tint::transform::BoundArrayAccessors>();
|
||||||
}
|
}
|
||||||
transformManager.Add<tint::transform::BindingRemapper>();
|
transformManager.Add<tint::transform::BindingRemapper>();
|
||||||
|
transformManager.Add<tint::transform::Renamer>();
|
||||||
if (!GetDevice()->IsToggleEnabled(Toggle::DumpTranslatedShaders)) {
|
|
||||||
transformManager.Add<tint::transform::Renamer>();
|
|
||||||
}
|
|
||||||
|
|
||||||
transformInputs.Add<BindingRemapper::Remappings>(std::move(bindingPoints),
|
transformInputs.Add<BindingRemapper::Remappings>(std::move(bindingPoints),
|
||||||
std::move(accessControls),
|
std::move(accessControls),
|
||||||
|
@ -144,11 +141,7 @@ namespace dawn_native { namespace metal {
|
||||||
}
|
}
|
||||||
*remappedEntryPointName = it->second;
|
*remappedEntryPointName = it->second;
|
||||||
} else {
|
} else {
|
||||||
if (GetDevice()->IsToggleEnabled(Toggle::DumpTranslatedShaders)) {
|
return DAWN_VALIDATION_ERROR("Transform output missing renamer data.");
|
||||||
*remappedEntryPointName = entryPointName;
|
|
||||||
} else {
|
|
||||||
return DAWN_VALIDATION_ERROR("Transform output missing renamer data.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tint::writer::msl::Options options;
|
tint::writer::msl::Options options;
|
||||||
|
|
Loading…
Reference in New Issue