Commit Graph

53165 Commits

Author SHA1 Message Date
Brian Osman
38d8deae8f Revert "Add particle GM that uses uniforms, fix related bug in particle effect"
This reverts commit 964b4465c4.

Reason for revert: Earlier CL needs revert

Original change's description:
> Add particle GM that uses uniforms, fix related bug in particle effect
>
> We weren't allocating uniform storage until after the first update, far
> too late for users to pump uniform values in. They're now allocated as
> soon as the effect is created, which is tested by the new GM.
>
> Change-Id: Ia0084bcec5986479c350ead27d14344c3ed82520
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362176
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=brianosman@google.com

Change-Id: Ib6f963840af2abba0a4e6b99185f4010b61dde54
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362418
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-29 19:21:49 +00:00
Kevin Lubick
365949cf54 [canvaskit] Skip particles gms
The gms are failing to link at the moment with the current build.

Change-Id: I3c73c68c9bfd053ffb2687e54ed9d0899dadca5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362337
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-29 19:17:08 +00:00
Brian Salomon
07d8c0d11c Make GrDirectContext::updateBackendTexture handle pixmaps with non-type row bytes.
Some GL contexts don't support GL_UNPACK_ROW_LENGTH and we must
copy the src data to a pixmap with tight row bytes.

Bug: chromium:1170392

Change-Id: I4590f20dbc80cb792f30f0059536716cf106f6c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361717
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-01-29 19:11:18 +00:00
Mike Reed
99da77ae93 Pass sampling to drawImage
Bug: skia:7650
Change-Id: Ia0e02023ab65267e0be17ee1509c8562fe55d75a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362180
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-29 18:53:48 +00:00
Mike Klein
75bd058766 refamiliarize fm_driver.go
Update comments and small tweaks as I remember how this works.

Change-Id: I4a279781e512fc707b96226e62a2831a1d0683e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362196
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-01-29 18:39:28 +00:00
John Stiles
9c9f60cdb4 Implement additional Runtime Effect intrinsic tests.
Tested in dm:
- max(halfN, halfN)
- max(halfN, half)
- min(halfN, halfN)
- min(halfN, half)
- clamp(halfN, halfN, halfN)
- clamp(halfN, half, half)
- mix(halfN, halfN, halfN)
- mix(halfN, halfN, half)

Compiled outputs only (not in ES2):
- max(intN, intN)
- max(intN, int)
- min(intN, intN)
- min(intN, int)
- clamp(intN, intN, intN)
- clamp(intN, int, int)
- mix(halfN, halfN, boolN)  - broken in Metal/SPIR-V (skia:11222)
- mix(intN, intN, boolN)    - broken in Metal/SPIR-V (skia:11222)

Change-Id: Iaafc5429b16d2a8710b9d171ae281c268c0fd70d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361438
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-29 18:23:48 +00:00
Brian Osman
964b4465c4 Add particle GM that uses uniforms, fix related bug in particle effect
We weren't allocating uniform storage until after the first update, far
too late for users to pump uniform values in. They're now allocated as
soon as the effect is created, which is tested by the new GM.

Change-Id: Ia0084bcec5986479c350ead27d14344c3ed82520
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362176
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-29 18:01:48 +00:00
John Stiles
e1658b5977 Reland "Add some SkSL intrinsics to our dm tests."
This reverts commit b576168c8c.

Reason for revert: disabled floor test due to undiagnosed ANGLE + DX9 + Intel6000 failures

Original change's description:
> Revert "Add some SkSL intrinsics to our dm tests."
>
> This reverts commit 0492a744a5.
>
> Reason for revert: Intel HD6000 + ANGLE DX9 fails the floor() test.
>
> Original change's description:
> > Add some SkSL intrinsics to our dm tests.
> >
> > This CL adds dm coverage for:
> > - abs(half)
> > - sign(half)
> > - floor
> > - ceil
> >
> > And creates test output for abs(int) and sign(int); these aren't covered
> > by dm because they don't exist in ES2 and so are unsupported by Runtime
> > Effects.
> >
> > Change-Id: Ia3e660408cef50dec8fa4b6bdc12906e96179f6e
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360419
> > Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
>
> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
>
> Change-Id: I62121efee9315b16e61e7d38659b6f629bdf8bd8
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362056
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: I22f22f631d85d93a8fe5686a99311ec2cf85fa4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362103
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-29 17:58:18 +00:00
Brian Salomon
c621dcf354 Revert "Remove maxTileSize from GrCaps, bleed GMs use max texture size override."
This reverts commit 0bad6cf145.

Reason for revert: breaking perf bot!?!?

Original change's description:
> Remove maxTileSize from GrCaps, bleed GMs use max texture size override.
>
> This existed to enable shader-based versions of the old bleed GM that no
> longer exist. It is currently making it harder to simplify image->view
> consolidation without accidentally limiting the testing. This is because
> an attempt to create a texture from a bitmap will succeed if max texture
> size is not overridden by the test.
>
> Bug: skia:11208
> Change-Id: I432d1d2ab66c1e888c9d77583b3c9a9d673e7e8f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360609
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:11208
Change-Id: Ib8643aec37ac312ac0a2fb834cc3dbf116f7a898
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362099
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-01-29 17:54:48 +00:00
Greg Daniel
c1ea3d9b8e Add debug checks to enforce gpu buffer access patterns.
Specifically make sure it is true that we only write to static and stream
access buffers once.

Bug: skia:11226
Change-Id: I566a095093e884075bc4bee07ba1101e772e3332
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360476
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-01-29 17:50:58 +00:00
John Stiles
1e1fe122f5 Replace writeVariableUniform custom logic with getLValue.
This doesn't change any behavior. I just noticed that getLValue already
had all the variable-loading logic, so we could just share the code
instead of implementing it separately.

Change-Id: Ib921a35f4fc531351717db60f8bd086498de4810
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361519
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-29 17:47:28 +00:00
Kevin Lubick
2266380304 Remove some ableist language from infra parts
https://developers.google.com/style/inclusive-documentation#ableist-language

Change-Id: I212f6e7c428b7738b7a3fb2319e0821b34b0a78a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362098
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2021-01-29 17:36:18 +00:00
Ben Wagner
fa8b5e4502 Add support for retina displays to sk_app.
The macOS view system is in "big pixel" units, so translate these
into "physical pixel" units.

To compensate, add sk_app::Window::scaleFactor() which returns the
scale factor. The viewer app is modified to apply the inverse of
this scale factor to the current zoom level.

Change-Id: I4fac066a230c87793fc5a0e5a582d60d25e46e7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361558
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-01-29 17:33:48 +00:00
Mike Reed
0ab283aaf2 Revert "Hide SK_SUPPORT_LEGACY_DRAWIMAGE_NOSAMPLING flag"
This reverts commit 5817fe1069.

Reason for revert: broke GifTest

Original change's description:
> Hide SK_SUPPORT_LEGACY_DRAWIMAGE_NOSAMPLING flag
>
> Bug: skia:7650
> Change-Id: I7924efdbbb957c0453c5444796dc31f0b0f7459b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361437
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

TBR=kjlubick@google.com,reed@google.com

Change-Id: I1e6dc844b8780b332ef94234bed2e8fbdf60f8cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7650
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362179
Reviewed-by: Mike Reed <reed@google.com>
2021-01-29 17:25:45 +00:00
Mike Reed
5817fe1069 Hide SK_SUPPORT_LEGACY_DRAWIMAGE_NOSAMPLING flag
Bug: skia:7650
Change-Id: I7924efdbbb957c0453c5444796dc31f0b0f7459b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361437
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-01-29 17:06:48 +00:00
Mike Klein
fadf91cbd3 don't instrument reactor in MSAN builds
This has lead to >9hr runtimes and timeouts,
making our GPU MSAN bots essentially useless black holes.

Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-x86_64-Debug-SwiftShader_MSAN
Change-Id: I0d2b06e89ee672f1b181d140a9355e39597da49b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362136
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-29 16:23:36 +00:00
Brian Osman
6b37bd15ca Sort loaded particle effects alphabetically
Minor tweak to the UI on the Particles slide

Change-Id: I4d60be7fa843ea2717f27406a18e133e30662010
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362096
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-29 16:21:48 +00:00
John Stiles
e40d166477 Reland "Add support for top-level uniforms in SPIR-V."
This reverts commit 0de76f72cd.

Reason for revert: fixes ASAN use-after-scope-end issue

Original change's description:
> Revert "Add support for top-level uniforms in SPIR-V."
>
> This reverts commit acba30420c.
>
> Reason for revert: ASAN breakage on tree for
> Perf-Win2019-Clang-GCE-CPU-AVX2-x86_64-(Debug|Release)-All-ASAN
>
>  Address 0x009af69fda78 is located in stack of thread T0 at offset 1272 in frame
>      #0 0x7ff75c069ddf in _asan_wrap_RtlReAllocateHeap+0x44014f (c:\b\s\w\ir\build\nanobench.exe+0x1413a9ddf)
>    This frame has 35 object(s):
>      [32, 104) 'body' (line 3363)
>      [144, 152) 'main' (line 3365)
>      [176, 184) 'ref.tmp' (line 3366)
>      [208, 240) '__begin1' (line 3366)
>      [272, 304) '__end1' (line 3366)
>      [336, 344) 'ref.tmp27' (line 3370)
>      [368, 384) 'ref.tmp31' (line 3371)
>      [400, 416) 'interfaceVars' (line 3382)
>      [432, 440) 'ref.tmp48' (line 3383)
>      [464, 496) '__begin151' (line 3383)
>      [528, 560) '__end154' (line 3383)
>      [592, 596) 'id' (line 3386)
>      [608, 624) 'tmp' (line 3393)
>      [640, 648) 'ref.tmp114' (line 3398)
>      [672, 704) '__begin1117' (line 3398)
>      [736, 768) '__end1120' (line 3398)
>      [800, 1008) 'uniformBuffer' (line 3405)
>      [1072, 1280) 'ref.tmp159' (line 3407) <== Memory access at offset 1272 is inside this variable
>      [1344, 1360) 'agg.tmp'
>      [1376, 1576) 'adapter' (line 3411)
>      [1648, 1848) 'ref.tmp179' (line 3413)
>      [1920, 1928) 'ref.tmp191' (line 3415)
>      [1952, 1960) 'ref.tmp210' (line 3421)
>      [1984, 2016) '__begin1213' (line 3421)
>      [2048, 2080) '__end1216' (line 3421)
>      [2112, 2120) '__begin1242' (line 3427)
>      [2144, 2152) '__end1247' (line 3427)
>      [2176, 2192) 'entry256' (line 3427)
>      [2208, 2224) 'tmp298' (line 3433)
>      [2240, 2256) 'agg.tmp307'
>      [2272, 2280) '__begin1365' (line 3457)
>      [2304, 2312) 'ref.tmp415' (line 3469)
>      [2336, 2368) '__begin1418' (line 3469)
>      [2400, 2432) '__end1421' (line 3469)
>      [2464, 2480) 'agg.tmp436'
>
> Original change's description:
> > Add support for top-level uniforms in SPIR-V.
> >
> > Previously, a uniform not wrapped in an interface block would report a
> > SPIR-V error:
> >
> > "Variables identified with the Uniform storage class are
> > used to access transparent buffer backed resources. Such variables must
> > be typed as OpTypeStruct, or an array of this type..."
> >
> > Now, the SPIR-V code generator automatically detects such global
> > variables and synthesizes a struct named _UniformBuffer to hold them.
> > When these variables are accessed, an OpAccessChain instruction is added
> > to grab the variable out of the struct.
> >
> > Change-Id: I5e852d4de01b866c291506cc8cf6eb547f097d66
> > Bug: skia:11225
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360776
> > Commit-Queue: John Stiles <johnstiles@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
>
> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
>
> Change-Id: Ib72e33dbd662a245c20bc9d45d1397454c9588a3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:11225
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362057
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Bug: skia:11225
Change-Id: I10501c30a701301f6487ea154047ad1c1d0e8c70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362076
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-29 16:12:03 +00:00
Brian Osman
cdd852b579 Reland "Add particle GMs"
This reverts commit 3b01242199.

Cq-Include-Trybots: luci.skia.skia.primary:Canary-G3
Change-Id: I83ee324d5ca927413022b08fb4b48936adbc0e2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362058
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-29 16:04:28 +00:00
John Stiles
0de76f72cd Revert "Add support for top-level uniforms in SPIR-V."
This reverts commit acba30420c.

Reason for revert: ASAN breakage on tree for
Perf-Win2019-Clang-GCE-CPU-AVX2-x86_64-(Debug|Release)-All-ASAN

 Address 0x009af69fda78 is located in stack of thread T0 at offset 1272 in frame
     #0 0x7ff75c069ddf in _asan_wrap_RtlReAllocateHeap+0x44014f (c:\b\s\w\ir\build\nanobench.exe+0x1413a9ddf)
   This frame has 35 object(s):
     [32, 104) 'body' (line 3363)
     [144, 152) 'main' (line 3365)
     [176, 184) 'ref.tmp' (line 3366)
     [208, 240) '__begin1' (line 3366)
     [272, 304) '__end1' (line 3366)
     [336, 344) 'ref.tmp27' (line 3370)
     [368, 384) 'ref.tmp31' (line 3371)
     [400, 416) 'interfaceVars' (line 3382)
     [432, 440) 'ref.tmp48' (line 3383)
     [464, 496) '__begin151' (line 3383)
     [528, 560) '__end154' (line 3383)
     [592, 596) 'id' (line 3386)
     [608, 624) 'tmp' (line 3393)
     [640, 648) 'ref.tmp114' (line 3398)
     [672, 704) '__begin1117' (line 3398)
     [736, 768) '__end1120' (line 3398)
     [800, 1008) 'uniformBuffer' (line 3405)
     [1072, 1280) 'ref.tmp159' (line 3407) <== Memory access at offset 1272 is inside this variable
     [1344, 1360) 'agg.tmp'
     [1376, 1576) 'adapter' (line 3411)
     [1648, 1848) 'ref.tmp179' (line 3413)
     [1920, 1928) 'ref.tmp191' (line 3415)
     [1952, 1960) 'ref.tmp210' (line 3421)
     [1984, 2016) '__begin1213' (line 3421)
     [2048, 2080) '__end1216' (line 3421)
     [2112, 2120) '__begin1242' (line 3427)
     [2144, 2152) '__end1247' (line 3427)
     [2176, 2192) 'entry256' (line 3427)
     [2208, 2224) 'tmp298' (line 3433)
     [2240, 2256) 'agg.tmp307'
     [2272, 2280) '__begin1365' (line 3457)
     [2304, 2312) 'ref.tmp415' (line 3469)
     [2336, 2368) '__begin1418' (line 3469)
     [2400, 2432) '__end1421' (line 3469)
     [2464, 2480) 'agg.tmp436'

Original change's description:
> Add support for top-level uniforms in SPIR-V.
>
> Previously, a uniform not wrapped in an interface block would report a
> SPIR-V error:
>
> "Variables identified with the Uniform storage class are
> used to access transparent buffer backed resources. Such variables must
> be typed as OpTypeStruct, or an array of this type..."
>
> Now, the SPIR-V code generator automatically detects such global
> variables and synthesizes a struct named _UniformBuffer to hold them.
> When these variables are accessed, an OpAccessChain instruction is added
> to grab the variable out of the struct.
>
> Change-Id: I5e852d4de01b866c291506cc8cf6eb547f097d66
> Bug: skia:11225
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360776
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: Ib72e33dbd662a245c20bc9d45d1397454c9588a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11225
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362057
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-29 14:20:16 +00:00
John Stiles
b576168c8c Revert "Add some SkSL intrinsics to our dm tests."
This reverts commit 0492a744a5.

Reason for revert: Intel HD6000 + ANGLE DX9 fails the floor() test.

Original change's description:
> Add some SkSL intrinsics to our dm tests.
>
> This CL adds dm coverage for:
> - abs(half)
> - sign(half)
> - floor
> - ceil
>
> And creates test output for abs(int) and sign(int); these aren't covered
> by dm because they don't exist in ES2 and so are unsupported by Runtime
> Effects.
>
> Change-Id: Ia3e660408cef50dec8fa4b6bdc12906e96179f6e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360419
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: I62121efee9315b16e61e7d38659b6f629bdf8bd8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362056
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-01-29 14:03:36 +00:00
Mike Reed
6f3243c320 Add staging flags to flutter
Change-Id: I5fd6d513a0204233998a0e07962b3a4b804adbda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361498
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-29 13:15:15 +00:00
skia-autoroll
b9f95ba9f3 Roll SwiftShader from 3e9b79ff42de to 0cbf89c7520e (6 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/3e9b79ff42de..0cbf89c7520e

2021-01-28 capn@google.com Enable named mmap usage for Chromium
2021-01-28 capn@google.com Only enable naming anonymous mmap on Linux
2021-01-28 sugoi@google.com Add utility function to count input components
2021-01-28 sugoi@google.com Support SampleId and SamplePosition builtins
2021-01-28 sugoi@google.com Store interpolation data in routine
2021-01-28 sugoi@google.com Per sample shading

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC nifong@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:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: nifong@google.com
Change-Id: I539faeb117d039dfd331d7ac97e15f792bfac2ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361878
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-29 05:49:04 +00:00
skia-autoroll
bcd0ead9df Roll Dawn from a194a48ba2d9 to bf1c0cf52377 (12 revisions)
https://dawn.googlesource.com/dawn.git/+log/a194a48ba2d9..bf1c0cf52377

2021-01-28 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 5ad2d0087be3 to ad27ee8c1038 (3 revisions)
2021-01-28 enga@chromium.org Skip validation tests failing with the wire
2021-01-28 senorblanco@chromium.org Revert "Moar testing on OpenGL ES backend."
2021-01-28 yunchao.he@intel.com Add texture creation validation rules for 3D texture
2021-01-28 senorblanco@chromium.org Moar testing on OpenGL ES backend.
2021-01-28 senorblanco@chromium.org Remove glPixelStore GL_PACK_IMAGE_HEIGHT calls.
2021-01-28 rharrison@chromium.org Enable OpArrayLengthTests
2021-01-28 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from d5c0b8e851d2 to 5ad2d0087be3 (3 revisions)
2021-01-28 senorblanco@chromium.org Don't enable GL_FRAMEBUFFER_SRGB on OpenGL ES.
2021-01-28 dsinclair@chromium.org Combine tint toggles.
2021-01-28 cwallez@chromium.org dawn_native: Do CommandBufferStateTracker validation at encoding time
2021-01-28 kainino@chromium.org Fix translation of storeOp "clear" on Metal

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from d5c0b8e851d2 to ad27ee8c1038

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC sarahmashay@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-Debug-Dawn
Bug: None
Tbr: sarahmashay@google.com
Test: Test: MultisampledRenderingTest.ResolveInto2DTextureTest: Test: webgpu:api,operation,render_pass,resolve:render_pass_resolve:*
Change-Id: I87ce82bf1577119ea4a2d56b01c03c77b8436842
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361877
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-29 05:45:25 +00:00
skia-autoroll
56c9a4577e Roll Chromium from 2eea5db84b60 to 9009a36b9b75 (438 revisions)
2eea5db84b..9009a36b9b

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC nifong@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:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: nifong@google.com
Change-Id: If6b9ec06dee428e35c67cf4126021b39b6881567
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361859
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-29 05:29:05 +00:00
Brian Salomon
864465765b Revert "Remove SkImage_Base::refPinnedImage(), use refView() instead."
This reverts commit 9f899ac9ed.

Reason for revert: broke ios bot?

Original change's description:
> Remove SkImage_Base::refPinnedImage(), use refView() instead.
>
> Also use refView() for lazy/raster images as well rather than creating
> a GrTextureProducer class outside the image.
>
> Bug: skia:11208
>
> Change-Id: Iee628c337bc1b4cfcccd78eaba98589757bb55ab
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360980
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: Iab4851f5cefdca853e16c030ec67238c55c69aa2
Cq-Include-Trybots: luci.skia.skia.primary:Test-iOS-Clang-iPhone6-GPU-PowerVRGX6450-arm64-Release-All-Metal
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361838
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-01-29 05:06:04 +00:00
Mike Reed
3b01242199 Revert "Add particle GMs"
This reverts commit f3274e035b.

Reason for revert: breaking google3 roll

ld.lld: error: undefined symbol: SkParticleEffect::RegisterParticleTypes()
>>> referenced by particles.cpp
>>>               blaze-out/k8-fastbuild/bin/third_party/skia/HEAD/_objs/dm/particles.pic.o:(ParticlesGM::onOnceBeforeDraw())

ld.lld: error: undefined symbol: SkParticleEffectParams::SkParticleEffectParams()
>>> referenced by particles.cpp
>>>               blaze-out/k8-fastbuild/bin/third_party/skia/HEAD/_objs/dm/particles.pic.o:(ParticlesGM::onOnceBeforeDraw())

ld.lld: error: undefined symbol: SkParticleEffectParams::visitFields(SkFieldVisitor*)


Original change's description:
> Add particle GMs
>
> They've only existed as a custom slide in Viewer until now, so it was
> easy to break them (and also hard for people to see a minimal set of
> code to use them).
>
> Change-Id: I2e3a0eb1948e05b87dbf21009214f8237c123b7d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360599
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=brianosman@google.com,reed@google.com

Change-Id: I3fdd079d076ce781e5a4e2b4f51908f0bd564c1a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361836
Reviewed-by: Mike Reed <reed@google.com>
2021-01-29 02:46:49 +00:00
Mike Reed
00f4769e34 Condtionalize flags (so flutter can add them)
Change-Id: I6e6916a433341065516280f18a7b2779139b782f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361716
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-29 01:32:11 +00:00
Jim Van Verth
46e9b0e919 Add flag to force pushconstant layout for SkSL synthetic uniforms
Change-Id: Ibe9c2a3fb52b1a18895c1a61bdb296351b989537
Bug: skia:5039
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361456
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-29 00:09:31 +00:00
Brian Osman
f3274e035b Add particle GMs
They've only existed as a custom slide in Viewer until now, so it was
easy to break them (and also hard for people to see a minimal set of
code to use them).

Change-Id: I2e3a0eb1948e05b87dbf21009214f8237c123b7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360599
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-28 23:58:31 +00:00
Adlai Holler
b5dda505cb Fix write-after-read in clustering
This fixes the `discard` gm that demonstrates the write-after-read.

Bug: skia:10877
Change-Id: I631b7626a47d046bb5f842e997f50dfec50649b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360606
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2021-01-28 22:46:00 +00:00
John Stiles
0492a744a5 Add some SkSL intrinsics to our dm tests.
This CL adds dm coverage for:
- abs(half)
- sign(half)
- floor
- ceil

And creates test output for abs(int) and sign(int); these aren't covered
by dm because they don't exist in ES2 and so are unsupported by Runtime
Effects.

Change-Id: Ia3e660408cef50dec8fa4b6bdc12906e96179f6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360419
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-28 21:20:00 +00:00
John Stiles
acba30420c Add support for top-level uniforms in SPIR-V.
Previously, a uniform not wrapped in an interface block would report a
SPIR-V error:

"Variables identified with the Uniform storage class are
used to access transparent buffer backed resources. Such variables must
be typed as OpTypeStruct, or an array of this type..."

Now, the SPIR-V code generator automatically detects such global
variables and synthesizes a struct named _UniformBuffer to hold them.
When these variables are accessed, an OpAccessChain instruction is added
to grab the variable out of the struct.

Change-Id: I5e852d4de01b866c291506cc8cf6eb547f097d66
Bug: skia:11225
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360776
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-28 21:19:26 +00:00
Tyler Denniston
96a97497b3 Update SVG asset creation to handle images
This CL updates the infra scripts used to create the CIPD asset for
SVG's corpus on gold to download and include image resources.

Summary of changes:
- Change svg_downloader.py input argument to more generic name
- Add --keep_common_prefix arg to svg_downloader.py to preserve the
  directory hierarchy for images, needed for the W3C test suite.
- Update infra SVG create.py script to download images
- Add svg_images.txt file with a list of the images we need for the W3C
  test suite already in gold.

Actually updating the corpus will happen in a separate CL.

Bug: skia:11229
Change-Id: I5fe9be35db247f577bda6040ca3694a428314d0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361516
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-01-28 21:00:24 +00:00
Brian Osman
3f904db257 Eliminate some platform/compiler dependent behavior in skvm tests
Some users were getting a different order-of-evaluation of this
expression, resulting in different test output.

See: https://skia-review.googlesource.com/c/skia/+/361497/2

Change-Id: I0dea1de3bfa1a13c7a6cbe1ad00f727726e3b76e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361521
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-28 20:57:59 +00:00
Brian Salomon
9321961fed SkRuntimeEffect::makeImage disregards mipmap request if GPU not capable.
Change-Id: I2c1c09d07a12e0382633e7e12750a4672f21bbda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360416
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-28 20:55:19 +00:00
Mike Reed
9ced5e6a3e Pass sampling to drawImage
Bug: skia:7650
Change-Id: I78ea4ed5cfa06efa5ac174f7d9ef811a1b9a61bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361520
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-28 20:32:19 +00:00
Brian Osman
02bc52284d Emit top-level StructDefinition for every struct
Previously, structs that were defined as part of a variable declaration
would end up declared similarly in the generated code. Now, global
variable declarations that include a struct definition generate two
separate program elements.

Bug: skia:11228
Change-Id: Id7ddde6931fe07a250c2c9c46153879005535fb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361359
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-01-28 19:50:09 +00:00
Brian Salomon
9f899ac9ed Remove SkImage_Base::refPinnedImage(), use refView() instead.
Also use refView() for lazy/raster images as well rather than creating
a GrTextureProducer class outside the image.

Bug: skia:11208

Change-Id: Iee628c337bc1b4cfcccd78eaba98589757bb55ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360980
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-01-28 19:41:59 +00:00
Mike Reed
98afb4f368 drawBitmap is deprecated
Change-Id: I0720bb18065e0bce2416c5adef4866064485ff7c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361517
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-28 19:37:45 +00:00
John Stiles
da5cdf6a70 Add default uniform binding value for Metal/SPIR-V.
This allows interface blocks in Metal to compile even if
`layout(binding=...)` is not specified. It will also be used in SPIR-V
in the followup CL, when an interface block is automatically synthesized
for top-level uniforms.

This CL also reorganizes the unit tests around uniforms a bit.

Change-Id: Ia898c536b454dda6f51677e232a8f6e6c3606022
Bug: skia:11225
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360778
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-28 19:23:49 +00:00
Chris Dalton
ebb37e7db0 Rewrite GrPathTessellateOp as GrPathInnerTriangulateOp
Simplifies the op to always triangulate the inner fan. We ensure this
will always work by using breadcrumb triangles. Also removes the
fail-on-non-simple mode from GrInnerFanTriangulator since it isn't
being used anymore.

Bug: skia:10419
Change-Id: Idb849712bf2bc4e5ef785bc3f9b8db03119d230e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359565
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-01-28 18:34:39 +00:00
Mike Reed
b339d051e0 pass sampling to drawImage
Bug: skia:7650
Change-Id: I0fa4c5f3fb350705f78ee91f4bdfb4edd83d0ed9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361360
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-28 17:56:52 +00:00
Mike Reed
993e92dc31 Update bad_bitmap test
Change-Id: I1b4bcb3aff254099e8aa3467bbe38662107db834
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361357
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-28 17:10:19 +00:00
Brian Osman
bf7b4b8890 Add SkSL test for functions that operate on structs
This is a known deficiency of runtime effects, next step is to fix how
they manage function signatures to solve the problem.

Bug: skia:10939
Change-Id: Id934e0acdf774b03bd6edce78d7b2c077bdeae00
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360603
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-28 17:01:59 +00:00
Brian Osman
00fea5b41f Remove ASTNode::TypeData
Pre-cleanup as I start looking at how structs are parsed and handled in
the IR.

Bug: skia:11228
Change-Id: I6334d1073211cbbdf69ddffa8df420c45fd59fcc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361059
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-01-28 16:56:59 +00:00
Ethan Nicholas
1ff760981d Added SkSL DSLFunction
Change-Id: Ibc995e908e5b4f8d1516e13d56854a4fcf5cc809
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360556
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-28 16:13:19 +00:00
Brian Salomon
0bad6cf145 Remove maxTileSize from GrCaps, bleed GMs use max texture size override.
This existed to enable shader-based versions of the old bleed GM that no
longer exist. It is currently making it harder to simplify image->view
consolidation without accidentally limiting the testing. This is because
an attempt to create a texture from a bitmap will succeed if max texture
size is not overridden by the test.

Bug: skia:11208
Change-Id: I432d1d2ab66c1e888c9d77583b3c9a9d673e7e8f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360609
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-01-28 15:01:59 +00:00
Mike Reed
0ce48858c9 Faster (conservative) IsAxisAligned
This is used to decide when we can keep the convex bit during
path.transform. This new version is much faster than the old,
but can return a false negative if there are multiple contours.

However, the caller now only calls this if the path is known to
be convex, so there should never be multiple contours.

This, along with

https://skia-review.googlesource.com/c/skia/+/359837

make path.transform() approx 2x faster

Bug: skia:11227
Change-Id: Ied7ca97d87b9224a3ecd9b77b22b823964809a52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359916
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-01-28 14:35:58 +00:00
Chris Dalton
b03f4a1dc8 Rename GrPathStencilFillOp -> GrTessellatingStencilFillOp
Bug: skia:10419
Change-Id: I5c23a0ccbe45634e9d2740789f0cbe44ca0292c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360957
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-01-28 13:51:17 +00:00