Add support for passing a sampler to a function.
SkSL functions that accept a sampler parameter accept two parameters
in WGSL--a texture and its associated sampler. Function calls in
SkSL that pass a sampler argument pass two arguments in WGSL,
the texture/sampler pair. I've enabled a handful of Arman's tests
which exercise this functionality.
This CL also fixes a minor bug with texture2D binding locations;
these were reading from layout.fTexture instead of layout.fBinding.
This mistake was exposed by the output from the newly-enabled tests.
Change-Id: I3c892088d083c74ae50c09b63060e5c9936b6c87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/736077
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
7 files changed