[wgsl] Refactor const-eval workaround into automatic helper

Bug: b/465408252
Change-Id: Ic8f8ee4ac16b994b92fb994d262cee25230538bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1118697
Reviewed-by: Thomas Smith <thomsmit@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
12 files changed