Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions impeller/compiler/spirv_sksl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,15 @@ std::string CompilerSkSL::to_function_args(const TextureFunctionArguments& args,
std::string name = to_expression(args.base.img);

std::string glsl_args = CompilerGLSL::to_function_args(args, p_forward);
// SkSL only supports coordinates. All other arguments to texture are
// unsupported and will generate invalid SkSL.
if (args.grad_x || args.grad_y || args.lod || args.coffset || args.offset ||
args.sample || args.min_lod || args.sparse_texel || args.bias ||
args.component) {
FLUTTER_CROSS_THROW(
"Only sampler and position arguments are supported in texture() "
"calls.");
}

// GLSL puts the shader as the first argument, but in SkSL the shader is
// implicitly passed as the reciever of the 'eval' method. Therefore, the
Expand Down