Bug: skia:12466
Change-Id: I6b15d099f3853b392f3763cd1100d89ff4e4fd1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459122
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
A handful of older drivers choke on weird matrix construction layouts.
The tests have been disabled on those bots. The GLSL docs and
conformance tests make it clear that such ctors were intended to work,
even if the drivers don't necessarily handle them properly.
Change-Id: Id9d4bb541482fd08344e78087286d8e829e7ff6b
Bug: skia:12443
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459559
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Continuing to remove things from IRGenerator. This is another field that
just mirrors state already in ThreadContext.
Change-Id: Ie15842748b55b76ca44c54283b8d9e344f4c670f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459637
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Continuing the process of removing everything from IRGenerator. This
field just mirrors the one in ThreadContext and so is unnecessary.
Change-Id: I3c6672887a03a83ead46788cf2169c7cfccce2cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459636
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
We are making src/gpu/tessellate independent of v1, and more represent
math and types that just know how to tessellate, so this seems like the
right place again for this file.
Bug: skia:12524
Change-Id: I773de3c0f93a57ce7ee16b44480667013f32ebd5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459136
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
We now detect attribute, varying, precision and invariant as reserved.
Change-Id: I8c90655a70b1bad31bf6143c3fdcb2ce582320b1
Bug: skia:12484
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459479
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
`samplerCube` is a type which we don't support at all. It has been added
to the reserved-word list.
`textureCube` was in our list of built-in types, but was not actually
used in any way; it wasn't actually added to the root or private symbol
tables, and was totally unreferenced by the code. It's been deleted.
Change-Id: I4f79ce5d40ac6ebdb2a7067fa60cc79e316b01b6
Bug: skia:12484
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459123
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
`a || b` only evaluates b if a is false. `a | b` always evaluates
both a and b. If a and b are of type bool, `||` is usually what you
want, so clang now warns on `|` where both arguments are of type bool.
In Skia, 3 of 3 uses of `|` were intentional as far as I can tell (one
had an explicit comment, the other two didn't). Rewrite them slightly
to make this intent more clear and to suppress the warning.
There was also one use of `&`. That one looks like a (benign) typo for
`&&`, so change it.
Bug: chromium:1255745
Change-Id: I9ac37075311005c0a8fcb8d1379f516510929423
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459456
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Florin Malita <fmalita@google.com>
This CL adds a few more exceptions to our ES2 test import, and adds the
dm code which actually runs the tests.
Change-Id: If6691dd35931f4f10262d3a1eff020c2c347ca59
Bug: skia:12484
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459124
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This consolidates tools/flags/CommonFlagsFontMgr.h into
tools/flags/CommonFlags.h and adds all those common
flags into the CommonFlags namespace.
I also cleaned up a few unused includes in DM.cpp
Change-Id: I1d1bf6598dfb87619b6abbb9faa1e24631f76fb4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459476
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
If text layout fails (e.g. due to unsatisfiable scaling constraints),
log an error to notify clients.
Change-Id: Ic7a028196b3bfb8f45b91c88766f0059145a202f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458722
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Use IDWriteFontFace1::GetUnicodeRanges to speed up creating the glyph to
unicode map by greatly reducing the number of codepoints to query. Also
batch up calls to GetGlyphIndices instead of calling one codepoint at a
time.
Bug: skia:12537
Change-Id: I53641d563fd7a5b670217590a505dedceabc9d21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459179
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Also noticed while trying to build GMs in WASM with
Bazel.
Change-Id: I33d467a0da0893c1a5e376f4fd1a6096dad48af3
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459198
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
The ToolUtils file is getting a bit bloated, IMO. I noticed this when
working on Bazel includes.
Including non-header files is a small nuisance in Bazel, so it
is probably better to just make it its own compilation unit.
Change-Id: I06ca3808a37ebef6478f5afa3f14086429899590
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459197
Reviewed-by: Ben Wagner <bungeman@google.com>
This reverts commit eb68973c2f.
Reason for revert: ES2 conformance test checks this
Original change's description:
> Disallow matrix ctors which overflow a column.
>
> The GLSL spec allows matrix constructors containing vectors that would
> split between multiple columns of the matrix. However, in practice, this
> does not actually work well on a lot of GPUs!
>
> - "cast not allowed", "internal error":
> Tegra 3
> Quadro P400
> GTX 660
> GTX 960
> - Compiles, but generates wrong result:
> RadeonR9M470X
> RadeonHD7770
>
> Since this isn't a pattern we expect to see in user code, we now report
> it as an error at compile time. mat2(vec4) is treated as an exceptional
> case and still allowed.
>
> Change-Id: Id6925984a2d1ec948aec4defcc790a197a96cf86
> Bug: skia:12443
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449518
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Bug: skia:12443
Change-Id: I5a32744c88b9b830ad657488824c8c7dd0b0a652
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458056
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Previously, if a driver failed to link a shader but didn't set the
INFO_LOG, we would emit a trailing "Errors:" at the end with no
additional information, which looks like the report was truncated early.
Now there will be generic text under Errors to make it obvious that no
errors were reported by the driver.
Change-Id: Ib3e2336ef2387d837639bc424f9949de554c8eae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458597
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Previously, in public code, private types didn't exist anywhere in the
symbol table chain, and those names were free for the taking. Now, we
register them as invalid types in the public symbol table. This prevents
them from being used as variable names, and gives a more explicit error
if you try to use them as a type.
Change-Id: I9a943bf923639b72cbf36b1acf4b4fbe70982786
Bug: skia:12538
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459119
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>
Bug: skia:12466
Change-Id: Icbd4fd6098c8a50164613e630db476bf8ea41517
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459177
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
The flags here are specific to v1 behavior. Move them into v1 only.
Bug: skia:12524
Change-Id: I27f06d0c153f95e1510bb11c8486d59e5242056a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458997
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: skia:12466
Change-Id: I3252f36c3f78642c55f127379ceba99b4845822e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458717
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Change-Id: I53cb4306a9715f75e7b15f8d368c7d0b4007b7a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458956
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This makes the SkDevice interface and code simpler, and also opens the
door to a version of drawAtlas that takes a more complex SkShader (on
the SkPaint), rather than just a single SkImage.
Bug: skia:11942
Change-Id: I557bd2f03b85940b29954cb994916d5566bd7747
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458980
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: Iffb757bdc8b28d14aae176b1d2448e72ccde7c3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459116
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: Ie853618fb496a77ffb79d6669f87048260df68b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458979
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: If14ba82501199a703cd04db28dda08bf5153141b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458978
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is just a bunch of renaming, and for now the tessellate/shaders
directory remains untouched. The next steps will be to clean up and
remove all Ganesh v1 dependencies from tessellation.
Bug: skia:12524
Change-Id: I8cc166c0c78f9fb160de807131fa53fcc0765818
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458876
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: I2ac8052f3fb0a972746a5866898a6e455971889d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458957
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This is a step towards a followup CL which adds the private types to the
root symbol table.
Change-Id: Ieab35154aa48949fb83ea6631057c3593127bd3d
Bug: skia:12538
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458977
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: I02b78a6a578975906137160194dbccaab7eed86a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458976
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>
With this CL we can run as:
dm --src gm skp tests --config grmtl -v --nocpu --nogpu
and not get all the non-Graphite unit tests.
Bug: skia:12466
Change-Id: Ib3f04f315fe4b5731a54e4c72979a0c1e00baf24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457898
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12466
Change-Id: I49e1ec8308a0cde2b5d43901281d60a6f70be5c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457119
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
To my great surprise, a capital X is allowed in hex literals. In fact,
this is allowed in both GLSL and C. The ES2 conformance suite tests
this, so now SkSL supports it as well.
Change-Id: If795c6033b301420669f002530ee1d14fec29f96
Bug: skia:12533
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458723
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>