History log of /external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
559f556d9d70ef9d1202e436a56d48364b279ac6 15-Nov-2017 Brian Salomon <bsalomon@google.com> Remove support for image load/store

This isn't used and has become a maintenance burden.

Change-Id: I5f3af8f91e5c4f073fe4ea30e0a7f1f61efeea47
Reviewed-on: https://skia-review.googlesource.com/70640
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
f06ead925c631c42fae734de1e7c72237a2e91f4 30-Oct-2017 Brian Osman <brianosman@google.com> Add support for transfer functions to GrColorSpaceXform

With this change, untagged sources (eg N32) are treated as
sRGB data, which causes a huge number of GMs to render more
correctly in GPU sRGB/F16/etc... configs. Also, because the
sources are treated as having a color space, we actually do
gamut conversion for wide or narrow gamut outputs.

This change also applies the transfer function math to
individual colors in the case of gradient stops and color
shaders. (The CPU backend doesn't do this yet, but I think
we've decided there's no reason not to support it).

Bug: skia:
Change-Id: If76e9e4a268f9f74110ff4bbe4fe189ba5d19d9f
Reviewed-on: https://skia-review.googlesource.com/64100
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
f7b8820dc813d1eb0b6b43fe4581dded0da38caf 18-Sep-2017 Ethan Nicholas <ethannicholas@google.com> re-land of new SkSL precisions

Bug: skia:
Change-Id: Ic1deb3db2cbda6ca45f93dee99832971a36a2119
Reviewed-on: https://skia-review.googlesource.com/47841
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
27185a9b9756d2f5fcc077c6c2c005259d4ba517 18-Sep-2017 Ethan Nicholas <ethannicholas@google.com> Revert "Revert "Revert "Switched highp float to highfloat and mediump float to half."""

This reverts commit 05d5a13fea6246648de7e41358ed338d53c85ea2.

Reason for revert: looks like it broke filterfastbounds

Original change's description:
> Revert "Revert "Switched highp float to highfloat and mediump float to half.""
>
> This reverts commit 1d816b92bb7cf2258007f3f74ffd143b89f25d01.
>
> Bug: skia:
> Change-Id: I388b5e5e9bf619db48297a80c9a80c039f26c9f1
> Reviewed-on: https://skia-review.googlesource.com/46464
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

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

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

Bug: skia:
Change-Id: Iddf6aef2ab084aa73da7ceebdfc303a1d2b80cde
Reviewed-on: https://skia-review.googlesource.com/47441
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
05d5a13fea6246648de7e41358ed338d53c85ea2 15-Sep-2017 Ethan Nicholas <ethannicholas@google.com> Revert "Revert "Switched highp float to highfloat and mediump float to half.""

This reverts commit 1d816b92bb7cf2258007f3f74ffd143b89f25d01.

Bug: skia:
Change-Id: I388b5e5e9bf619db48297a80c9a80c039f26c9f1
Reviewed-on: https://skia-review.googlesource.com/46464
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
8296e752fa1803dcb8cf97d6ab10bb4f5f5f51f0 25-Aug-2017 Robert Phillips <robertphillips@google.com> Switch atlas clients over to using absolute texture coordinates (take 2)

This is a prerequisite for being able to resize the atlas with impunity.

Change-Id: Iccc9c7ced43f38a7d8483a7bd12a458d59a3453a
Reviewed-on: https://skia-review.googlesource.com/38362
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
1d816b92bb7cf2258007f3f74ffd143b89f25d01 17-Aug-2017 Brian Salomon <bsalomon@google.com> Revert "Switched highp float to highfloat and mediump float to half."

This reverts commit 88d99c63878c2d3d340120f0321676f72afcb4f0.

Reason for revert: Believed to be causing unit test failures in Chrome roll:

https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/364433
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Ftryserver.chromium.android%2Flinux_android_rel_ng%2F364433%2F%2B%2Frecipes%2Fsteps%2Fcontent_browsertests__with_patch__on_Android%2F0%2Flogs%2FWebRtcCaptureFromElementBrowserTest.VerifyCanvasWebGLCaptureColor%2F0

Original change's description:
> Switched highp float to highfloat and mediump float to half.
>
> The ultimate goal is to end up with "float" and "half", but this
> intermediate step uses "highfloat" so that it is clear if I missed a
> "float" somewhere. Once this lands, a subsequent CL will switch all
> "highfloats" back to "floats".
>
> Bug: skia:
> Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca
> Reviewed-on: https://skia-review.googlesource.com/31000
> 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: I8bfa97547ac3920d433665f161d27df3f15c83aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/35705
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
88d99c63878c2d3d340120f0321676f72afcb4f0 16-Aug-2017 Ethan Nicholas <ethannicholas@google.com> Switched highp float to highfloat and mediump float to half.

The ultimate goal is to end up with "float" and "half", but this
intermediate step uses "highfloat" so that it is clear if I missed a
"float" somewhere. Once this lands, a subsequent CL will switch all
"highfloats" back to "floats".

Bug: skia:
Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca
Reviewed-on: https://skia-review.googlesource.com/31000
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
5af9ea399d5e0344cc4b7da4e97b5dc5b3c74f64 28-Jul-2017 Ethan Nicholas <ethannicholas@google.com> renamed SkSL types in preparation for killing precision modifiers

Bug: skia:
Change-Id: Iff0289e25355a89cdc289a0892ed755dd1b1c900
Reviewed-on: https://skia-review.googlesource.com/27703
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
2983f4022d756def4f93579ee519cd31c8f24d61 08-May-2017 Ethan Nicholas <ethannicholas@google.com> Re-land of "eliminated GrGLSLExpr".


This change is exactly the same as the last time it was landed; I believe the
underlying optimizer bug that was causing this to cause problems has been
fixed by a prior CL.
Bug: skia:
Change-Id: I5436422f094ea758caa3cd69e9338db31b1f93fa
Reviewed-on: https://skia-review.googlesource.com/15768
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
bc5d4d769098a4fb46685c0e59034dc8e12318a2 05-May-2017 Greg Daniel <egdaniel@google.com> Split tracking of TexelBuffers from normal samplers

This is precursor CL to add support for texel buffers in Vulkan.

This change as includes fixes to the ordering of assigning
locations and texture units so that they match in
GrGLProgramDataManager and GrGLProgram.

Bug: skia:
Change-Id: I30c9578fb7dcb187256f744e07651e8564f93a6b
Reviewed-on: https://skia-review.googlesource.com/15225
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
421fe443f833c916e6c3616f92570c8920b030f9 04-May-2017 Ethan Nicholas <ethannicholas@google.com> Revert "Revert "Revert "eliminated GrGLSLExpr"""

This reverts commit 796001c82eca5651bc6a221204f6186918781daf.

Reason for revert: looks to be causing problems in Chrome (https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Linux_Trusty__dbg_/1553/layout-test-results/results.html)

Original change's description:
> Revert "Revert "eliminated GrGLSLExpr""
>
> This reverts commit 5e550ab57e0204bfadd2cb69c47d2a85e38d6a4c.
>
> Bug: skia:
> Change-Id: I4705e47dbd209aa8f43db3d28c856bd3aa9e49ab
> Reviewed-on: https://skia-review.googlesource.com/15187
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
>

TBR=ethannicholas@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I6455a4f16b2dc0d6d1265541f7117e0cfb8dd91c
Reviewed-on: https://skia-review.googlesource.com/15309
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
796001c82eca5651bc6a221204f6186918781daf 03-May-2017 Ethan Nicholas <ethannicholas@google.com> Revert "Revert "eliminated GrGLSLExpr""

This reverts commit 5e550ab57e0204bfadd2cb69c47d2a85e38d6a4c.

Bug: skia:
Change-Id: I4705e47dbd209aa8f43db3d28c856bd3aa9e49ab
Reviewed-on: https://skia-review.googlesource.com/15187
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
5e550ab57e0204bfadd2cb69c47d2a85e38d6a4c 02-May-2017 Brian Salomon <bsalomon@google.com> Revert "eliminated GrGLSLExpr"

This reverts commit 93f20f5629e52eed732d2b9d6dbbb351cc30b2cd.

Reason for revert: Mismerge readded deleted files.

Original change's description:
> eliminated GrGLSLExpr
>
> Now that skslc performs all of the optimizations (and then some) that
> GrGLSLExpr is responsible for, it's just extra work for no benefit.
>
> Bug: skia:
> Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a
> Reviewed-on: https://skia-review.googlesource.com/14560
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

TBR=bsalomon@google.com,ethannicholas@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ia8b723594527afe34489fc78a4b49039081b6390
Reviewed-on: https://skia-review.googlesource.com/15154
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
93f20f5629e52eed732d2b9d6dbbb351cc30b2cd 02-May-2017 Ethan Nicholas <ethannicholas@google.com> eliminated GrGLSLExpr

Now that skslc performs all of the optimizations (and then some) that
GrGLSLExpr is responsible for, it's just extra work for no benefit.

Bug: skia:
Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a
Reviewed-on: https://skia-review.googlesource.com/14560
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
5338f99a8a75d0e7622a37c5d1c05fcce49f55f5 19-Apr-2017 Ethan Nicholas <ethannicholas@google.com> rectangle texture scaling is now handled in skslc

Bug: skia:
Change-Id: I658a95576143d69656cd63aec44ff65d430d332f
Reviewed-on: https://skia-review.googlesource.com/13813
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
c624d9d212c4168fc6c202a8535ddff8a3bfb16a 08-Mar-2017 Brian Osman <brianosman@google.com> Refactor GrColorSpaceXformHelper

Nonlinear blending mode is going to (sometimes) require additional
uniforms and shader code for color space transformation.

This change just alters the usage of the helper struct so that we can
hide any new logic (without having to change all the FPs that use it).

BUG=skia:

Change-Id: I913478a387973f5bad5aa09a29f85d21daacab94
Reviewed-on: https://skia-review.googlesource.com/9414
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
75864b09e11a1918f202093d042f23ca0b3c8530 09-Feb-2017 csmartdalton <csmartdalton@google.com> Add GrGLSLShaderBuilder::declareGlobal

BUG=skia:

Change-Id: I75eeb7cbd1bf157c463e5e80b4560a953b7883e8
Reviewed-on: https://skia-review.googlesource.com/8245
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
0bd783f951a004ccca175b166f2b30a0fd18a6f6 04-Jan-2017 Brian Osman <brianosman@google.com> Clamp premul colors correctly after a gamut change

Textures that we sample on the GPU are always premul, so we should
actually clamp to alpha.

Colors that are xformed on the CPU are always unpremul, so clamping to
[0,1] is correct. Add a comment explaining that.

BUG=skia:

Change-Id: I180f2d410f24afc78bd03ab8636a83fb443d68e2
Reviewed-on: https://skia-review.googlesource.com/6581
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
94efbf51f5a88d9e8aa961d3fbe38c5e335d6108 29-Nov-2016 Brian Salomon <bsalomon@google.com> Merge GrGLSLCaps into GrShaderCaps

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5121

Change-Id: If8d13638f80f42161cbc766a2666c5789e5772c8
Reviewed-on: https://skia-review.googlesource.com/5121
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
f9f451213a3951d8a61568998de2ddbd643f6693 29-Nov-2016 Brian Salomon <bsalomon@google.com> Reland image storage with fixes.

Revert "Revert "Initial OpenGL Image support.""

This reverts commit 59dc41175d99d0a31c046aec0c26c4d82a3a3574.

BUG=skia:

Change-Id: Ibe3c87ce7f746f065fdbcc5a518388cc291112f5
Reviewed-on: https://skia-review.googlesource.com/5131
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
2b3dab62bccdbf6244aef9103e9e739147af8616 28-Nov-2016 Ethan Nicholas <ethannicholas@google.com> removed textureProj() and legacy texture functions from sksl

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5120

Change-Id: I21b111d54becaca845134376e54a5a7c0a6cd6c8
Reviewed-on: https://skia-review.googlesource.com/5120
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
59dc41175d99d0a31c046aec0c26c4d82a3a3574 23-Nov-2016 Brian Salomon <bsalomon@google.com> Revert "Initial OpenGL Image support."

This reverts commit be34882042048db096baca32ddf4a8b472529804.

Reason for revert: Test failures and shader compilation issues on Android.

Original change's description:
> Initial OpenGL Image support.
>
> This change along with recently landed changes is enough to make the new unit test work and not much else. imageLoad is support but not stores or any other image functions (atomics). Barriers in the shading language or the GL API are not yet hooked up.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4182
>
> Change-Id: I5958b7c89e40ae5ee05f7bbaca3b3738162fe5ce
> Reviewed-on: https://skia-review.googlesource.com/4182
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>

TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I29a2502c296ae39ed9a999957800414ae46e6f0f
Reviewed-on: https://skia-review.googlesource.com/5129
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
be34882042048db096baca32ddf4a8b472529804 22-Nov-2016 Brian Salomon <bsalomon@google.com> Initial OpenGL Image support.

This change along with recently landed changes is enough to make the new unit test work and not much else. imageLoad is support but not stores or any other image functions (atomics). Barriers in the shading language or the GL API are not yet hooked up.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4182

Change-Id: I5958b7c89e40ae5ee05f7bbaca3b3738162fe5ce
Reviewed-on: https://skia-review.googlesource.com/4182
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
1fc83b131afa7c29e971dd3ccc7906006bde6c09 22-Nov-2016 Ethan Nicholas <ethannicholas@google.com> removed appendPrecisionModifier

skslc always provides support for precision modifiers (ignoring them if
unsupported on the target platform), so the Skia appendPrecisionModifier
function was redundant.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5117

Change-Id: I4bcbd47ef8d1f4f1b055086d4c9050254584b48c
Reviewed-on: https://skia-review.googlesource.com/5117
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
276cc4113a6440b842c0dacb6d668ee3b45a3b7d 21-Nov-2016 csmartdalton <csmartdalton@google.com> Revive geometry shaders

Fixes the bit rot that has set in for geometry shaders. They're to a
point now that we can use them again for GL experiments. Since SkSL
does not support geometry shaders yet, we pass the shader string
directly to the GL compiler for now.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5080

Change-Id: Ie3864e5559c810c682cf5f1709bdab87f033c43b
Reviewed-on: https://skia-review.googlesource.com/5080
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
99938a8ef24e2dd5b39f78638742e9b50ab6d9bf 21-Nov-2016 Brian Salomon <bsalomon@google.com> Merge GrGLSLShaderVar and GrShaderVar

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5087

Change-Id: Ib8943a1da1ea495554feaf5b0992b94fbb9539ab
Reviewed-on: https://skia-review.googlesource.com/5087
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
101b844d6ba031de5c4e95b43f9292f266799237 18-Nov-2016 Brian Salomon <bsalomon@google.com> Remove GrGLSLSampler type and subclasses

GrGLSLUniformManager and GrGLSLProgramDataManager subclasses handle sampler variation across GPU backends.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5002

Change-Id: I968b006bab978c2fa209d1f7eda710c298d1212f
Reviewed-on: https://skia-review.googlesource.com/5002
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
5192475bd8cb98e8e0c1192ab5ece7b8595701d6 12-Sep-2016 brianosman <brianosman@google.com> Two changes:

1. Remove special premul handling from gamut xform code

Alpha is a constant, so the gamut transformation results remain unchanged
(it distributes across the linear matrix multiply).

2. Use SkMatrix44 rather than array of floats

Preserves semantic intention, and makes upcoming code (where we transform
colors on the CPU by that matrix) simpler.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2329553002

Review-Url: https://codereview.chromium.org/2329553002
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
8d914908d8ad37a73c39ba8f7ef298bfee457388 09-Sep-2016 brianosman <brianosman@google.com> Fix color gamut xform matrices in GPU code

Now that we're not storing them transposed, we can plumb them to the
shader column-major all the way, and then multiply colors on the right, as
it should be.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2326093002

Review-Url: https://codereview.chromium.org/2326093002
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
77320dbabcddf05c0a1489eaf1f496729dc8de0e 07-Sep-2016 brianosman <brianosman@google.com> Add color gamut xform helpers to GrGLSLShaderBuilder

New helper functions inject the necessary shader
function. Texture lookup functions can now insert
the gamut xform at the appropriate place, too.

As written, could be used to transform non-texture
colors (e.g. vertex colors) as well.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2180803005

Review-Url: https://codereview.chromium.org/2180803005
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
990dbc88796f656418bcc4c196df30ed9bef6345 13-Jul-2016 egdaniel <egdaniel@google.com> Add Texture2D and Sampler GrSLTypes

These two new types are in support of Vulkan and the ability to send
separate texture and sampler uniforms to the shader. They don't really fit
well in the current system, since the current system ties together to idea
of intended use and how to emit shader code into the same GrSLType enum.

In vulkan, I want the GrGLSLSampler object to be used as a Sampler2D, but
when appending its declaration it will emit a Texture2D and sampler object.

Our query for GrSLTypeIsSamplerType refers more to the combination of texture
and sampler and not just the sampler part. The GrSLTypeIs2DTextureType query
is for is a a SamplerType that uses Texture2Ds. My new types don't really fit
into either these categories as they are just half of the whole.

In some refactoring down the road (possibly connected with SkSL), I suggest we
split apart the concept of how we intend to use a GrGLSLSampler (Sampler2D, SamplerBuffer,
etc.), from how we actually add it to the code (sampler, texture2D, sampler2D, etc.).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143143002

Review-Url: https://codereview.chromium.org/2143143002
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
09aa1fce69b214714171db12c341aebd78dd29ea 20-Apr-2016 egdaniel <egdaniel@google.com> Refactor how we store and use samplers in Ganesh

The main goal of this refactorization is to allow Vulkan to use separate
sampler and texture objects in the shader and descriptor sets and combine
them into a sampler2d in the shader where needed.

A large part of this is separating how we store samplers and uniforms in the
UniformHandler. We no longer need to store handles to samplers besides when
we are initially emitting code. After we emit code all we ever do is loop over
all samplers and do some processor independent work on them, so we have no need
for direct access to individual samplers.

In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
touch them again, so no need to save sampler info there. The texture access on
program reuse just assume that they come in the same order as we set the texture
units for the samplers

For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
then when we get new textures, we just assume they come in in the same order as we
set the samplers on the descriptor sets. Thus no need to save direct vulkan info.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885863004

Committed: https://skia.googlesource.com/skia/+/45b61a1c4c0be896e7b12fd1405abfece799114f

Review URL: https://codereview.chromium.org/1885863004
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
b800248c73c75b02ab808c5bdb53e19e6abc3adc 20-Apr-2016 egdaniel <egdaniel@google.com> Revert of Refactor how we store and use samplers in Ganesh (patchset #7 id:120001 of https://codereview.chromium.org/1885863004/ )

Reason for revert:
breaking bots

Original issue's description:
> Refactor how we store and use samplers in Ganesh
>
> The main goal of this refactorization is to allow Vulkan to use separate
> sampler and texture objects in the shader and descriptor sets and combine
> them into a sampler2d in the shader where needed.
>
> A large part of this is separating how we store samplers and uniforms in the
> UniformHandler. We no longer need to store handles to samplers besides when
> we are initially emitting code. After we emit code all we ever do is loop over
> all samplers and do some processor independent work on them, so we have no need
> for direct access to individual samplers.
>
> In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
> touch them again, so no need to save sampler info there. The texture access on
> program reuse just assume that they come in the same order as we set the texture
> units for the samplers
>
> For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
> then when we get new textures, we just assume they come in in the same order as we
> set the samplers on the descriptor sets. Thus no need to save direct vulkan info.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885863004
>
> Committed: https://skia.googlesource.com/skia/+/45b61a1c4c0be896e7b12fd1405abfece799114f

TBR=bsalomon@google.com,jvanverth@google.com,cdalton@nvidia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1896013003
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
45b61a1c4c0be896e7b12fd1405abfece799114f 19-Apr-2016 egdaniel <egdaniel@google.com> Refactor how we store and use samplers in Ganesh

The main goal of this refactorization is to allow Vulkan to use separate
sampler and texture objects in the shader and descriptor sets and combine
them into a sampler2d in the shader where needed.

A large part of this is separating how we store samplers and uniforms in the
UniformHandler. We no longer need to store handles to samplers besides when
we are initially emitting code. After we emit code all we ever do is loop over
all samplers and do some processor independent work on them, so we have no need
for direct access to individual samplers.

In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
touch them again, so no need to save sampler info there. The texture access on
program reuse just assume that they come in the same order as we set the texture
units for the samplers

For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
then when we get new textures, we just assume they come in in the same order as we
set the samplers on the descriptor sets. Thus no need to save direct vulkan info.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885863004

Review URL: https://codereview.chromium.org/1885863004
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
f8a6ce8d8c54cab5456d3099fa07e460c889c2e6 11-Apr-2016 cdalton <cdalton@nvidia.com> Add GLSL support for texelFetch

Adds a cap and builder methods for texelFetch. This is required for
texel buffers. Also moves the texel buffer cap into the general shader
caps, and adds glTexBufferRange to the GL interface.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1869063005

Review URL: https://codereview.chromium.org/1869063005
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
3f6f76f98b6b37d17d1492791ff0feb1b7586bd6 11-Apr-2016 cdalton <cdalton@nvidia.com> Rename EmitArgs::fSamplers to fTexSamplers

Renames fSamplers to fTexSamplers in GrProcessor EmitArgs, and renames
GrGLSLTextureSampler to GrGLSLSampler. This will allow us to add a
second array of buffer samplers.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1862373003

Review URL: https://codereview.chromium.org/1862373003
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
1f50acff0dc09e50cc207846508d8e6459334b2a 11-Apr-2016 cdalton <cdalton@nvidia.com> Add appendPrecisionModifier method to GrGLSLShaderBuilder

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1881513002

Review URL: https://codereview.chromium.org/1881513002
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
9d524f22bfde5dc3dc8f48e1be39bdebd3bb0304 29-Mar-2016 halcanary <halcanary@google.com> Style bikeshed - remove extraneous whitespace

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002

Review URL: https://codereview.chromium.org/1842753002
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
33ad701bc30387127c427fb1e38c781d5de33491 22-Feb-2016 cdalton <cdalton@nvidia.com> Add gl_SampleMask functionality to fragment builders

Adds methods for overriding and masking a fragment's sample mask.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1690963003

Committed: https://skia.googlesource.com/skia/+/533cefe5b9c7cec2592fc7ca00ee4cf69a26c094

Review URL: https://codereview.chromium.org/1690963003
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
1751dc74f95a409fdb8cdc5c4efae20b1c39509a 13-Feb-2016 benjaminwagner <benjaminwagner@google.com> Revert of Add infastructure for gl_SampleMask (patchset #6 id:100001 of https://codereview.chromium.org/1690963003/ )

Reason for revert:
Several bots failing with error 'invalid profile "es" for version 320'.

Original issue's description:
> Add infastructure for gl_SampleMask
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1690963003
>
> Committed: https://skia.googlesource.com/skia/+/533cefe5b9c7cec2592fc7ca00ee4cf69a26c094

TBR=egdaniel@google.com,bsalomon@google.com,cdalton@nvidia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1693113002
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
533cefe5b9c7cec2592fc7ca00ee4cf69a26c094 12-Feb-2016 cdalton <cdalton@nvidia.com> Add infastructure for gl_SampleMask

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1690963003

Review URL: https://codereview.chromium.org/1690963003
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
5e58ceea8569f0d90ff7e3daf5de2def50407212 11-Feb-2016 cdalton <cdalton@nvidia.com> Add GrShaderFlags enum

Replaces GrGLSLUniformHandler::ShaderVisibility with GrShaderFlags.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684063006

Review URL: https://codereview.chromium.org/1684063006
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
e179a9167f71dfc41668b05d40082aae76367fa6 20-Jan-2016 bsalomon <bsalomon@google.com> Texturing support for RECTANGLE textures.

Uses textureSize() to unnormalize texture coords when reading from a RECTANGLE texture. Because of this we also require a later GLSL version to use rectangle textures (1.40).

Note that this causes a issue with the bicubic effect. The texture coords seem to have poor precision and the result is ugly. textureSize() is intended as a workaround until effects can be updated to handle unnormalized coords themselves.

Updates places where we were looking for OpenGL version 3.2 for rectangle support. It was actually added in 3.1.

BUG=skia:3868

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1594483003

Review URL: https://codereview.chromium.org/1594483003
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
e5286e0b37abe4d0db67a6b3d87b2d5a12a70ab3 14-Jan-2016 bsalomon <bsalomon@google.com> Beginning of support for texture rectangles.

Adds support for importing a RECTANGLE texture into Skia via GrTexureProvider::wrapBackendTexture().

Tests read/writing pixels, copySurface, and clear.

Does not add support for texturing from a RECTANGLE texture as the coords will be incorrectly normalized.

BUG=skia:3868
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1583863002

Review URL: https://codereview.chromium.org/1583863002
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
cdee009886babe6df7743a9b5b3e2cc0a5f21adf 08-Jan-2016 bsalomon <bsalomon@google.com> Add a class representing texture swizzle.

Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.

Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005

Committed: https://skia.googlesource.com/skia/+/1a1efeacf7cc94a8c2977114dfe230fed3efc105

Review URL: https://codereview.chromium.org/1567733005
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
3183a4136364cfe18b3584302e71ea528a018401 08-Jan-2016 mtklein <mtklein@google.com> Revert of Add a class representing texture swizzle. (patchset #6 id:100001 of https://codereview.chromium.org/1567733005/ )

Reason for revert:
Shader compilation failures when implicitly converting vec4 to float.

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX960-x86_64-Debug/builds/3266/steps/dm/logs/stdio

https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Debug/builds/3154/steps/dm/logs/stdio

Original issue's description:
> Add a class representing texture swizzle.
>
> Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.
>
> Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005
>
> Committed: https://skia.googlesource.com/skia/+/1a1efeacf7cc94a8c2977114dfe230fed3efc105

TBR=egdaniel@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1569393002
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
1a1efeacf7cc94a8c2977114dfe230fed3efc105 08-Jan-2016 bsalomon <bsalomon@google.com> Add a class representing texture swizzle.

Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.

Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005

Review URL: https://codereview.chromium.org/1567733005
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
7ea439b2203855db97330b25945b87dd4b170b8b 03-Dec-2015 egdaniel <egdaniel@google.com> Create GLSLUniformHandler class for gpu backend

BUG=skia:

Review URL: https://codereview.chromium.org/1490283004
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
0eafe79f42e3c675f3c504aed4a41abf511df2b7 20-Nov-2015 egdaniel <egdaniel@google.com> Create GrGLSLVaryingHandler class for program building

BUG=skia:

Review URL: https://codereview.chromium.org/1462123003
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp
2d721d33aad192cc8a7a1321504b39bdca2a57ce 11-Nov-2015 egdaniel <egdaniel@google.com> Move all ShaderBuilder files to GLSL

BUG=skia:

Review URL: https://codereview.chromium.org/1438003003
/external/skia/src/gpu/glsl/GrGLSLShaderBuilder.cpp