sk_SecondaryFragColor corresponds to an ES2-only concept
(gl_SecondaryFragColorEXT) and does not have any SPIR-V equivalent.
Two fixes were needed:
- sk_SecondaryFragColor shouldn't be in SPIR-V code at all. Report it as
an error when it appears.
- We don't stop compilation when this error is reported, so we need to
fix up the assertion that the fuzzer initially discovered.
Specifically, the fuzzer found that the `sk_SecondaryFragColor`
variable never got a SPIR-V ID assigned to it in fVariableMap, so the
compiler would assert when assembling an expression containing that
variable. Now, we make sure to populate fVariableMap with an (unused)
ID in `writeGlobalVar` to avoid this crash.
Change-Id: Ib86919dfc9a325b2b82a7f4b2054b747dad7c32f
Bug: oss-fuzz:44096
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501976
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Change-Id: If0ecc3c1080b8e44f17dbb34ff6cc1d66794ae0b
Bug: skia:11052, skia:11919, skia:12858
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501843
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Removed a special case from `writeFunctionCallArgument` which avoided
using a scratch variable for out params; now we always use the scratch
variable and copy it back to the original variable at the end.
Change-Id: I0e446a3fde6d19554943384210bd911f6f9c8cfa
Bug: skia:11052, skia:11919, skia:12858
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501836
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I3bcf7a23eb27e98d24840b492930955125d35bd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501476
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Upcoming dehydration / rehydration changes require $intLiteral and
$floatLiteral to be present in the symbol table (as all other private
types are). It turns out that even with them marked private, having
them in the symbol table allows them to be incorrectly accessed without
error due to a code path that fails to check for private types.
This CL takes care of that and ultimately results in better output from
PrivateTypes.
Change-Id: Ic47b77a770834079f28c3195545a7cabca8e6cb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501196
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This reverts commit 64c971350e.
Reason for revert: breaks
Housekeeper-PerCommit-CreateDockerImage_Skia_Release
https://status.skia.org/logs/7PAT8xw23VsUyx4oJgZZ/1327ba91-d03a-4e98-b1dd-0dedb401333b
"<string_view> not found"
Original change's description:
> Use native std::string_view.
>
> We also used some string_view functionality from C++20/23. These have
> been replaced with free functions with the same name.
>
> Change-Id: I3bf40f99aeb500495f344fd8c6872619267d42be
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/500897
> Reviewed-by: Herb Derby <herb@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: I3712eddc8ad49ad38d31ca5bf008260e251bdbd7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501396
Auto-Submit: John Stiles <johnstiles@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
We also used some string_view functionality from C++20/23. These have
been replaced with free functions with the same name.
Change-Id: I3bf40f99aeb500495f344fd8c6872619267d42be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/500897
Reviewed-by: Herb Derby <herb@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This shakes out a few driver issues.
Change-Id: I35041a904fb762a5b933b3e970f2d7a668803dcd
Bug: skia:12858, skia:11919
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501019
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This shook out a few driver issues.
Change-Id: If12f11c4b3b562fec402bddce25edf01a8be83b9
Bug: skia:12858, skia:11919
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/500816
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Move to RAII structs wrapping DrawWriter to control the append mode.
This allows each struct to define any extra template parameters/buffers
needed for the appended data, and expose only the appending API that
makes sense.
In follow up CLs, the RAII structs make it easy to support reserving
and returning vertex data, and add new appending modes.
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Bug: skia:12703
Change-Id: I5ef1bfdf3b4fa175bcfb25cc61fd0c46a62d46c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/498016
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
GLSL ES2 behavior is explicitly undefined if an out-param is never
written to: "If a function does not write to an out parameter, the value
of the actual parameter is undefined when the function returns."
We do see divergence here in practice: SkVM's behavior (the parameter is
left alone) differs from my GPU's behavior (the parameter is zeroed
out).
SkSL will now report an error if an out parameter is never assigned-to.
There is no control flow analysis performed, so we will not report
cases where the out parameter is assigned-to on some paths but not
others. (Technically the return-on-all-paths logic could be adapted
for this, but it would be a fair amount of work.)
Structs are currently exempt from the rule because custom mesh
specifications require an `out` parameter for a Varyings struct, even if
your mesh program doesn't need Varyings.
Bug: skia:12867
Change-Id: Ie828d3ce91c2c67e008ae304fdb163ffa88d744c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/500440
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is mostly mechanical. The only interesting bit is that GrSLType was in include/private while SkSLType is in src/core so some #include patterns changed.
Bug: skia:12701
Change-Id: I80bd86ee93796b145f86ded9b4cbf52f24fa59e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497607
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This was used for one specialized template in Ganesh, and enables the
preferred appending pattern for Graphite.
Change-Id: I561449004923464efeeabaed5bc00c8fd49e036d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/498440
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This is a precursor that makes supporting reserving/returning vertices
easier to implement, and adapt to it PatchWriter for the tessellating
path renderers.
It also has the small benefit of being slightly easier to follow, and
the buffer binding remains valid across pipeline changes.
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Bug: skia:12703
Change-Id: I84606800937d955d5f4cb98e68cca2ca6c6fb1f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496890
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Previously, when attempting to cast a huge value to an int, SkSL would
report an error, then return the IR for
`ScalarCast(Int, FloatLiteral(huge-value))` . Now, to minimize the blast
radius of the error, we report the error but return `IntLiteral(0)`.
We've already reported an error, so there's no need to preserve the
value, and zero is less likely to produce follow-up errors.
(A similar approach is used here and worked well: https://osscs.corp.google.com/skia/skia/+/main:src/sksl/ir/SkSLConstructorCompoundCast.cpp;l=57-59)
Change-Id: Ie8e8d48380cb963466d1f47d123d64e3301cf87c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/499563
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
The test input was removed at http://review.skia.org/497742.
Change-Id: I7b30f2f70cd0812b900c9c67b70e742b3d96930a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/499574
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
The test has been moved to shared/, since it's a valid test, but it is
no longer related to inlining, as the inliner no longer attempts to
inline functions with inouts at all.
Also, one function here (outParameterIgnore) actually invoked undefined
behavior and has been removed. According to the GLSL ES2 docs: "If a
function does not write to an out parameter, the value of the actual
parameter is undefined when the function returns." SkVM leaves the value
unchanged, so SKSL_TEST_CPU would pass, but a GPU might clear it (and in
fact, my GPU does).
Change-Id: I77c77ed1354bc980344ec5c406992bd62015f5e5
Bug: skia:11919
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/499752
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Now, constant mat+mat, mat-mat, and mat/mat operations can be optimized
away. mat*mat does not operate componentwise and will need to be
handled differently.
Change-Id: Iabac6e58999eac46c256d7dcdb9b95d05de530bc
Bug: skia:12819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/498716
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
GLSL supports adding, subtracting, multiplying, and dividing matrices
with scalars. This works by splatting the scalar across every matrix
component and then performing the op componentwise. Our constant folder
now knows how to fold out these simplifications.
Change-Id: Idb8751ec16135e1b61da0d58cfd0505ab31ac087
Bug: skia:12819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497738
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
In a followup CL, these will be updated to properly fold.
Change-Id: I20d125c0d54cbbcf12f7d096beda1fdf75e51b65
Bug: skia:12819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/498617
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Previously, matrix-scalar operations did not actually fold, so the tests
didn't live in folding/. In a followup CL, these will fold.
Bug: skia:12819
Change-Id: I6fdacf89088920719e7666d6c9b05ddffaf6cb6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497742
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
SkSL is somehow interpreting a large positive value as a negative one.
Change-Id: I299e0bf389a9fcbfe697741bd33a54df07748753
Bug: skia:12863
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/499556
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Some paths through swizzle optimization would replace a swizzles with a
constructor--e.g. `float3(1, 2, 3).y` would be replaced with `float(2)`.
(Constructor::Convert was responsible for replacing this trivial
constructor with the literal `2.0`.)
The optimization code asserted that this replacement would succeed, but
the fuzzer managed to construct a counterexample where the constructor
rejected the value. Specifically, by nesting casts between int3 and
float3, it found a case where Constructor::Convert returned null because
the literal value was out of range for `int` types.
This assertion didn't really add value so removing it was harmless.
Constructor::Convert already reports an error when it fails, and null
returns are handled properly throughout.
Change-Id: I575d441ed90d6b696f6399941c3f6d84698794bc
Bug: oss-fuzz:44045
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/499382
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This guards against any potential for conflict with user code.
Change-Id: Iecaf3ead5f8ada50b6dc159a4ad9e7f3e371edc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/499296
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The check in SkIsConvexPolygon that determines if a polygon winds around
multiple times turned out to not be correct in all cases. This has been
changed to a much simpler one -- if the sign of the edge vectors change
more than twice, then we know that we've wrapped around more than one
time.
In SkIsSimplePolygon, if both points adjacent to a vertex are on the
right side, we attempt to add both those edges to the active edge list.
However, if they are the same point, then we'll be adding the same edge
twice, which makes the strict ordering of the edge list invalid. Instead
we check for this case earlier on and reject the polygon.
Bug: oss-fuzz:44004
Change-Id: I6ffe11d73fabd6ae2f75cb027db887bcb8c03cb1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/498916
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This reverts commit a97a6769b5.
Reason for revert: breaking bot Housekeeper-PerCommit-CheckGeneratedFiles -- see http://screen/5FN75fF9tvcQFKR
Based on the diff, I think this just needs to be synced up to latest code and a rebuild should fix it.
Original change's description:
> [skslc] Generate .hlsl test output files
>
> - The build now generates HLSL output when `skia_compile_sksl_tests` is
> enabled.
> - The "blend" and "shared" tests have been enabled for HLSL with the
> exception of 6 tests that exercise intrinsic inverse hyperbolic
> functions, which don't have HLSL equivalents.
>
> Bug: skia:12691, skia:12352
> Change-Id: Ia970f878f75ff58e8e3d47249c2dc2f756c165b4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482778
> Reviewed-by: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Auto-Submit: Arman Uguray <armansito@google.com>
> Commit-Queue: Arman Uguray <armansito@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:12691, skia:12352
Change-Id: Iaad607d48edd136eee2b60e48c0643b6e90179e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/499216
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
- The build now generates HLSL output when `skia_compile_sksl_tests` is
enabled.
- The "blend" and "shared" tests have been enabled for HLSL with the
exception of 6 tests that exercise intrinsic inverse hyperbolic
functions, which don't have HLSL equivalents.
Bug: skia:12691, skia:12352
Change-Id: Ia970f878f75ff58e8e3d47249c2dc2f756c165b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482778
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Arman Uguray <armansito@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:12845
Change-Id: Iba4fcfe98adf6f0445958322d674ab3dfee87305
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497280
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Previously, any code which emitted a binary expression would always emit
a leading and trailing space. This caused comma expressions to look
goofy: `foo() , bar();` instead of `foo(), bar();`.
Operator::operatorName() now returns the operator token with appropriate
whitespace around it, and tightOperatorName() is a new method which
omits the whitespace. Functions which assemble binary expressions
should now concatenate `x + operatorName() + y` instead of hard-coding
`x + " " + operatorName() + " " + y`. Prefix/postfix expressions should
use `tightOperatorName()` because otherwise negation looks bad (` - 123`
instead of `-123`).
Super low priority, but it was easy to fix.
Change-Id: I3c92832207293a310fb1070b3b5e72455757b0ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497776
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
These identifiers are reserved for SkSL internal use (and can't be
exposed to GLSL or Metal anyway).
Change-Id: Id554cbf21ed2fb66785e77700ff79424ecdf66db
Bug: skia:12854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/498036
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This reverts commit 0c9b8bae42.
Reason for revert: breaking bots, apparently due to use-after-free?
Could be a real clone bug...!
http://screen/9NenpjnYNoDU58G
Original change's description:
> Added tests for sksl clone() on our test corpus
>
> Change-Id: I9022a6aa53b039e5aec2ceeb0062d536e5e278c9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496601
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Change-Id: Ida8978a38ac24081895cd97a62718b6ec94f57c8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497777
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Unfortunately, this won't change any behavior until ExtractPaintData is switched over to using PaintParams::toKey
Bug: skia:12701
Change-Id: I2b00256d34de1b8b99a65e26c08f5f082090a341
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497596
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Presumably, SkVM will also need a way to represent the data passed to its programs
This CL attempts to be as mechanical as possible.
Bug: skia:12701
Change-Id: I7fb2c06d645809bf5422a25b8b537cf6c249fede
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497136
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 7e8fdf4706.
Reason for revert: breaking bots
Original change's description:
> [graphite] Add ImageShader and BlendShader SkPaintParamKey support
>
> Unfortunately, this won't change any behavior until ExtractPaintData is switched over to using PaintParams::toKey
>
> Bug: skia:12701
> Change-Id: I4f51dbb43983fe2f01947e26814f581a6d9033cd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496783
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12701
Change-Id: If180bd3753c95d920715f37347559cee4fa2da20
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497455
Auto-Submit: Robert Phillips <robertphillips@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Unfortunately, this won't change any behavior until ExtractPaintData is switched over to using PaintParams::toKey
Bug: skia:12701
Change-Id: I4f51dbb43983fe2f01947e26814f581a6d9033cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496783
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The skvm implementation of pow2 uses a clever bit-twiddling trick to
generate a floating-point value that can be cast to integer, then bit-
punned to float, to generate its result. However, the bit trick fails
for large inputs, and the bit-punning step generates a nonsense result.
This is now fixed by using a well-positioned clamp.
Change-Id: I55143a98324f5f518d0875149a0b6ce6d734ded0
Bug: skia:12847
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497283
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Internally, SkSL breaks apart multiple vardecls into individual vardecls
wrapped inside an unscoped Block. Previously, the Debugger did not
properly distinguish a scoped Block from an unscoped one, and the
variables inside unscoped Block would be considered as "out-of-scope" as
soon as the unscoped Block was closed. This would make them vanish from
the Local Variables pane of the debugger at the end of the vardecl
statement.
(Note that this transformation also means that Step stops once for each
individual variable, but that isn't a big deal.)
Change-Id: I2ee2409e8556d77b58d7645658bd497f87c31e39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497278
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
While working on the debugger, I realized that we had no interface for
getting the current line of any stack frame other than the currently-
executing frame. This can be useful for letting users explore the call
chain on the stack.
(While I was here, I also renamed `tidy` to `tidyState` in order to
match the Typescript implementation.)
Change-Id: Ife8c30d81adc17389a109698e3fba7f93e523e9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496886
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This update removes an unused field (the "slot" value was redundant,
since we always emitted arrays in order and there are no gaps). This CL
mostly exists to test out the ramifications of updating the trace
version and make sure things don't break when we do.
Change-Id: I456837db682b0085fc5afbbc0bcb62af3440c6e5
Bug: skia:12755
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496607
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This eliminates a handful of useless statements. They were harmless, but
presumably this saves optimization work for the GLSL compiler.
(Patterned after http://review.skia.org/496377 )
Change-Id: Ibe135750488a9917b982dcac67f22b3765412ee1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496599
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
These are harmless, but they can cause the Metal compiler to emit a
warning, and these warnings are making some logs messy for Flutter.
Change-Id: I21b7a3c9ae661c55bbbe8bc13d097966180e977d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496377
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This will give us better control (or, at least, the ability to provide a
cleaner error) when we make schema changes.
Change-Id: I4e9a41dd9084647d1c2ceb1d7815b2942f4903ce
Bug: skia:12755
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496602
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
This returns a string_view of the JSON string (via begin() and size()).
Change-Id: I5f92848f4dfdd2be034beb0e48f3fb651ee97640
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496600
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Change-Id: Ic664ad0134d61dcf939dcf585a81d53e29c6afcc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496597
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Bug: skia:12701
Change-Id: Ifa6b600b445a78f4ba936bf763adb2a5bf4d7542
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496299
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
We've run into drivers a few times now that have bugs where they only
expose vkGetInstaneProcAddr and not vkGetDeviceProcAddr. The latest
being swiftshader (which is getting fixed). To avoid this issue in the
future we can just have our tests use vkGetInstanceProcAddr to get
vkGetDeviceProcAddr.
Change-Id: I6d73abde507519c145b873042393f50ce6c4527c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494822
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Angle/Vulkan added GL_ANGLE_rgbx_internal_format extension for RGBX
texture format. Add support for that format in Skia.
Bug: chromium:1261867, chromium:1269826, angle:6690
Change-Id: I74fc91699dc1eaf2b275b29fbcf3d4060e63c5a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/485157
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>