Always run Multiplanar transform.

Currently the multiplanar transform is only run if a global variable is
seen with a `texture_external`. There are cases where a function with a
`texture_external` can exist (the fuzzers do this, the tint command line
can do this as well). These will fail when hitting the backend.

This CL makes the running of multiplanar unconditional. This causes the
logic to process the function parameters to run and the external texture
is removed.

Bug: chromium:1431610
Change-Id: I1793142e803e864c744b38cf843931521e6a449f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/126921
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
dan sinclair 2023-04-11 23:02:45 +00:00 committed by Dawn LUCI CQ
parent d146c8a7a2
commit 04d61c85cd
4 changed files with 16 additions and 24 deletions

View File

@ -180,12 +180,10 @@ SanitizedResult Sanitize(const Program* in,
manager.Add<transform::Robustness>();
}
if (!options.external_texture_options.bindings_map.empty()) {
// Note: it is more efficient for MultiplanarExternalTexture to come after Robustness
data.Add<transform::MultiplanarExternalTexture::NewBindingPoints>(
options.external_texture_options.bindings_map);
manager.Add<transform::MultiplanarExternalTexture>();
}
// Note: it is more efficient for MultiplanarExternalTexture to come after Robustness
data.Add<transform::MultiplanarExternalTexture::NewBindingPoints>(
options.external_texture_options.bindings_map);
manager.Add<transform::MultiplanarExternalTexture>();
{ // Builtin polyfills
transform::BuiltinPolyfill::Builtins polyfills;

View File

@ -195,12 +195,10 @@ SanitizedResult Sanitize(const Program* in, const Options& options) {
manager.Add<transform::Robustness>();
}
if (!options.external_texture_options.bindings_map.empty()) {
// Note: it is more efficient for MultiplanarExternalTexture to come after Robustness
data.Add<transform::MultiplanarExternalTexture::NewBindingPoints>(
options.external_texture_options.bindings_map);
manager.Add<transform::MultiplanarExternalTexture>();
}
// Note: it is more efficient for MultiplanarExternalTexture to come after Robustness
data.Add<transform::MultiplanarExternalTexture::NewBindingPoints>(
options.external_texture_options.bindings_map);
manager.Add<transform::MultiplanarExternalTexture>();
// BindingRemapper must come after MultiplanarExternalTexture
manager.Add<transform::BindingRemapper>();

View File

@ -211,12 +211,10 @@ SanitizedResult Sanitize(const Program* in, const Options& options) {
manager.Add<transform::BuiltinPolyfill>();
}
if (!options.external_texture_options.bindings_map.empty()) {
// Note: it is more efficient for MultiplanarExternalTexture to come after Robustness
data.Add<transform::MultiplanarExternalTexture::NewBindingPoints>(
options.external_texture_options.bindings_map);
manager.Add<transform::MultiplanarExternalTexture>();
}
// Note: it is more efficient for MultiplanarExternalTexture to come after Robustness
data.Add<transform::MultiplanarExternalTexture::NewBindingPoints>(
options.external_texture_options.bindings_map);
manager.Add<transform::MultiplanarExternalTexture>();
// BindingRemapper must come after MultiplanarExternalTexture
manager.Add<transform::BindingRemapper>();

View File

@ -92,12 +92,10 @@ SanitizedResult Sanitize(const Program* in, const Options& options) {
options.binding_remapper_options.access_controls,
options.binding_remapper_options.allow_collisions);
if (!options.external_texture_options.bindings_map.empty()) {
// Note: it is more efficient for MultiplanarExternalTexture to come after Robustness
data.Add<transform::MultiplanarExternalTexture::NewBindingPoints>(
options.external_texture_options.bindings_map);
manager.Add<transform::MultiplanarExternalTexture>();
}
// Note: it is more efficient for MultiplanarExternalTexture to come after Robustness
data.Add<transform::MultiplanarExternalTexture::NewBindingPoints>(
options.external_texture_options.bindings_map);
manager.Add<transform::MultiplanarExternalTexture>();
{ // Builtin polyfills
// BuiltinPolyfill must come before DirectVariableAccess, due to the use of pointer