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:
parent
d146c8a7a2
commit
04d61c85cd
|
@ -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;
|
||||
|
|
|
@ -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>();
|
||||
|
|
|
@ -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>();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue