History log of /external/skia/src/gpu/gl/GrGLSL.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
88cb22b6b4816c7a9ca6c5b795965b4606f9eb7b 30-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Convert GrCrash->SkFAIL GrDebugCrash->SkDEBUGFAIL

R=robertphillips@google.com, reed@google.com, mtklein@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/257393004

git-svn-id: http://skia.googlecode.com/svn/trunk@14460 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
f4e67e3e5e5017284300a61e7bb046723a44b0cf 30-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fail to create GrContext when we get a NULL for a GL/GLSL version string

BUG=368107
R=jvanverth@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/254083002

git-svn-id: http://skia.googlecode.com/svn/trunk@14452 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
972f9cd7a063d0544f8c919fd12b9a3adbd12b24 28-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> SK_SUPPORT_LEGACY_GRTYPES to hide duplicate types from SkTypes.h

BUG=skia:
R=bsalomon@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/216503004

git-svn-id: http://skia.googlecode.com/svn/trunk@13982 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
9e90aed5de82732cc9921f01388d3063a41a053b 16-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Rename GrGLBinding->GrGLStandard, no longer a bitfield

BUG=skia:2042
R=jvanverth@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/133413003

git-svn-id: http://skia.googlecode.com/svn/trunk@13108 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
8660783e196dc3cb4ead492253a493844fa43f7a 21-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Minor fix in Ganesh shader generation.

R=bsalomon@google.com

Author: skaslev@chromium.org

Review URL: https://codereview.chromium.org/78843006

git-svn-id: http://skia.googlecode.com/svn/trunk@12343 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
a34995e18b1f0a7d8c9f23451718bb30ff0105b0 23-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement SkColorFilter as a GrGLEffect

Adds GrEffect::willUseInputColor() which indicates whether or not the
input color affects the output of the effect. This is needed for
certain Xfermodes, such as kSrc_Mode. For these modes the color filter
will not use the input color.

An effect with GrEffect::willUseInputColor() true will cause all color
or coverage effects before it to be discarded, as their computations
cannot affect the output. In these cases program is marked as having
white input color.

This fixes an assert when Skia is compiled in a mode that prefers
using uniforms instead of attributes for constants. (Flags
GR_GL_USE_NV_PATH_RENDERING or GR_GL_NO_CONSTANT_ATTRIBUTES). Using
attributes hides the problem where the fragment shader does not need
input color for color filters that ignore DST part of the filter. The
assert would be hit when uniform manager tries to bind an uniform which
has been optimized away by the shader compiler.

Adds specific GrGLSLExpr4 and GrGLSLExpr1 classes. This way the GLSL
expressions like "(v - src.a)" can remain somewhat readable in form of
"(v - src.a())". The GrGLSLExpr<typename> template implements the
generic functionality, GrGLSLExprX is the specialization that exposes
the type-safe interface to this functionality.

Also adds operators so that GLSL binary operators of the form
"(float * vecX)" can be expressed in C++. Before only the equivalent
"(vecX * float)" was possible. This reverts the common blending
calculations to more conventional order, such as "(1-a) * c" instead of
"c * (1-a)".

Changes GrGLSLExpr1::OnesStr from 1 to 1.0 in order to preserve the
color filter blending formula string the same (with the exception of
variable name change).

Shaders change in case of input color being needed:
- vec4 filteredColor;
- filteredColor = (((1.0 - uFilterColor.a) * output_Stage0) + uFilterColor);
- fsColorOut = filteredColor;
+ vec4 output_Stage1;
+ { // Stage 1: ModeColorFilterEffect
+ output_Stage1 = (((1.0 - uFilterColor_Stage1.a) * output_Stage0) + uFilterColor_Stage1);
+ }
+ fsColorOut = output_Stage1;

Shaders change in case of input color being not needed:
-uniform vec4 uFilterColor;
-in vec4 vColor;
+uniform vec4 uFilterColor_Stage0;
out vec4 fsColorOut;
void main() {
- vec4 filteredColor;
- filteredColor = uFilterColor;
- fsColorOut = filteredColor;
+ vec4 output_Stage0;
+ { // Stage 0: ModeColorFilterEffect
+ output_Stage0 = uFilterColor_Stage0;
+ }
+ fsColorOut = output_Stage0;
}

R=bsalomon@google.com, robertphillips@google.com, jvanverth@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/25023003

git-svn-id: http://skia.googlecode.com/svn/trunk@11912 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
f29c3802899c3e1e285a44140eb32cfa329764dc 10-Oct-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@11691 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
824c346b6e0e114063c1a8ad4ba7c3a669ee2cff 10-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Express (GLSL expression, possibly known value) pairs as a class

Express (GLSL expression, possibly known value) pairs as a class
instead of two variables Introduces GrGLSLExpr<N> to encapsulate
the expression and possibly constant-folded value of the expression.

This simplifies passing of the expressions to functions.

Changes the shaders with following patterns:
{ // Stage 0: Linear Gradient
vec4 colorTemp = mix(uGradientStartColor_Stage0, uGradientEndColor_Stage0, clamp(vMatrixCoord_Stage0.x, 0.0, 1
colorTemp.rgb *= colorTemp.a;
- output_Stage0 = vec4((vColor) * (colorTemp));
+ output_Stage0 = (vColor * colorTemp);
+ }

Previously the vector cast was always added if constant folding was
effective, regardless of the term dimensions. Now the vector upcast is
not inserted in places where it is not needed, ie. when the binary
operator term is of the target dimension.

Also, some parentheses can be omitted. It is assumed that
GrGLSLExpr<N>("string") constructors construct a simple expression or
parenthesized expression.

Otherwise the shader code remains identical.

R=jvanverth@google.com, bsalomon@google.com, robertphillips@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/25048002

git-svn-id: http://skia.googlecode.com/svn/trunk@11690 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
410552a73d59611901033b2bc5147cc6ade0207c 30-Sep-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Move the GL shader compilation step into GrGLShaderBuilder

Moves the compilation step and a few other blocks of code from
GrGLProgram to GrGLShaderBuilder. This way GrGLProgram doesn't have to
know whether or not there is a vertex shader.

R=bsalomon@google.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/23533066

git-svn-id: http://skia.googlecode.com/svn/trunk@11523 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
06f05989570fbf2ced3d2d1690ea1276b7330b5f 30-Aug-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Modify GLSL version declaration to allow access to compat. features

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/23526008

git-svn-id: http://skia.googlecode.com/svn/trunk@11033 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
f6de475e5cbd143f348ff7738919e397b7fe7f57 17-Aug-2013 tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Replace uses of GrAssert by SkASSERT.

R=bsalomon@google.com

Review URL: https://codereview.chromium.org/22850006

git-svn-id: http://skia.googlecode.com/svn/trunk@10789 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
791816a87a569969c98167ca197ad106543e7f92 15-Aug-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Rename kES2_GrGLBinding to kES_GrGLBinding. Step 0 for supporting ES3.

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/23185004

git-svn-id: http://skia.googlecode.com/svn/trunk@10747 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
cb6dc752281841a8d3245d14530e30eff39816d3 19-Apr-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@8759 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
018f179efb2413431bdb1a9e6701eb44ef36b792 18-Apr-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Expand modulate, add, subtract, extract component glsl helpers.
Review URL: https://codereview.chromium.org/13895006

git-svn-id: http://skia.googlecode.com/svn/trunk@8755 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
42eff161a2acdbf03a71666b3fc31079a1bba86f 02-Apr-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reland 8459 with fix for #extension after default precision in FS.



git-svn-id: http://skia.googlecode.com/svn/trunk@8479 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
97055966846f1d3312714d4b811124443aecf681 02-Apr-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reverting r8459 due to shader error on Nexus 10



git-svn-id: http://skia.googlecode.com/svn/trunk@8474 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
054ae99d93711c26e40682a0e3a03a47ea605c53 01-Apr-2013 jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Take two for r8466:

Replace the old attribute binding and index interface with one where we include the binding as part of the attribute array. Also removed the fixed attribute indices for constant color and coverage attributes, and replaced with dynamic ones based on current attribute set. Removed binding of color and coverage attributes unless they're actually set.

Original author: bsalomon@google.com

Author: jvanverth@google.com

Reviewed By: bsalomon@google.com,robertphillips@google.com

Review URL: https://chromiumcodereview.appspot.com/13296005


git-svn-id: http://skia.googlecode.com/svn/trunk@8468 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
c7bf2963f00a29bd28e5e2a446da79f93c1d9383 01-Apr-2013 jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Rolling back r8466.

Not reviewed.


git-svn-id: http://skia.googlecode.com/svn/trunk@8467 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
fb495b537f5ddd6966f02cfe38f6b106a4869934 01-Apr-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revise attribute binding interface.

Replace the old attribute binding and index interface with one where we include the binding as part of the attribute array. Also removed the fixed attribute indices for constant color and coverage attributes, and replaced with dynamic ones based on current attribute set. Removed binding of color and coverage attributes unless they're actually set.

Original author: bsalomon@google.com

Author: jvanverth@google.com

Reviewed By: bsalomon@google.com,robertphillips@google.com

Review URL: https://chromiumcodereview.appspot.com/13296005

git-svn-id: http://skia.googlecode.com/svn/trunk@8466 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
ee040a74225a91ddfa15e25ed5abe268cace53e2 01-Apr-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Make GrGLShaderBuilder responsible for enabling GLSL extensions
Review URL: https://codereview.chromium.org/12668019

git-svn-id: http://skia.googlecode.com/svn/trunk@8459 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
281c726c760c2b0ef957674da0360d5595d52a9c 23-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add support for GLSL 1.40.
Review URL: https://codereview.appspot.com/6709070

git-svn-id: http://skia.googlecode.com/svn/trunk@6046 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
5b5bba36dcbc69b0033c2acc9981734956394816 24-Sep-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Addressed xcode analysis complaints

http://codereview.appspot.com/6558048/



git-svn-id: http://skia.googlecode.com/svn/trunk@5646 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
868a8e7fc83e9ac6ee1418e75b84a0595605626c 30-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Recommit r5350 with fix for image failures (which affected GLs that don't support ARB_texture_swizzle).



git-svn-id: http://skia.googlecode.com/svn/trunk@5353 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
a3d707b4ec17e925f71cc0c39d40252d2b788314 30-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert 5350 while image changes are diagnosed.



git-svn-id: http://skia.googlecode.com/svn/trunk@5351 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
b41b2bc29c0411052f9f45855a98be370d586438 30-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove fModulate from GrGLShaderBuilder

Review URL: https://codereview.appspot.com/6495051/




git-svn-id: http://skia.googlecode.com/svn/trunk@5350 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
d9e0181405c9853ffd20502555200205a5ab09b1 29-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Linux warning fixes

Review URL: https://codereview.appspot.com/6500045/



git-svn-id: http://skia.googlecode.com/svn/trunk@5337 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
4af0af612f8cfb6951feb10ffe3091821866bd44 29-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add helpers to add/modulate glsl vec4s.

Review URL: https://codereview.appspot.com/6497046/



git-svn-id: http://skia.googlecode.com/svn/trunk@5332 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
34bcb9f80336fe0dc56ad5f67aeb0859bf84d92e 28-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Some GrGLShaderBuilder cleanup

Review URL: https://codereview.appspot.com/6500043/



git-svn-id: http://skia.googlecode.com/svn/trunk@5322 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
a1bf0fffff821d9c11809c89bd98d4ced480421a 07-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> uniquely name FS functions, add lighting effects to unit test

Review URL: http://codereview.appspot.com/6458080/


git-svn-id: http://skia.googlecode.com/svn/trunk@4992 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
d7727ceb82e271f8b5580c51571c57b09c5e3ced 12-Jul-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Refactor how precision is handled with GrGLShaderVar

Review URL: http://codereview.appspot.com/6392049/


git-svn-id: http://skia.googlecode.com/svn/trunk@4575 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
168e63418cadba4018aadf95c091d40d9deb13b9 18-Apr-2012 tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Infrastructure for new Ganesh shader pipeline: base classes for GPU
implementation of user-defined effects.

http://codereview.appspot.com/6052047/



git-svn-id: http://skia.googlecode.com/svn/trunk@3726 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp
dd182cbca60a7f0003330c01dfc64f69f56aea90 10-Feb-2012 tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Move GL-specific source code to make room for D3D back end.



git-svn-id: http://skia.googlecode.com/svn/trunk@3165 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLSL.cpp