Ordering of bit fields within the storage is actually implementation
defined, so the previous implementation didn't necessarily order keys
correctly when the struct bitfields were memcpy'ed into a uint64_t.
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: I0c41fb87dcaa3b6a4b880e4fb0e04603f1c9f867
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483607
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
The widget layout shouldn't change when there are no variables.
Change-Id: Iedb48642486944127fa800072c1f4c57a574b513
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484836
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Bug: chromium:1280232
Change-Id: I66c5d36a0dfeac2d2a128eb8cf2798f0c02fbc86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484999
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
The issue was Skia would be in the middle of drawing when it
needed to lazy-load the image's texture. This would mess up the
bound texture in WebGL, but Skia didn't know that. As a result,
it would not realize that some of the work had been undone.
Calling resetContext() makes Skia aware of this fact, so it can
adjust its behavior.
Change-Id: I5e62987546be8d63d13c906dfab3bc92cf3120cd
Bug: skia:12740
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/485016
Reviewed-by: Brian Osman <brianosman@google.com>
We didn't have any test cases where a loop variable (other than a loop
induction variable) fell out of scope. Now we have a demonstration of
the trouble behavior.
Change-Id: Iec070748c93aaeab1dc41a46c42e33c78b73d7f5
Bug: skia:12741
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484560
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
We want to distinguish between actual intrinsics (functions declared in
the SkSL includes, but defined by the generators), and builtin functions
(declared and defined in the includes).
This removes unpremul from the intrinsic list (it's a builtin function,
not an intrinsic), and adds an assert that no intrinsic is defined.
Change-Id: I7b4f0cefd98364fe71aa570357f0baed3f5887ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484441
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
These will give the debugger enough information to discard variables as
they fall out of scope.
Change-Id: Ia400e82a3ca9cf0a51a72d819f897d346979226c
Bug: skia:12741
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484556
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Change-Id: Iacbfa9c461669733938422d151820da37f78cb6c
Bug: skia:12741
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484678
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>
Note that the 2D cross product isn't defined. There are at least two
possible interpretations of what that might mean. This name makes it
clearer that we're asking for the length of the resulting vector, if
we computed the 3D cross product (assuming Z == 0 for both vectors).
It also eliminates name overlap between builtin functions and actual
intrinsics.
Change-Id: I24e8bc0ab2ec91aaace20f0dd3e8565c10bd44a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484440
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This CL adds the trace op and tests the builder commands, but it is not
yet hooked up to the SkVM code generator or debugger.
Change-Id: Iaa64293dfd0973e299eb480cb2b43672b0886c32
Bug: skia:12741
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484439
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This should fix the Vulkan validation warnings about have a render pass
with a 0 area bounds.
There are times in Skia (when not doing reduced op list splitting),
where we get a new offscreen surface, discard it, then get a second
offscreen before submitting any draws to the first yet. This causes us to
have an OpsTask for the first with a discard load but no ops. When we
get back to this first surface to add real ops it will have a load load.
Correctness wise we could drop the first OpsTask since it doesn't have
any affect (what the validation warning in this bug is referring to).
This original workaround was there to appease a different vulkan
validation warning about loading unitialized memory at the start of a
render pass. If we drop the discard then the validation would complain
the load (on the second OpsTask) was happening on unitialized memory.
However, with the workaround removed I no longer am getting such a
warning both with and without reducedOpListSplitting. So either we are
now avoiding this case via something else higher up or maybe this warning
was removed from the validation. Or I just can't get a good test case
for it. It does not repro running Skia gm or tests, or running chromes
test case for the 0 area render pass bounds.
Bug: chromium:1279794
Change-Id: I11ad5ce4e0000da74805a4cd9a0a9207d5adf60a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484562
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is an attempt to get more diagnostic information when an SkSurface fails
to be created.
Bug: b/206415266
Change-Id: I536417e1a6d1f0f99e5e9e41e2fee43f7aa9b464
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484338
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Fix a use-after-move issue in GrVkRenderTarget, as found by clang-tidy:
gpu/vk/GrVkRenderTarget.cpp:67:
'resolveAttachment' used after it was moved
gpu/vk/GrVkRenderTarget.cpp:62:
move occurred here
Bug: chromium:1122844
Change-Id: I4f65784cc1d8e39fb60ce3439e316a9dc399eca8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484178
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Meant to add this as part of
https://skia-review.googlesource.com/c/skia/+/483596
Change-Id: I2d5ab327b786d74ad5c96eaad5dde79676fce1ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484340
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Right now it is non-interactible, but it's still useful for keeping
track of the flow of execution.
http://screen/4b6WMGdw6j32AGc
Change-Id: I978d9b441c15674c6cae508b123579021c2ecc46
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484076
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Previously, the variable pane listed variables in slot order, which was
not very helpful (other than usually mapping to a top-to-bottom order in
the original source code). Now, the variable pane sorts variables to the
top when they are modified, and maintains their relative order
throughout execution. This is much easier to follow.
http://screen/C9odSHV4asFSLZH
Change-Id: Id86adf745207451a38a4dc46756f316e8d86bf81
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483958
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Fix a use-after-move issue in GrResourceAllocator::Register, as found by
clang-tidy:
gpu/GrResourceAllocator.cpp:116:
'scratchKey' used after it was moved
gpu/GrResourceAllocator.cpp:111:
move occurred here
Bug: chromium:1122844
Change-Id: I8f00c6c82ae25a12045b6c101c608b52b90a51d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484177
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Fix a use-after-move issue in GrPixmapBase, as found by clang-tidy:
gpu/GrPixmap.h:65:
'info' used after it was moved
gpu/GrPixmap.h:64:
move occurred here
Bug: chromium:1122844
Change-Id: I7403805e3e63592119b66c1e5840bc48d5e33832
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484176
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Fix a use-after-move issue in SkPDFDocument, as found by clang-tidy:
pdf/SkPDFDocument.cpp:222:
'metadata' used after it was moved
pdf/SkPDFDocument.cpp:213:
move occurred here
Bug: chromium:1122844
Change-Id: Ibcc09353af431f1389a2c80a3b94acb345b4f809
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484179
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This will reduce memcpy overhead when runs are copied into a paragraph
or when paragraph cache entries are read or written
Change-Id: Id81725f3d8fc70daa17d154093ae7bc8b519118c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483022
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
Previously, return values like `[func].result` would stick around in the
Variables table indefinitely. This felt very counterintuitive. Now they
only appear for one step, then vanish.
Change-Id: Iedfc7d2ddf136111005b26aaefb380ffc6281d05
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483605
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
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:12700, skia:12703
Change-Id: I0d32b2542bf779c2e2229ad3f56eca2129ff3b8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483521
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Previously, non-instanced draws that needed a base vertex because of
dynamic state would cause useNonInstancedDraws to be false, and then
the recorded draw calls are wrong.
This also tweaks the logic to be useInstanceDraws instead since the
layers of negation were getting annoying to reason through.
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: I370d06528055de5412e29710906ce1a76e1bd7c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483520
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
The fill types require different stencil settings to implement, but
the stencil settings are fixed for a RenderStep. This means that each
fill type requires its own Renderer.
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: I9a8e3546555308835c2a11d7e2b54f36470dc297
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483518
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The currently-active stack frame is always shown. Values which were
modified during the last step action are highlighted.
http://screen/4E4BLXYJsDR5bhk
Change-Id: I521d92fa6c1eabd64aaeeb188c71f04a79f827f5
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483602
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>
We already had this logic in SkVMDebugTrace::dump; it just needed to be
factored out so that it could be accessed directly.
Change-Id: Ib497b82a7722b8ac2285de74f1937379c2f9a51b
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483600
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Bug: oss-fuzz:32768
Change-Id: I9273ba1242a0f61dc5b26b2651400b4b46dd3992
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483596
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
By tracking slot writes using a dirty mask, and reporting these in the
VariableData, we will be able to highlight assigned-to variables in the
debugger.
Change-Id: I93a767095c9c1b6dedc55a08424649f83aa1c960
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483598
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: oss-fuzz:32385
Change-Id: I048e5a55430c0c968b858b0ac25d077a35332e02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483519
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Ib1ea2936f7a9431bc62c04b1931cf6da2c213b36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483496
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
We already had this logic in SkVMDebugTrace::dump; it just needed to be
factored out so that it could be accessed directly.
Change-Id: Idd6c92d23ab4dddc60fdc3c7b1693a0d89b1c992
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483517
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Stepping out is extremely similar to stepping-over, so this was mostly
working already.
Change-Id: Ib1c1ba96b45a732500e72b6da4cbfe41a1f75307
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483196
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
The raw text has been replaced with a proper table. Stepping through
code now scrolls properly to focus on the current line. The ASCII "->"
arrow has been replaced by a focus highlight. The top controls no longer
scroll away when browsing code.
http://screen/BnTa3thYzUgTTdG
Change-Id: Ieaa3a479099bbd09d9ba2cb5552befdd5307f9c5
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483156
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This is a very rough first draft which provides the bare minimum. Shader
source is dumped to the window as static text, along with an arrow
tracking the current trace line. Two buttons allow for single-step and
step-over. There aren't yet any GUI affordances for the stack or
variables.
http://screen/44WAnxchjy8MPjM
Change-Id: Ifad4a146b54d334113b02132eec2238af4fd8580
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/481681
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>