Bug: skia:
Change-Id: Ia83f2b69948eeb747ecc171fb8677c8e22cc8ba7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277176
Reviewed-by: Heather Miller <hcm@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
Fuses the relevant functionality into the set() calls.
Change-Id: I3a764219425c35967942366c60a6b9ee6ec48e11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276836
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
The biggest mismatch between these and SkTHash{Map,Set,Table}
is the old ones provide Iter and ConstIter, the new ones foreach().
This CL,
- adds foreach() methods to the old types,
- replaces all uses of ConstIter with foreach(),
- replaces most uses of Iter with foreach(),
I'm leaving one spot using Iter to walk the table and remove its
elements for its own CL... it'll be a little more complicated to get
that right.
From there it should be straightforward to turn SkTDynamicHash
into a thin wrapper over an SkTHashTable.
Bugs: skia:9703
Change-Id: Ia6ba87c35b89585c42b5b9f118f4cbf3abd04f0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277098
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Since we grow when size >= 3/4 cap, shrink when size <= 1/4 cap?
Keeping a minimum table size of 4 preserves the invariant that tables
with non-zero capacity always have at least one empty slot, allowing
find() to determine a particular key is not in the table by stumbling
upon that empty slot on the key's hash chain. That's effectively what
we're asserting at SkTHash.h:84.
Bug: skia:10041
Change-Id: I4247e4ff155fd11561086547525354365bc69f55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277096
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
6963f58c76..cb9a86a9d8
git log 6963f58c7678..cb9a86a9d867 --date=short --first-parent --format='%ad %ae %s'
2020-03-15 ynovikov@chromium.org Skip SwANGLE GLES31 tests which crash with 32-bit Subzero.
2020-03-15 jmadill@chromium.org Format perf_test.cc.
2020-03-15 jmadill@chromium.org Temporarily disable optimizations in angle_perftests.
2020-03-15 jmadill@chromium.org Trace Tests: Rebase path to relative dir.
2020-03-13 m.maiya@samsung.com EGL: populate EGL_NATIVE_VISUAL_ID values for Android
2020-03-13 ynovikov@chromium.org Revert "Skip crashing dEQP-GLES3.functional.samplers.*_tex_3d.* on SwANGLE"
2020-03-13 lexa.knyazev@gmail.com Implement ScanForward64 on 32-bit platforms
2020-03-13 timvp@google.com Add ANGLE_FOR_ANDROID_TOAST_MESSAGE to AndroidManifest.xml
2020-03-13 jmadill@chromium.org Vulkan: Timestamp internal RenderPasses in perf tests.
2020-03-13 jmadill@chromium.org Update export_targets to fix presubmit on Windows.
2020-03-13 courtneygo@google.com Vulkan: Disable robustness support
2020-03-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 16ae92a4ee52..18daa81e3d3d (15 commits)
2020-03-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src 29adf277cb19..f1d9f12a19de (2 commits)
Created with:
gclient setdep -r third_party/externals/angle2@cb9a86a9d867
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 egdaniel@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/+/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian9-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
Bug: None
Tbr: egdaniel@google.com
Change-Id: I2c8d687cdc0ab3c8993ce706bf9591916b2399f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277119
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Move (x,y) up front for shaders, Color for color filters.
I did think about wrapping the other params in a struct, but
for now I still find it less error prone (while admittedly
more tedious) to have all those params in my face when adding,
removing, or refactoring parameters or effects.
Change-Id: I5e124f1ecea3eff9366872d5e77ddfbadc0302e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277111
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Small diffs in affected gms, but doesn't seem wrong.
Change-Id: I6577943f924d682e9ad4ff195ab98ca2168fd527
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277064
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
If we like this, will follow with a CL to change colorFilters to take
a color and return a color.
Change-Id: Ibd99d18dd7c21fa592500bf371d94a90a01f48b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277062
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Also, move blendmode helpers into SkBlendModePriv.h
Change-Id: I2695c9dabd255b58616e4febb3e53190267cdb3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277061
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is a reland of 79007c9309
Original change's description:
> Clear out atlases if they haven't been used in a while.
>
> This will stage out atlas pages one at a time with an interval of
> 256 flushes between them. Also removes the last page to help
> conserve memory if text or other atlas-using systems are not in use.
>
> Bug: 1058905
> Change-Id: I8717621033068d0e24da944356d91b0f35e5373b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276764
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
Bug: 1058905
Change-Id: I25b0037cb1608ae0bda641e0d0588afaf3dd47e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276960
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
The Dawn backend also requires a live render target to create a
GrProgramDesc.
Bug: chromium:1059890, chromium:1059939
Change-Id: I48490de3aa7dcbe653c3911b269304cb13bb15b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276985
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
(follow-up to https://skia-review.googlesource.com/c/skia/+/276576)
Force drawing of text as path in the presence of path effects.
Additionally, ensure that all glyph runs are rendered as a single path
(instead of one path per run).
Change-Id: Ibc69b0f93ff09af349f3376f79ed3fce18151a14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276956
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This reverts commit 79007c9309.
Reason for revert: MSAN and fontregen issues
Original change's description:
> Clear out atlases if they haven't been used in a while.
>
> This will stage out atlas pages one at a time with an interval of
> 256 flushes between them. Also removes the last page to help
> conserve memory if text or other atlas-using systems are not in use.
>
> Bug: 1058905
> Change-Id: I8717621033068d0e24da944356d91b0f35e5373b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276764
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
TBR=jvanverth@google.com,herb@google.com,robertphillips@google.com,backer@google.com
Change-Id: I5aa4326b490b66a4bb272069487311fc622a9711
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1058905
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276959
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: I1dfb6b98c237ff916f478c39d925e775c2c1bb74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276957
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This will stage out atlas pages one at a time with an interval of
256 flushes between them. Also removes the last page to help
conserve memory if text or other atlas-using systems are not in use.
Bug: 1058905
Change-Id: I8717621033068d0e24da944356d91b0f35e5373b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276764
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This is, somewhat, interesting bc it has >=1 mesh.
Bug: skia:9455
Change-Id: I608856f469e145057e4170e4bf045f6669825522
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276646
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2e5bd9b1e6..6963f58c76
git log 2e5bd9b1e658..6963f58c7678 --date=short --first-parent --format='%ad %ae %s'
2020-03-12 cnorthrop@google.com Capture/Replay: Update TRex captures
2020-03-12 julien.isorce@chromium.org Reland "Instantiate rx::DisplayEGL when device type EGL is selected"
2020-03-12 ianelliott@google.com Vulkan: Handle VK image being both a GL texture and GL image
2020-03-12 cnorthrop@google.com Capture/Replay: Add Manhattan to TracePerfTest
2020-03-12 liberato@chromium.org Add fp16 support to KHR streams for DX11.
2020-03-12 geofflang@google.com Rename ANGLE_defaults to ANGLE_java_defaults.
2020-03-12 amy.liu@arm.com Passing covgl/covgl
2020-03-12 tobine@google.com Vulkan:FramebufferVk cache draw buffer handling
2020-03-12 cnorthrop@google.com Vulkan: Remove unused atomic counter builtins
2020-03-12 geofflang@google.com Remove android:forceQueryable from the ANGLE.apk manifest
2020-03-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src 2ff8b6a6f4d5..be663d752e45 (8 commits)
2020-03-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src e2176c91b23c..9b620aa0c12d (2 commits)
2020-03-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src 136207a63495..29adf277cb19 (1 commits)
2020-03-12 shrekshao@google.com Speculative fix: getProgramiv always returns a valid program
Created with:
gclient setdep -r third_party/externals/angle2@6963f58c7678
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/+/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian9-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
Bug: None
Tbr: brianosman@google.com
Change-Id: I44e73a5ce8d11528133de0a5646af58b543c3b10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276843
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
That's what we care about at the moment.
Change-Id: I71a6538492d1d26be12a8d7a02c9d47667813e92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276752
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
While I think trunc(mad(x, scale, 0.5)) is fine for doing our float
to fixed point conversions, round(mul(x, scale)) was kind of better
all around:
- better rounding than +0.5 and trunc
- faster when mad() is not an fma
- often now no need to use the constant 0.5f or have it in a register
- allows the mul() in to_unorm to use mul_f32_imm
Those last two points are key... this actually frees up 2 registers in
the x86 JIT when using to_unorm().
So I think maybe we can resurrect round and still guarantee our desired
intra-machine stability by committing to using instructions that follow
the current rounding mode, which is what [v]cvtps2dq inextricably uses.
Left some notes on the ARM impl... we're rounding to nearest even there,
which is probably the current mode anyway, but to be more correct we
need a slightly longer impl that rounds float->float then "truncates".
Unsure whether it matters in practice. Same deal in the unit test that
I added back, now testing negative and 0.5 cases too. The expectations
assume the current mode is nearest even.
I had the idea to resurrect this when I was looking at adding _imm Ops
for fma_f32. I noticed that the y and z arguments to an fma_f32 were by
far most likely to be constants, and when they are, they're by far likely
to both be constants, e.g. 255.0f & 0.5f from to_unorm(8,...).
llvm disassembly for SkVM_round unit test looks good:
~ $ llc -mcpu=haswell /tmp/skvm-jit-1231521224.bc -o -
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 15
.globl "_skvm-jit-1231521224" ## -- Begin function skvm-jit-1231521224
.p2align 4, 0x90
"_skvm-jit-1231521224": ## @skvm-jit-1231521224
.cfi_startproc
cmpl $8, %edi
jl LBB0_3
.p2align 4, 0x90
LBB0_2: ## %loopK
## =>This Inner Loop Header: Depth=1
vcvtps2dq (%rsi), %ymm0
vmovupd %ymm0, (%rdx)
addl $-8, %edi
addq $32, %rsi
addq $32, %rdx
cmpl $8, %edi
jge LBB0_2
LBB0_3: ## %hoist1
xorl %eax, %eax
testl %edi, %edi
jle LBB0_6
.p2align 4, 0x90
LBB0_5: ## %loop1
## =>This Inner Loop Header: Depth=1
vcvtss2si (%rsi,%rax), %ecx
movl %ecx, (%rdx,%rax)
decl %edi
addq $4, %rax
testl %edi, %edi
jg LBB0_5
LBB0_6: ## %leave
vzeroupper
retq
.cfi_endproc
## -- End function
Change-Id: Ib59eb3fd8a6805397850d93226c6c6d37cc3ab84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276738
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Also adds a drawIndexPattern() helper method to GrOpsRenderPass, and
starts testing a base index with drawIndexedInstanced.
Change-Id: I3fbb1b5a2a1012a4fcbe126c54ddbc8c17ce80b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276739
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Seems very one-off (esp. given SkSL). No one seems to use it.
Change-Id: Iaded54c5b4183fa4aa9c318b5dbe1d410cca539a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276617
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
'$' lets you see what the serialized version looks like. Helps diagnose
failures in dm/fm
Change-Id: I0c3acdeb6e7f170f5caeba1c0516b449eb7402ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276756
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
This CL moves the boiler-plate implementation of onPrePrepareDraws up to GrMeshDrawOp. This, unfortunately, required the addition of a 'programInfo' virtual but that may go away in the future.
The only GrMeshDrawOp-derived classes left are:
AAHairlineOp - which has 3 programInfos
AAFlatteningConvexPathOp - which has >=1 mesh (but just 1 programInfo)
GrAtlasTextOp - which has inline uploads
SmallPathOp - which, maybe, has inline uploads
TextureOp - which has chaining
Bug: skia:9455
Change-Id: Id10f70e764054134751545ad38b99f0a0778de76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276642
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Directly compute things like stride and vertex attribute types from the
underlying state, rather than trying to keep two tiers of flags
correctly in sync.
With these changes, createProgramInfo can be pushed to onExecute.
Change-Id: I0b021b3880a92e5782f821ebe95ac5aee288f7bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276643
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
SkCanvas keeps its non-exotic drawBitmap calls for now but they
immediately wrap the bitmap in SkImage::MakeFromBitmap. This will
add a copy for mutable bitmaps, but this can be worked around by using
images directly (preferred), or marking the bitmap as immutable. In
practice, mutable bitmaps do not seem to be widely used so this is
deemed acceptable for now.
Several GMs are updated to mark the bitmaps as immutable in order to
avoid pixel churn in how CPU vs. GPU mipmaps are generated. As we move
towards explicit mipmap generation, this distinction will become less
critical, so I'm just avoiding it for now. See skbug.com/9337 for mipmap
proposal. The image diffs encountered in this CL directly related to
generating mipmaps for bitmaps already cached on the GPU vs. not on the
GPU yet.
It was decided to copy if mutable vs. never copying the bitmap because
it preserves the image guarantees the devices and canvas' rely on,
and imposing the need to inspect an image for mutability is undesired.
Bug: skia:10037, skia:9337
Change-Id: If152e6cae1e155ccf6bd2cd755895f3c7a0135a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276004
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Until now I've been setting this in GN args, but that leads to slow
complete rebuilds. Defining it in SkVM.h makes for a smaller rebuild.
(WFH optimization)
Change-Id: Iaebebd49efaa2df6ef09606989d608cb6a5e630e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276690
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Change-Id: Id3313169be2fecfb8a11045f08a55490fbec9b9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276486
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
- Switch to using GrVertexWriter to eliminate bookkeeping
- Hoist the position transform out of the loop with a call to
MapPointsWithStride. This lets us do the matrix type checking and
proc lookup once, rather than N times.
- Remove another branch (local coords) by just making localCoord point
at positions if they're not present in the mesh.
- Compute the stride directly from flags, paving the way for delaying
the program info creation until onExecute.
Bug: skia:9984
Change-Id: I2b8b2ce60b3cd97361ae9562c0412b65251f58f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276483
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This CL:
Renames the existing createProgramInfo method to onCreateProgramInfo and makes it a virtual on GrMeshDrawOp
Moves the non-virtual createProgramInfo (helper) calls to GrMeshDrawOp
Changes onCreateProgramInfo to not return a ProgramInfo*. This is setting up to handle ops that create >1 programInfo (e.g., AAHairlineOp)
This CL leaves the following 8 ops in need of an onCreateProgramInfo implementation:
AAHairlineOp
AAFlatteningConvexPathOp
GrAtlasTextOp
GrShadowRRectOp
SmallPathOp
GrTextureOp
PrimitiveProcessorTest::Op
VertexColorSpaceBench::Op
Bug: skia:9455
Change-Id: Id7e2b8a40cac86ede6bf3c0e544da5500ff47d8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276403
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Change-Id: I7b62a8c94d1afde1bbec0c476ef8cf8d0e09b677
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276636
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Eric Boren <borenet@google.com>