Go to file
John Stiles 9078a89b26 Avoid mix-up between MAIN_COORDS and FRAGCOORD.
When compiling test shaders, we were setting SK_FRAGCOORD_BUILTIN on the
`coords` parameter to main() instead of SK_MAIN_COORDS_BUILTIN. These
two built-ins don't have the same type (float2 vs. float4) and don't
mean quite the same thing.

The SPIR-V code generator saw a variable with the SK_FRAGCOORD_BUILTIN
builtin value and assumed the presence of a global variable named
`sk_FragCoord`, which didn't exist (because it was never referenced in
the code, so it was never cloned in from the sksl_frag module).

This is only a concern when compiling test shaders with skslc; real
shaders don't hit these code paths. The generated code here is still
imperfect; if you look closely, you'll see the GLSL and Metal code is
referencing the `coords` variable but it's never declared anywhere.

Change-Id: I3ad249469927ff35eb1e75d6536f95317502708f
Bug: skia:12340
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440520
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-18 20:11:19 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bazel bazel baby steps 2020-09-14 15:18:32 +00:00
bench Remove old color space configs from tools 2021-08-18 14:34:44 +00:00
bin Fix fetch-sk on Windows 2021-08-02 22:12:12 +00:00
build/fuchsia [fuchsia] Fix fidlc command. 2020-06-10 03:29:24 +00:00
build_overrides fix tint roll - enable tint_build_wgsl_writer 2021-07-01 00:32:40 +00:00
client_utils/android Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
demos.skia.org [canvaskit] Fix demo image link 2021-06-03 12:57:50 +00:00
dm Remove old color space configs from tools 2021-08-18 14:34:44 +00:00
docker [infra] Update cmake docker image to be Debian 10 2021-07-23 11:21:31 +00:00
docs/examples Fix cases of variable shadowing in /tools/. 2021-08-11 16:05:52 +00:00
example Remove SDL from DEPS (and SDL example that used it) 2021-05-27 21:37:57 +00:00
experimental SkText: refactoring in process 2021-08-17 14:57:15 +00:00
fuzz Improve SPIR-V handling of RTFlip when running the fuzzer. 2021-08-17 22:31:10 +00:00
gm Revert "Add GM slide for ES3 trig intrinsics." 2021-08-18 19:35:19 +00:00
gn Move GrStencilMaskHelper and GrStencilClip to skgpu::v1 namespace 2021-08-18 15:59:14 +00:00
include Move several more PathRenderers to skgpu::v1 namespace 2021-08-17 22:19:11 +00:00
infra [infra] Remove Nexus5x jobs, move Wuffs to Pixel4 2021-08-18 15:10:48 +00:00
modules Create Vec2ExpressionAnimator 2021-08-17 18:36:12 +00:00
platform_tools [androidkit] add seekTime and seekFrame for SkottieView util view 2021-07-29 14:12:54 +00:00
resources Avoid mix-up between MAIN_COORDS and FRAGCOORD. 2021-08-18 20:11:19 +00:00
samplecode Fix a couple Wshadow warnings 2021-08-17 15:09:14 +00:00
site Update minimum Linux versions 2021-07-16 16:20:26 +00:00
specs Fix CanvasKit generated documentation to work with emscripten 1.39.16. 2020-05-27 12:23:32 +00:00
src Avoid mix-up between MAIN_COORDS and FRAGCOORD. 2021-08-18 20:11:19 +00:00
tests Avoid mix-up between MAIN_COORDS and FRAGCOORD. 2021-08-18 20:11:19 +00:00
third_party update libwebp to v1.2.1 2021-08-16 13:57:40 +00:00
tools Remove old color space configs from tools 2021-08-18 14:34:44 +00:00
.bazelignore bazel baby steps 2020-09-14 15:18:32 +00:00
.clang-format no more bin packing in .clang-format 2021-03-04 17:22:50 +00:00
.clang-tidy Disable ClangTidy namespace comments for short blocks. 2020-08-24 14:01:22 +00:00
.gitignore add mskps/ to .gitignore 2021-07-06 21:04:55 +00:00
.gn Pre-emptive fix for upcoming ANGLE change. 2021-01-08 17:23:52 +00:00
AUTHORS Correct a typo in build_workaround_header.py 2021-07-29 13:06:01 +00:00
BUILD.bazel bazel baby steps 2020-09-14 15:18:32 +00:00
BUILD.gn Remove unneeded skottie_android dep 2021-08-09 16:34:52 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Roll ANGLE from 0be285c6ee72 to 7e040640ef1c (12 revisions) 2021-08-18 05:32:44 +00:00
DIR_METADATA Move metadata in OWNERS files to DIR_METADATA files 2021-02-02 23:41:54 +00:00
go.mod [infra] Update buildbot repo used by go.mod 2021-08-05 19:12:58 +00:00
go.sum [infra] Update buildbot repo used by go.mod 2021-08-05 19:12:58 +00:00
LICENSE LICENSE file: clean up 2019-11-22 21:59:03 +00:00
PRESUBMIT.py [infra] Update PRESUBMIT.py to run under Python3 2021-08-16 20:00:46 +00:00
public.bzl Separate SkUnicode bazel source sets 2021-08-09 18:23:15 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
RELEASE_NOTES.txt SkSL: Allow invoking children (shaders, etc) like functions 2021-08-16 14:52:51 +00:00
whitespace.txt Test SkCQ 2021-07-24 21:07:28 +00:00
WORKSPACE.bazel bazel baby steps 2020-09-14 15:18:32 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.