writer/wgsl: Handle ExternalTexture
Bug: dawn:728
Change-Id: Idda800c301ac88397aeeb4cd75d03d59a434c30f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53041
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/writer/wgsl/generator_impl.cc b/src/writer/wgsl/generator_impl.cc
index 9ed6527..8bba93a 100644
--- a/src/writer/wgsl/generator_impl.cc
+++ b/src/writer/wgsl/generator_impl.cc
@@ -24,6 +24,7 @@
#include "src/ast/bool_literal.h"
#include "src/ast/call_statement.h"
#include "src/ast/depth_texture.h"
+#include "src/ast/external_texture.h"
#include "src/ast/f32.h"
#include "src/ast/float_literal.h"
#include "src/ast/i32.h"
@@ -418,6 +419,8 @@
// The struct, as a type, is just the name. We should have already emitted
// the declaration through a call to |EmitStructType| earlier.
out_ << program_->Symbols().NameFor(str->name());
+ } else if (ty->Is<ast::ExternalTexture>()) {
+ out_ << "external_texture";
} else if (auto* texture = ty->As<ast::Texture>()) {
out_ << "texture_";
if (texture->Is<ast::DepthTexture>()) {