Commit Graph

161 Commits

Author SHA1 Message Date
Noah Lavine
334d0ba9d7 Optimize SkSL xor where one argument is constant
Change-Id: I9ea41625fd80433f7f6480fe539321d8df7b7930
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258877
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-12-20 14:50:46 +00:00
Brian Osman
088913a63b Start adding unit tests of SkRuntimeEffect
- Change SkRuntimeEffect::Make so *it* can fail, and returns
  [Effect, ErrorText].
- Initial tests just test for expected failure conditions.
  Next steps are to add tests for effects that should work,
  and to validate results on CPU and GPU.

Change-Id: Ibac8c3046104577434034263e9e4a4b177e89129
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261095
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-20 14:15:06 +00:00
Chris Dalton
b0fd4b12a1 Reland "Revert "Revert "Rename gl_SampleMask to sk_SampleMask"""
This is a reland of 4ac37632a8

Original change's description:
> Revert "Revert "Rename gl_SampleMask to sk_SampleMask""
> 
> This reverts commit 40b815db97.
> 
> Bug: skia:
> Change-Id: I454d3e86219276996d0b4f9e7fcf177bb6dc45e7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251004
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

Bug: skia:
Change-Id: Ia343e9e1008ca2354e1d300030e763f3c578d71c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251441
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-10-29 21:01:52 +00:00
Greg Daniel
1e058a5380 Reland "Revert "Rename gl_SampleMask to sk_SampleMask""
This reverts commit 4ac37632a8.

Reason for revert: Failing assert, "assert(fProgram.fSettings.fCaps->sampleVariablesSupport())" on some bots

Original change's description:
> Revert "Revert "Rename gl_SampleMask to sk_SampleMask""
> 
> This reverts commit 40b815db97.
> 
> Bug: skia:
> Change-Id: I454d3e86219276996d0b4f9e7fcf177bb6dc45e7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251004
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=csmartdalton@google.com,ethannicholas@google.com

Change-Id: I1fe9e2bb0d9f921f7d66e4a4707c21dd5c923586
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251248
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-10-28 19:28:25 +00:00
Ethan Nicholas
4ac37632a8 Revert "Revert "Rename gl_SampleMask to sk_SampleMask""
This reverts commit 40b815db97.

Bug: skia:
Change-Id: I454d3e86219276996d0b4f9e7fcf177bb6dc45e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251004
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-10-28 18:47:52 +00:00
Robert Phillips
40b815db97 Revert "Rename gl_SampleMask to sk_SampleMask"
This reverts commit 23716d42f7.

Reason for revert: red bots and GMs

Original change's description:
> Rename gl_SampleMask to sk_SampleMask
> 
> Change-Id: I3924c6f76edf310a984e4fd89478b00eeec69722
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249931
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=egdaniel@google.com,csmartdalton@google.com,ethannicholas@google.com

Change-Id: I74848e95972cf2c41cc28887e26214136ce79e08
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250180
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-10-23 12:28:48 +00:00
Chris Dalton
23716d42f7 Rename gl_SampleMask to sk_SampleMask
Change-Id: I3924c6f76edf310a984e4fd89478b00eeec69722
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249931
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-10-22 20:36:00 +00:00
Ethan Nicholas
409f6f0dec Additional SkSL swizzle optimizations
Now optimizes away identity swizzles and collapses swizzles of swizzles
down to a single swizzle.

Bug: skia:9180
Change-Id: I259ff4b316ec3479647abf9615a0e4c61c0f34c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241880
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-17 18:39:41 +00:00
Ethan Nicholas
e455f65ecf SkSL now supports constant 1/0 in all swizzle channels, as well as "LTRB" as an alias for "xyzw" / "rgba".
Bug: skia:9181
Change-Id: Iedefbb94bbb05ce37fcf66ca0b40c97f2adf7698
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241276
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-13 19:50:59 +00:00
Brian Salomon
67529b2543 SkSL GLSL generator writes default precision for sampler2D/samplerExternalOS/sampler2DRect
This is a stop gap. We should probably base the precision decision on the texture format.

Also removes all code used to add sampler precision to program keys. The precision that
was added to the key did not affect the generated GLSL.

Bug: skia:8863
Bug: skia:6718
Change-Id: Ibdb702e1aca5d48d83e2f24cb24010a0b7270871
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234322
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-14 13:29:57 +00:00
Ethan Nicholas
1386366e01 renamed SkSL texture() and process() to sample()
Bug: skia:
Change-Id: I2ae0caf08f8434302cae8151ae1ea0fda8d56928
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230397
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-07-29 17:37:38 +00:00
Ethan Nicholas
3908059bee fixed SkSL handling of constant arrays
Bug: skia:
Change-Id: Ib01a9a01a0e9e5c27ea5142f8141b769ef093669
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229012
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-07-22 19:37:40 +00:00
Ethan Nicholas
d188c18835 fixed SkSL handling of negated literal vectors
Bug: oss-fuzz:14409
Change-Id: I837083139489d46f7db2f697ce85a0cabf85fb94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219997
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-06-11 16:34:04 +00:00
Ethan Nicholas
fc9941665b Major rearchitecture of SkSL parsing, focused on improving performance.
Bug: skia:
Change-Id: I83e3a094d26085fc4d586e5d2581e0d61c55634e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/145080
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-06-06 14:33:32 +00:00
Brian Osman
6386efa1dd Remove unused "DropsTileOnZeroDivide" caps bit
Change-Id: I545d75a5b95833c6a78f225769ea30656700f785
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218543
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-05 15:38:07 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Chris Dalton
b8af5ad73a sksl: Negate dFdy when the Y axis is flipped
Bug: skia:
Change-Id: Icbdaa6b1ebbe00168f57ebb888c2345d4f7a5e7d
Reviewed-on: https://skia-review.googlesource.com/c/195160
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2019-02-25 23:32:23 +00:00
Ethan Nicholas
ac285b1c2a added constant 0 and 1 swizzle components to SkSL
Bug: skia:
Change-Id: I8f4dce314ebe0d5de7ba032a435f362eeb14edc4
Reviewed-on: https://skia-review.googlesource.com/c/191565
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-02-13 14:43:07 +00:00
Ethan Nicholas
0dc8087e91 SkSL Metal backend can now handle CCPR
Bug: skia:
Change-Id: I796a40db46174b405495af8234c5b8d7920a46d6
Reviewed-on: https://skia-review.googlesource.com/c/189985
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-02-12 14:56:00 +00:00
Ethan Nicholas
e1f5502969 Reland "SkSL is now pickier about type conversions"
This is a reland of 91c1d08bc3

Original change's description:
> SkSL is now pickier about type conversions
> 
> Bug: skia:
> Change-Id: I4e8b8f229f4e4344f160b0dbb41832764d0b75bd
> Reviewed-on: https://skia-review.googlesource.com/c/188311
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:
Change-Id: I727cad061afc0a5ee6f4d2df789330d809dd110a
Reviewed-on: https://skia-review.googlesource.com/c/189643
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-02-06 02:40:59 +00:00
Ethan Nicholas
c83da98d50 Revert "SkSL is now pickier about type conversions"
This reverts commit 91c1d08bc3.

Reason for revert: breaking everything

Original change's description:
> SkSL is now pickier about type conversions
> 
> Bug: skia:
> Change-Id: I4e8b8f229f4e4344f160b0dbb41832764d0b75bd
> Reviewed-on: https://skia-review.googlesource.com/c/188311
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com,ethannicholas@google.com

Change-Id: I670fa9215d3ca0ce738edc24e832b6d968599cb1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/189642
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-02-05 21:54:51 +00:00
Ethan Nicholas
91c1d08bc3 SkSL is now pickier about type conversions
Bug: skia:
Change-Id: I4e8b8f229f4e4344f160b0dbb41832764d0b75bd
Reviewed-on: https://skia-review.googlesource.com/c/188311
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-02-05 21:36:33 +00:00
Ethan Nicholas
a7ceb50f50 added PLS support to SkSL
Bug: skia:
Change-Id: I77fb0861c8cba0f86e3d0521d2ad77e204487d21
Reviewed-on: https://skia-review.googlesource.com/c/99921
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-01-11 18:14:50 +00:00
Michael Ludwig
f0b6044d6d Revert "Fix performance regresion on Mali, while preserving sk_FragCoord.w"
This reverts commit a34e6eac3c.

Reason for revert: Broken gold images on Adreno 530 and 540

Original change's description:
> Fix performance regresion on Mali, while preserving sk_FragCoord.w
> 
> Bug: skia:
> Change-Id: I9269288bbb861cd02efa7b5dfe2c9434ec39064e
> Reviewed-on: https://skia-review.googlesource.com/c/174309
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

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

Bug: skia:
Change-Id: Id344219c101564a5fd06477895386fad2d8dfa78
Reviewed-on: https://skia-review.googlesource.com/c/175986
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2018-12-10 15:33:17 +00:00
Brian Salomon
246bc3d6cb Revert "Revert "Use unnormalized coords all the way through with GL_TEXTURE_RECTANGLE textures.""
This reverts commit 47be94abd1.

Change-Id: I37d3c727ded6501b143381d46d3b00faad3afd75
Reviewed-on: https://skia-review.googlesource.com/c/175421
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-06 21:12:09 +00:00
Michael Ludwig
a34e6eac3c Fix performance regresion on Mali, while preserving sk_FragCoord.w
Bug: skia:
Change-Id: I9269288bbb861cd02efa7b5dfe2c9434ec39064e
Reviewed-on: https://skia-review.googlesource.com/c/174309
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-12-06 18:30:37 +00:00
Brian Salomon
47be94abd1 Revert "Use unnormalized coords all the way through with GL_TEXTURE_RECTANGLE textures."
This reverts commit 10273c1d5f.

Reason for revert: bad gms

Original change's description:
> Use unnormalized coords all the way through with GL_TEXTURE_RECTANGLE textures.
> 
> We used to unnormalize them in the shader via SkSL.
> 
> This allows us to support GL_TEXTURE_RECTANGLE without having textureSize()
> available in GLSL.
> 
> Change-Id: Ibe63a302228811933ef000251db4cad9aaf4f2ea
> Reviewed-on: https://skia-review.googlesource.com/c/174068
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: I9bf38e1040578becba28ac8cccd81e2af2844278
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/175252
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-06 15:50:36 +00:00
Brian Salomon
10273c1d5f Use unnormalized coords all the way through with GL_TEXTURE_RECTANGLE textures.
We used to unnormalize them in the shader via SkSL.

This allows us to support GL_TEXTURE_RECTANGLE without having textureSize()
available in GLSL.

Change-Id: Ibe63a302228811933ef000251db4cad9aaf4f2ea
Reviewed-on: https://skia-review.googlesource.com/c/174068
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-05 20:08:06 +00:00
Michael Ludwig
5e1f6ea595 Remove unnecessary gl_FragCoord workaround
Bug: skia:
Change-Id: I04b6cbfe083c32a25205e04a4b15672d4b678a9c
Reviewed-on: https://skia-review.googlesource.com/c/174063
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2018-12-03 21:32:11 +00:00
Michael Ludwig
7b429aed84 Implement boolean short circuit folding in SkSL
Bug: skia:
Change-Id: I0bb0506bbe6973c004ced22648588d82d2bac497
Reviewed-on: https://skia-review.googlesource.com/151820
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2018-09-07 13:31:05 +00:00
Ethan Nicholas
cd700e9ab7 Revert "Revert "added support for sk_Dimensions to SkSL""
This reverts commit e6ab998bc2.

Bug: skia:
Change-Id: I19451f924d514dadac9d2c326bcc8404a1b501e9
Reviewed-on: https://skia-review.googlesource.com/149239
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-08-27 14:42:08 +00:00
Adrienne Walker
2f4c09b5ca Add remove_pow_with_constant_exponent workaround
Bug: chromium: 477306, 829614
Change-Id: If88c57b15a4cfd6f362a2f5171f8e9c0775cb9d4
Reviewed-on: https://skia-review.googlesource.com/148480
Commit-Queue: Adrienne Walker <enne@chromium.org>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-08-22 23:09:36 +00:00
Adrienne Walker
8b23ca6406 Add rewrite_do_while_loops workaround
Bug: chromium: 644669, 829614
Change-Id: Ic6a4cbd9f7c73b9b9a78608f1b4ac4ce4c4f2cb9
Reviewed-on: https://skia-review.googlesource.com/148439
Commit-Queue: Adrienne Walker <enne@chromium.org>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-08-22 22:45:52 +00:00
Adrienne Walker
92b161fab4 Add emulate_abs_int_function workaround
Bug: chromium: 642227,829614
Change-Id: I23be4105041187a6501f45cd2033ac0143642aa1
Reviewed-on: https://skia-review.googlesource.com/147322
Commit-Queue: Adrienne Walker <enne@chromium.org>
Auto-Submit: Adrienne Walker <enne@chromium.org>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-08-22 18:25:13 +00:00
Adrienne Walker
c02165fae1 Add unfold_short_circuit_as_ternary workaround
Bug: chromium: 307751,829614
Change-Id: I1fb347e5470eb2a498192f3fc467a6b744b53a79
Reviewed-on: https://skia-review.googlesource.com/147243
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Adrienne Walker <enne@chromium.org>
2018-08-22 16:54:26 +00:00
Greg Daniel
e6ab998bc2 Revert "added support for sk_Dimensions to SkSL"
This reverts commit 9335c28e40.

Reason for revert: breaking vulkan and maybe metal in gold

Original change's description:
> added support for sk_Dimensions to SkSL
> 
> Bug: skia:
> Change-Id: I5f6a9941822b7b4a3ad85b22b1bcd31d58320f90
> Reviewed-on: https://skia-review.googlesource.com/146640
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

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

Change-Id: I5e9dcfffd118ef125afb7b7792f16cb51dd779a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/148680
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-08-22 13:56:37 +00:00
Adrienne Walker
ee8295c050 Add add_and_true_to_loop_condition workaround
See https://bugs.chromium.org/p/chromium/issues/detail?id=644669#c4 for
what this is doing and trying to work around.

Bug: chromium: 644669, 829614
Change-Id: I5616eb6f7299c30e5bdf812e55099ac0a8fc9c1d
Reviewed-on: https://skia-review.googlesource.com/146856
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Adrienne Walker <enne@chromium.org>
2018-08-21 20:03:50 +00:00
Ethan Nicholas
9335c28e40 added support for sk_Dimensions to SkSL
Bug: skia:
Change-Id: I5f6a9941822b7b4a3ad85b22b1bcd31d58320f90
Reviewed-on: https://skia-review.googlesource.com/146640
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-08-21 17:17:16 +00:00
Chris Dalton
49d14e98fe sksl: Add a "sk_Clockwise" built-in
This allows us to identify clockwise-winding triangles, in terms of
Skia device space, in all backends and with all render target origins.

Bug: skia:
Change-Id: I220e1c459e0129d1cc4dee6458ef94277fbedd21
Reviewed-on: https://skia-review.googlesource.com/142662
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-07-27 19:04:46 +00:00
Brian Salomon
662ea4baba Remove texel buffer support.
Change-Id: Ia6f21afe714208979a5bc384e436b28ea2b9a297
Reviewed-on: https://skia-review.googlesource.com/141051
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-07-13 00:45:54 +00:00
Brian Osman
c7ad40f76f Remove SK_SUPPORT_GPU checks in tool-only code
Most of this is (obviously) not necessary to do, but once
I started, I figured I'd just get it all. Tools (nanobench,
DM, skiaserve), all GMs, benches, and unit tests, plus support
code (command line parsing and config stuff).

This is almost entirely mechanical.

Bug: skia:
Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb
Reviewed-on: https://skia-review.googlesource.com/131153
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-31 18:59:44 +00:00
Ethan Nicholas
b809efbbfa workaround for buggy macOS GLSL shader compiler
Bug: skia:
Change-Id: Ib77e11d80f93f76e65eac6119dbf2bd03523aaf9
Reviewed-on: https://skia-review.googlesource.com/117626
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-04-12 20:26:51 +00:00
Ethan Nicholas
c6a19f1d04 fix for frexp dataflow analysis
Bug: skia:
Change-Id: Ic20bedadfbf37fd78ce03872ece2d9552307cfcd
Reviewed-on: https://skia-review.googlesource.com/117243
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2018-04-01 21:29:08 +00:00
Chris Dalton
c2d0dd658b Add a shader cap for incomplete short int precision
Bug: skia:
Change-Id: Iac36eb763e687f6ecc3acbd4afced66f95596be2
Reviewed-on: https://skia-review.googlesource.com/109003
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-03-14 16:35:50 +00:00
Brian Osman
8a83ca4e9a Add "sharpen" option to SkSL, to LOD bias all textures
This adds a fixed bias (-0.5) to the computed LOD of all
mip-mapped texture fetches. (Technically, to all texture
fetches, but that only matters for mip-mapped ones).

Clients can opt-in with a new GrContextOption.

Bug: skia:7541
Bug: chromium:562162
Change-Id: Ie3cd0679c4ab66f62d2dc32e7e68e5c99355115e
Reviewed-on: https://skia-review.googlesource.com/106322
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-02-13 16:30:20 +00:00
Robert Phillips
fe8da17f53 Revert "Revert "converted vertex shaders to device coords""
This reverts commit 29b3434e48.

Reason for revert: The Chrome perf regression is suspect & the Nexus 5 is broken w/o this CL.

Original change's description:
> Revert "converted vertex shaders to device coords"
> 
> This reverts commit e7e81c15c1.
> 
> Reason for revert: Chrome perf regressions
> 
> Bug: skia:
> Change-Id: I17fadc97c4b8e80bfdccbf123554614a00c58473
> Reviewed-on: https://skia-review.googlesource.com/99040
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=csmartdalton@google.com,ethannicholas@google.com

Change-Id: Iff3c9fce65beeca16028ae59d4d08b1413b90530
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/99241
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-24 14:52:11 +00:00
Ethan Nicholas
29b3434e48 Revert "converted vertex shaders to device coords"
This reverts commit e7e81c15c1.

Reason for revert: Chrome perf regressions

Bug: skia:
Change-Id: I17fadc97c4b8e80bfdccbf123554614a00c58473
Reviewed-on: https://skia-review.googlesource.com/99040
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-01-23 22:23:30 +00:00
Brian Salomon
dba65f95e4 Add a workaround for inaccurate interpolants on Adreno 3xx.
Also ensure that sk_FragCoord x and y values are at pixel centers when
workaround is used.

Change-Id: Ib748af9e496a406a50622e00e96e1346cbb5eb26
Reviewed-on: https://skia-review.googlesource.com/97064
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-22 14:14:18 +00:00
Ethan Nicholas
a583b813b9 SkSL now supports ternary lvalues
Bug: skia:
Change-Id: I859b756fe016f80c7a94f812623a16b4865204ba
Reviewed-on: https://skia-review.googlesource.com/96680
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-01-18 19:10:58 +00:00
Ethan Nicholas
9d8abc5816 fixed type error in RTAdjust application
Bug: skia:
Change-Id: I94ba5853812659920bba781ae983fc9fbb647f9c
Reviewed-on: https://skia-review.googlesource.com/95082
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-01-17 17:46:02 +00:00