This will be utilized in followup CLs.
Change-Id: I591cff5b8942a5be57660a4bd161517880fbb8a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345157
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Also use GrColorTypes wherever possible.
As a consequence, some cases now go through GrSurfaceContext rather
than SkSurface (because it uses GrColorType and allows kUnpremul).
Both changes make it easier to add testing for GL_LUMINANCE8_ALPHA8,
which is required to update Flutter on iOS/GL to use new YUVA
texture image api.
Bug: skia:11019
Bug: skia:10632
Change-Id: I0e8bef4af5aeb7fe58cc11ec7923ebb5029ce18b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344560
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345132
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit 632a23afa4.
Reason for revert: breaking android roll
Original change's description:
> Rename getTopDevice/getDevice to topDevice/baseDevice
>
> This addresses nit from https://skia-review.googlesource.com/c/skia/+/344663
> and also moves topDevice() to be private, since it's not really meant
> for arbitrary subclasses to access anyways. Classes outside of SkCanvas
> that need topDevice/baseDevice are already friended anyways.
>
> Bug: skia:10987
> Change-Id: Ib0b0dffb5b1c35d5a0c78aeb8903e4cf0b8810a9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344960
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=mtklein@google.com,reed@google.com,michaelludwig@google.com
Change-Id: I9b70230f7db5d31cede2ea03e7abc7c154021204
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10987
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345158
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Adds support in GrVkRenderPass and GrVkRenderTarget for making and
managing discardable msaa attachments.
Bug: skia:10979
Change-Id: Ib5005a694f2c54d7b132c3d3767f648b9c9f747f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341379
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This fixes an issue where for loops with no test created invalid code,
and improves tracking and adds asserts to keep us honest in the future.
Change-Id: Ie2212b237948bf245ca4a2918bc6b018540646c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345128
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This is a new base class for GrSurfaceDrawContext. It allows any
alpha-type but is restricted to non-blending fills of irects using FPs,
clears,and discards.
Bug: skia:11019
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341680
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I696df3617719fcd8303faa73fb44b32b3fb4f71c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344896
Previously, multiple inliner passes in a row would each apply a
separate name mangling to variable names, so names like "_25_14_3_1_pos"
were not uncommon. This change demangles the name before re-mangling it,
so we would have just "_25_pos" instead.
It's not important, but it makes things easier to read.
Change-Id: I1257222dac2a68e337f431af230ce50730cedc9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345116
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This addresses nit from https://skia-review.googlesource.com/c/skia/+/344663
and also moves topDevice() to be private, since it's not really meant
for arbitrary subclasses to access anyways. Classes outside of SkCanvas
that need topDevice/baseDevice are already friended anyways.
Bug: skia:10987
Change-Id: Ib0b0dffb5b1c35d5a0c78aeb8903e4cf0b8810a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344960
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This reverts commit e8e4aca955.
Reason for revert: can break ES2 for-loop rules
Original change's description:
> Declare all inlined variables at the topmost scope possible.
>
> By itself, this is uninteresting and even perhaps slightly
> counterproductive (as it separates vardecl from its initializer,
> increasing LOC). However, this enables a followup CL
> (http://review.skia.org/344665) which allows single-return functions to
> be inlined without the creation of a temporary variable at all. This
> applies to the majority of fragment processors in a typical Ganesh
> hierarchy. This change will greatly reduce the number of inliner-created
> temporary copies when compiling a typical tree of FPs.
>
> Change-Id: I03423a13cf35050637dabace4a32973a08a4ed0a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344764
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: Ica01d6906bcb9cef1f49d22dda714fc9cbfa3885
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345121
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This reverts commit 345d72124d.
Reason for revert: can break ES2 for-loop rules
Original change's description:
> Eliminate inliner temporary variables for functions with a single exit.
>
> When we determine that a function only contains a single return
> statement, there is no need to create a temporary variable and store the
> result expression into a variable. Instead, we can directly replace the
> function-call expression with the return-statement's expression.
>
> This dramatically simplifies the final optimized output from chains of
> very simple inlined functions, which is a very common pattern for trees
> of Skia fragment processors.
>
> Change-Id: I6789064a321daf43db2e1cef4915f25ed74d6131
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344665
> 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: I60845f22159605a06047b030e2686a769121a35a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345120
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This reverts commit 67d2d73d06.
Reason for revert: Triggers errors in some shaders.
Original change's description:
> Fix incorrect 'unreachable code' error in SkSL
>
> This trades one error for another (a potential for incorrect use of
> unassigned variables). False-positives for unassigned variables are
> straightforward to workaround (and produce code that still looks
> reasonable). Working around unreachable code errors is tricky, and
> likely to produce non-idiomatic code. This change also makes the data
> flow analysis of all loop constructs more similar - for loops were
> behaving very differently from while loops.
>
> Note that this effectively a revert of:
> https://skia-review.googlesource.com/c/skia/+/18121/
>
> Change-Id: Ib85d90b22cac8addfb106459c0a5f5616a89c3eb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344957
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I84b93cc7f9309446dcc0e949e90908df31a1ff9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345119
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
I don't think our version actually has any issues since we added the else
to 0 out r2,g2, and b2. But this just updates it to look more like other
updates to etc1 outside skia.
Bug: chromium:1153993
Change-Id: I78e0b7cdd00fc9f03a2857f3d1b3502a1131a0f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344956
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Errors will be reported like this:
"""""""""
Running presubmit upload checks ...
** Presubmit ERRORS **
Git conflict markers found in whitespace.txt:14 <<<<<<< HEAD
Git conflict markers found in whitespace.txt:16 =======
Git conflict markers found in whitespace.txt:18 >>>>>>> 75a85179504e59df7b3abbc09113f24f2233001b
"""""""""
Bug: skia:11098
Change-Id: I24f90ec545b797f1d782a1733b8273ce176b1012
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345037
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Refactoring calls to explicitly build layout group entries, so that
changes to the struct do no break the build.
An example of the types of failures being seen,
https://skia-review.googlesource.com/c/skia/+/344795
Change-Id: Iadd091e399580a743bb9cd5ab65fada84eadaf9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344959
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Stephen White <senorblanco@google.com>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@google.com>
When we determine that a function only contains a single return
statement, there is no need to create a temporary variable and store the
result expression into a variable. Instead, we can directly replace the
function-call expression with the return-statement's expression.
This dramatically simplifies the final optimized output from chains of
very simple inlined functions, which is a very common pattern for trees
of Skia fragment processors.
Change-Id: I6789064a321daf43db2e1cef4915f25ed74d6131
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344665
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
By itself, this is uninteresting and even perhaps slightly
counterproductive (as it separates vardecl from its initializer,
increasing LOC). However, this enables a followup CL
(http://review.skia.org/344665) which allows single-return functions to
be inlined without the creation of a temporary variable at all. This
applies to the majority of fragment processors in a typical Ganesh
hierarchy. This change will greatly reduce the number of inliner-created
temporary copies when compiling a typical tree of FPs.
Change-Id: I03423a13cf35050637dabace4a32973a08a4ed0a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344764
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Adds a new kDirectionLight_ShadowFlag which indicates that lightPosition
is a vector pointing towards the light, and lightRadius is the blur
radius when the occluder is at z == 1. For other values of z it will
scale linearly. The direction is specified in device space.
Bug: skia:10781
Change-Id: I14d530f006e5541ed6e22bfbeb29c7441c21fb8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321792
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This trades one error for another (a potential for incorrect use of
unassigned variables). False-positives for unassigned variables are
straightforward to workaround (and produce code that still looks
reasonable). Working around unreachable code errors is tricky, and
likely to produce non-idiomatic code. This change also makes the data
flow analysis of all loop constructs more similar - for loops were
behaving very differently from while loops.
Note that this effectively a revert of:
https://skia-review.googlesource.com/c/skia/+/18121/
Change-Id: Ib85d90b22cac8addfb106459c0a5f5616a89c3eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344957
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Id154c3d0b51987d5154e9bcf000e3d4d539a7cdb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344916
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit fcd68167a2.
Reason for revert: going to do this a different way
Original change's description:
> Fix crash on windows viewer when starting in vulkan.
>
> setRequestedDisplayParams is called when setting up viewer before we've
> inited the Window. On windows this tries to attach the Window for a given
> backend. However, we haven't set fBackend yet. Later on we will directly
> call attach.
>
> Change-Id: I4bd6586478f2b040e5913314c4e47e92fc893a60
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344756
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,brianosman@google.com
Change-Id: Ie4d33b557868e4906df9b7a3988072fdc79a19c7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344897
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
setRequestedDisplayParams is called when setting up viewer before we've
inited the Window. On windows this tries to attach the Window for a given
backend. However, we haven't set fBackend yet. Later on we will directly
call attach.
Change-Id: I4bd6586478f2b040e5913314c4e47e92fc893a60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344756
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This is a reland of ad8b9fa2d7
Original change's description:
> Disable HW tessellation shaders by default
>
> The GLSL backdoor for tessellation shaders is only experimental at
> this point. In order to enable the tessellation path renderer, we need
> to turn off HW tessellation and let it use the indirect draw modes.
>
> Bug: skia:10419
> Change-Id: Ic979978a331c7ad016907cf42b2562b35caab8ab
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344336
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com
Bug: skia:10419
Change-Id: I0bdf34da134a3a34a5c78b35cc0eb86d6e989bb4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344796
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
cb8903b143..328f72ae21
2020-12-16 jmadill@chromium.org Update VVL directories in Android build.
2020-12-16 m.maiya@samsung.com Vulkan: Accumulate internal cache stats in renderer
2020-12-15 timvp@google.com Vulkan: Ignore glFlush to reduce vkQueueSubmits in Asphalt 9
2020-12-15 paulthomson@google.com Tests: update WhatsApp trace
2020-12-15 cclao@google.com Vulkan: Reduce driver uniform data to minimum if specConst is used
2020-12-15 m.maiya@samsung.com Add EXT_clip_cull_distance extension autogen code
2020-12-15 m.maiya@samsung.com Vulkan: Add support for internal cache hit and miss counts
2020-12-15 m.maiya@samsung.com Add EXT_shader_framebuffer_fetch_non_coherent entry points
2020-12-15 m.maiya@samsung.com Vulkan: Add the tests for EXT_clip_cull_distance
2020-12-15 timvp@google.com Vulkan: flushCommandsAndEndRenderPass during glFenceSync()
2020-12-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from c16dc7107fd3 to fa44979d90aa (5 revisions)
2020-12-15 paulthomson@google.com Capture: Disable GL_NV_shader_noperspective_interpolation
2020-12-15 jmadill@chromium.org Mac: Remove stderr output from lib preload.
2020-12-15 jmadill@chromium.org Introduce GN variables for Vulkan repos.
2020-12-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 0c234289aa72 to 5a03bdd6e398 (963 revisions)
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 tdenniston@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-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
Tbr: tdenniston@google.com
Test: Test: Manual verification with angle_end2end_testsTest: Test: angle_perftests --gtest_filter="*whatsapp*"
Change-Id: I790af092ec42af17d35c33153ba4f33da234062b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344816
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Also use GrColorTypes wherever possible.
As a consequence, some cases now go through GrSurfaceContext rather
than SkSurface (because it uses GrColorType and allows kUnpremul).
Both changes make it easier to add testing for GL_LUMINANCE8_ALPHA8,
which is required to update Flutter on iOS/GL to use new YUVA
texture image api.
Bug: skia:11019
Bug: skia:10632
Change-Id: I941d6272ca460f5b0355d11a90ac9edbc3233a2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344560
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
* Fix visitProxies when using DDL
* Handle when the GrClip is nullptr
* Use the same cropping/hw disable logic for onStencilClip as we do
for onDrawClip.
Bug: skia:10419
Change-Id: I2ebd2b12ac9cc77cece6d3fbf6c16e246bafe544
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344479
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This would require careful handling of the stencil that we have not
yet thought through.
Bug: skia:10419
Change-Id: I78a652309ae3469b64a28d6d96b06384e608695e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344376
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Allowing this in runtime effects lets people break our contracts around
SkShaders on the color side of the paint altering coverage, etc.
Bug: skia:11085
Change-Id: I1ec8e71581c8d50f681cb0ca6ca8416375b3f43f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344760
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The additional scopes were harmless, but didn't really add any value.
Originally they were used to tightly scope inlined variables, but we now
mangle inlined variable names.
Change-Id: I7b35e737598036c0b6d3d9f71cbcd4a53d609ce9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344757
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This CL is mostly just moving code into shared functions and moving the
renderpass granularity adjustments into GrVkOpsRenderPass. Future
changes for resolve loading will take more use of these new shared
functions.
Bug: skia:10979
Change-Id: I19928b403ac7a71be0a9588bce81db40496d3bb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344662
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This reverts commit ad8b9fa2d7.
Reason for revert: Benchmark failure
Original change's description:
> Disable HW tessellation shaders by default
>
> The GLSL backdoor for tessellation shaders is only experimental at
> this point. In order to enable the tessellation path renderer, we need
> to turn off HW tessellation and let it use the indirect draw modes.
>
> Bug: skia:10419
> Change-Id: Ic979978a331c7ad016907cf42b2562b35caab8ab
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344336
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com
Change-Id: Ia74dbcec582168870bd3ccc5e52b8dce0fb2bdfc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10419
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344698
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Bug: skia:10987
Change-Id: Ic1bb363e82cc09e280be5cfe0a46748e11ebb69c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344663
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Key design points...
A) Take care to not commit too much to Half's range or precision.
In particular, don't offer operations whose result might not
be representable in Half. E.g., shy away from Half divide,
not just because we might not be able to do a native divide,
but even more so because division produces results that might
not fit in Half, ±inf or NaN.
B) No native Half loads, stores, uniforms or splats,
instead converting from I32 or F32. This keeps the entire
front-end (user code, Builder, etc.) specified in terms of precise
format and oblivious to the various backends' representations of
Half. Native Half splats would be less trouble than uniforms I
think, and uniforms less trouble than loads and stores, but still
enough a pain that we're better of deferring any of that for now.
(Explicit fp16 uniforms do make sense to me though.)
C) Keep the current F32-based Color and all the effect virtuals
that use it around, introducing parallel Half-based HalfColors
and entry points for those. The key cool idea here is to have
the default entry points for F32/Color and Half/HalfColor call
each other, so that any given effect can implement one, the other,
or both and always be compatble with however it's called.
This is mostly about incremental rollout, but I suspect we'll
have areas that stick to F32 forever. (Think the IEEE 754 32-bit
float specific bit hacks we used for approx_log/approx_exp.)
D) (not done yet) allow implicit Half->F32 conversion, but not
the other way around of course. This makes it easier to lean
on the body of F32 routines we already have, and again mostly
helps enable incremental rollout.
Change-Id: I8bb38efbe476ff89dd2591411e115c2ab3757854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341800
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This is a new base class for GrSurfaceDrawContext. It allows any
alpha-type but is restricted to non-blending fills of irects using FPs,
clears,and discards.
Bug: skia:11019
Change-Id: I229ce5f452e66796e2fa5c0e7a6ddccbf23bef5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341680
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
The GLSL backdoor for tessellation shaders is only experimental at
this point. In order to enable the tessellation path renderer, we need
to turn off HW tessellation and let it use the indirect draw modes.
Bug: skia:10419
Change-Id: Ic979978a331c7ad016907cf42b2562b35caab8ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344336
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: chromium:1156804
Change-Id: I95af34415f334bfc3c7ccef48a2110aa499b427c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344557
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
All fragment processors now use explicit returns; sk_OutColor no longer
exists at all.
Change-Id: Ic5cf566a916c1d616edcc56ba84b6780776f8515
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344300
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>
Bug: skia:10419
Change-Id: I63f000e7b3c5623c1e40c3ce6950c8f5565bc11c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343477
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This mostly undoes commit 2777cd37 "Have SkWuffsCodec use two Wuffs
decoders", also known as
https://skia-review.googlesource.com/c/skia/+/250937
Using two Wuffs decoders is more complicated, but was necessary to allow
getFrameCount() to update when part-way through an incremental decode
while more data comes in. Updating that count matches an existing
Chromium test (TestResumePartialDecodeAfterClearFrameBufferCache).
On further discussion (crbug.com/1132828), that behavior is unnecessary
(and that Chromium test will be removed), so having Skia use two Wuffs
decoders is unnecessary complexity.
Removing the now-redundant WhichDecoder enum (an enum with only one
possible value), a mechanical change, will be a follow-up commit.
Bug: chromium:1132828
Bug: skia:8235
Change-Id: I892e4790c7265597be1eee10e6364e76b6402cb5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342836
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
This was completely unreferenced, as it should be.
Change-Id: I9ec99aa8f70e42618b3abc918a13dbb6e4fa1b1b
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344657
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: I41a5aea7b01efe8901498621197b9a5ff0f4fe5f
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344656
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>