Bug: skia:11844
Change-Id: I959966d9c2366c249bbdb3b78d47d0e29e9e43f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395719
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Also add unit test of all GLSL type aliases.
Bug: skia:10679
Change-Id: I93e21621c11adfe3f114d0c55fb8043518e62696
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395718
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Allows GrProcessors to change behavior based on cap.
Bug: skia:11844
Change-Id: I4378c47c50a9bf33fa7461c6b9c522413e932bcd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395717
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
In http://review.skia.org/393397, I replaced a Constructor::Convert call
with a call directly to ConstructorCompoundCast::Make.
This worked fine if the input expression was actually a compound, but
if it was not, the code would assert/crash. The fuzzer detected this
error right away. (Enums are not considered to be a scalar, a vector or
a matrix in SkSL.)
Change-Id: Ie0df4c5771ff4f4d8f5251d4703e9c3516b6baad
Bug: oss-fuzz:33113
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395720
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>
Most of the COLRv1 paint operations only need the clip and matrix to be
kept on SkCanvas, only PaintComposite needs a full saveLayer().
Adjust calls accordingly.
Bug: skia:11851
Change-Id: I85b3c27495c78306457e17fea8062c957e2f3b05
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395617
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
This was not used anywhere. (u_skRTHeight, on the other hand, is used to
support Y-flipped surfaces.)
Change-Id: I0cb803e8f82834715a47366a00c8ec913ee3c6e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394898
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
The persistent cache stores the struct `SkSL::Program::Inputs` on disk
as a binary blob. If the struct changes size or shape in any way, this
causes a compatibility break in the cache files and we need to increment
kCurrentVersion to invalidate them. We will now automatically detect any
change to Inputs which causes its size to differ and static_assert.
Change-Id: Ie8b9958029c209f2c763f5bea78fcaa8bc3444d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394897
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This code is not performance-sensitive, and there doesn't seem to be any
benefit to making it header-only.
Change-Id: Ic83be5cbb96f08c18a144954be7453aaabaa5a72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394900
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
ConstantFolder::Simplify already makes this check internally (see
SkSLConstantFolder:387). We don't need to do it here as well.
The `errors/DivideByZero.sksl` test reports the same errors as before.
Change-Id: If82d24b3c8613574b069cce0116aad4e789964c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395416
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>
Two of the tests are now (correctly) detected as invalid code, but were
previously checked into /shared/ because they compiled when the fuzzer
first reported them (that is, after the crash was fixed). These have
been moved into the /errors/ test folder.
One of the tests was only generating an error because its main function
was named `a` instead of `main`, so I renamed it to `main`.
Change-Id: I1a2346fb16e304b0c66ff377a3f9bf7e7ee89ba9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394899
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:11850
Change-Id: I3eed3d07481b6dd27e3c51d25d64b69ee8a16280
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395537
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Pinpoint discovered some regressions in Block::Make.
Block::Make attempts to identify Blocks that contain zero or one actual
Statements; in that case it can avoid allocating a Block and just return
the Statement. The original logic which did this check worked by
removing the empty Statements from the array, then shrinking the array.
For a large array of nested Statements, this could end up taking a
nontrivial amount of time as it would scan every statement for
emptiness.
I've rewritten this logic to be more efficient; it now stops as soon as
two non-empty Statements are found, and makes no attempt to eliminate
empty statements. It's more lines of code, but much less work.
If this doesn't resolve Pinpoint's woes we can remove this logic
altogether, as its only value is to avoid an unnecessary allocation and
generate slightly-smaller but overall equivalent IR.
Change-Id: I2d18a0e09df266629d63b6796f40501d8610f756
Bug: chromium:1187973, chromium:1187991, chromium:1188002, chromium:1188025
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395417
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
4340fcfaa8..f92eb43ce9
2021-04-11 m.maiya@samsung.com Vulkan: All builtins of gl_out needs to be considered as active
2021-04-10 syoussefi@chromium.org Vulkan: Use RGBA16_FLOAT for buffer format fallback
2021-04-10 ianelliott@google.com Vulkan: damage rectangles must never be pre-rotated
2021-04-10 ianelliott@google.com Vulkan: Warn for unsupported vertex attrib format
2021-04-10 syoussefi@chromium.org Remove unused translator option bits
2021-04-10 ynovikov@chromium.org Really fix iOS build
2021-04-09 ianelliott@google.com Add TextureType::Buffer to RecordBindTextureTypeError()
2021-04-09 jmadill@chromium.org Android: Call getExternalStorageDirectory natively.
2021-04-09 ynovikov@chromium.org Skip TracePerfTest.Run/native_real_gangster_crime on Linux AMD
2021-04-09 syoussefi@chromium.org Add tests that use, then update, then use buffers
2021-04-09 cclao@google.com Vulkan: Add featue flag to force highp to mediump in fragment shader.
2021-04-09 timvp@google.com Fix angle_expose_non_conformant_extensions_and_versions
2021-04-09 m.maiya@samsung.com Consider AOSP ANGLE path as well during SHA generation
2021-04-09 syoussefi@chromium.org Translator: Validate multi-declarations are separated
2021-04-09 syoussefi@chromium.org Remove unused translator option bit
2021-04-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 6cad7c765c8b to 920c6c5ffe65 (341 revisions)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC brianosman@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: brianosman@google.com
Test: Test: dEQP-GLES31.functional.tessellation.shader_input_output.gl_position_tcs_to_tes
Change-Id: I70b44bfb7334cbb9a4e06c80c171ff65a4443637
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394970
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
In this CL we don't actually bail and use the record-time-ordered
DAG in this case, but we at least will see which perf bots with
reordering turned on are going over budget.
Bug: skia:10877
Change-Id: I38666166f15a7c168eadf262f7e975822c4308db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394158
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This allows the caller to decide whether a plan is feasible before
committing to it. In this CL the drawing manager doesn't actually
call it, but we test it. We'll call it in a follow-up CL
Bug: skia:10877
Change-Id: Ie3a6c14a0196f595c522a0c961aba7b10c980711
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394157
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
A follow-up CL allows the user to check the budget headroom
in between these two steps.
Bug: skia:10877
Change-Id: Ie0e6f23029065158b2eadb0dc26caf32f54433e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394999
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
These builtins have been obsolete for a long time; they were only
implemented on the GLSL backend. These values are provided in
u_skRTHeight and u_skRTWidth instead. (See GrGLSLProgramBuilder's
addRTHeightUniform and addRTWidthUniform.)
Change-Id: I8cceca348cbf9071939618f913693c316d35dbc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395001
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Encode the RSXForm text blob data into the SkGlyphRuns. Change
SkBaseDevice's drawGlyphRunList() to break up glyph runs with
TSXForm information into single glyph runs. Add
a virtual onDrawGlyphRunList() = 0 so drawGlyphRunList can use
it to render SkGlyphRunLists per device.
Change-Id: I7250460f7b4be2f820e4bb8ca4223654a9d9d145
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395098
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Currently doesn't do anything other than add new configs that set
a GrContextOption that becomes available in GrCaps. Runs new configs
on Perf/Test bots (MTL/iPhone11 and GL/Ubuntu).
Bug: skia:11844
Change-Id: I58586cae0980e52701abd1633dbc79b381f6015b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394996
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
The code which assembled a uniform-scale matrix (aka
`ConstructorDiagonalMatrix`) accidentally looped over columns instead of
rows when assembling the matrix.
Change-Id: Iefb9ae645a7a85f61443e6e96b752ba729f40c9c
Bug: skia:11278
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394997
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>
This test fell into disrepair when constant propagation was removed; it
assumed that @if and @switch would work on all unchanging variables, not
just those with the `const` modifier.
Change-Id: Ie9c1816f9c0852fdea998e4e156047e4cca9ad5b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395000
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>
This CL demonstrates the following
- Interface code written in TS
- Having support for modular builds (e.g. making Paragraph
optional)
- Avoiding monolithic interface files
- Using eslint to enforce style and avoid errors.
- Working debug and release build (using example.html)
Many of these files would be generated via a tool (that
has not been written yet).
go/ts-canvaskit
Change-Id: Ibe9a214d5897b09920cef01f6e95302f3cf30d5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392297
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Adding new tests in an upcoming CL. This sets the stage for that.
I also outlined the Register ctor so that the diff in the next CL is
more readable.
Bug: skia:10877
Change-Id: I604f1ce811cddf1d1105716f114e27ce12bf8249
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394998
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
DSLVar is normally implicitly converted to DSLExpression wherever it is
used, but the naively template-ized nature of DSLFunction::operator()
meant that it was accepting DSLVar parameters directly. Since DSLVar is
non-copyable, this meant DSLVar couldn't be passed directly to a DSL
function.
The smarter templates in this change are able to pass DSLVar by
reference.
Change-Id: Id04531f909cefd29b377c46e37fc4525bb29953c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394161
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
We really do use this.
Change-Id: I0defcf8aa3b23eec89b38b6720228daa8d50c27b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394956
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
When we know the input types ahead of time, it's more efficient to call
ConstructorFoo::Make than to call Constructor::Convert, because we can
cut out the complex logic in convert_compound_constructor.
Change-Id: I147faa6d613ebc90de5d9bbb14e0b6db235a1802
Bug: skia:11032
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393397
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
GLSL (post-ES2) allows array comparison: http://screen/8gryPvb9T7gndyb
Unfortunately, because ES2 does not support array comparisons, we can't
add this test to the dm test suite.
Change-Id: I06b71683e49b2631669cff801dc647951a81a299
Bug: skia:11849
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394162
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This renumbers the dehydrated data.
Change-Id: Ic1fc610d073a12d4e552a7c03e2e8630d8138a3a
Bug: skia:11032
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393236
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: Icc710e414388e4026a5e9819a53b8dac8ee0a2d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394896
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This is allowed in OpenGL ES2, and its absence in SkSL has been a pain
point for new users adopting Runtime Effects.
Change-Id: Id2ed78261a2cd2b14b49ad22cb74cdc9e0905f8a
Bug: skia:11368
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393418
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Includes a general explanation of device vs. local, how shaders don't
move with geometry, and how to use canvas transforms. Also shows
localMatrix on an SkShader. Finally, links to that from the SkSL page,
and adds SkSL-specific notes about coordinates.
Bug: skia:11763
Change-Id: I31462aff66ff8514392098b972a10e7c96e4f254
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393516
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: I2654ad43acd90d8a65dc2f54b47c0d9085e69175
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394836
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
These were added to SkRuntimeEffects, but we need to do a bit of fixup
in the CK bindings. Note that 'getUniformFloatCount' is now poorly
named, but the idea still stands: it's how many total scalar values are
required.
Bug: skia:11803
Change-Id: If464156d8e6240736e324ef833e57ba7d53f55a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394476
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
fc28c1db5f..4340fcfaa8
2021-04-09 cclao@google.com Vulkan: Add command option to run app traces with minimum GPU work
2021-04-08 cnorthrop@google.com Tests: Add Call Break: Offline Card Game trace
2021-04-08 doughorn@google.com Revert "Fix multithreaded crash on draw commands on D3D11 backend."
2021-04-08 timvp@google.com PPO: Fix updating sampler uniforms between draws
2021-04-08 cnorthrop@google.com Tests: Add Bubble Shooter trace
2021-04-08 ynovikov@chromium.org Fix iOS and Android component builds
2021-04-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from c8a676460af3 to 6cad7c765c8b (151 revisions)
2021-04-08 doughorn@google.com Fix multithreaded crash on draw commands on D3D11 backend.
2021-04-08 timvp@google.com Reset mCurrentGraphicsPipeline in ProgramExecutableVk::reset
2021-04-08 jmadill@chromium.org Make "force context check" an optional GN flag.
2021-04-08 lubosz.sarnecki@collabora.com Tests: Add Professional Baseball Spirits trace.
2021-04-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 575b36060ded to c18d8cd5016c (3 revisions)
2021-04-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 743bf032b75b to c8a676460af3 (490 revisions)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC csmartdalton@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: csmartdalton@google.com
Test: Test: ProgramPipelineTest31.SampleTextureAThenTextureBTest: Test: Ran MultithreadingTest. Test exhibits a crash before thisTest: Test: SamplersTest31.SampleTextureAThenTextureBTest: Test: angle_perftests --gtest_filter="*bubble_shooter*"Test: Test: angle_perftests --gtest_filter="*call_break_offline_card_game*"Test: Test: angle_perftests --gtest_filter="*professional_baseball_spirits*"
Change-Id: I4128511bfc4427d88bb5afeb075739324e51e6cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394716
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>