aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLFragmentProcessor.h
Commit message (Collapse)AuthorAge
* Remove GrResourceIOProcessor.Gravatar Brian Salomon2018-07-31
| | | | | | | | | | | | | | | | Fold its functionality into GrPrimitiveProcessor and GrFragmentProcessor. Make each have its own TextureSampler nested class. Currently the only difference is that fragment processors lose the ability to inject their samplers into the vertex shader. However, this facilitates refactoring GrPrimitiveProcessor's TextureSampler class such that the textures are specified separately from the TextureSampler. Bug: skia: Change-Id: I1e590187e7a6ae79ee3147155d397fcdcf5e4619 Reviewed-on: https://skia-review.googlesource.com/142814 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove texel buffer support.Gravatar Brian Salomon2018-07-13
| | | | | | | 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>
* Remove GrGLSLFragProcs typedef. Use unique_ptr to for ↵Gravatar Brian Salomon2018-06-07
| | | | | | | | | GrGLSLFragmentProcessor ownership. Change-Id: Ifefbde2ec0002e7e41bed2e4bc2cd7bdd04504d0 Reviewed-on: https://skia-review.googlesource.com/132931 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* converted GrRRectBlurEffect to SkSLGravatar Ethan Nicholas2017-12-20
| | | | | | | | Bug: skia: Change-Id: Ifd192db07e02d69d445277a361760ce4a452f603 Reviewed-on: https://skia-review.googlesource.com/87441 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Remove support for image load/storeGravatar Brian Salomon2017-11-15
| | | | | | | | | 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>
* re-land of new SkSL precisionsGravatar Ethan Nicholas2017-09-18
| | | | | | | | 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>
* Revert "Revert "Revert "Switched highp float to highfloat and mediump float ↵Gravatar Ethan Nicholas2017-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Revert "Revert "Switched highp float to highfloat and mediump float to half.""Gravatar Ethan Nicholas2017-09-15
| | | | | | | | | | 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>
* Revert "Switched highp float to highfloat and mediump float to half."Gravatar Brian Salomon2017-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Switched highp float to highfloat and mediump float to half.Gravatar Ethan Nicholas2017-08-16
| | | | | | | | | | | | | 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>
* renamed SkSL types in preparation for killing precision modifiersGravatar Ethan Nicholas2017-07-28
| | | | | | | | 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>
* Remove support in GPU backend for distance vector field.Gravatar Brian Salomon2017-06-02
| | | | | | | | | Also, remvoes SkNormalBevelSource as this was the last use case for the distance vector field. Change-Id: Ib0176c78e500e6b5130310934253a75860245812 Reviewed-on: https://skia-review.googlesource.com/18482 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Re-land of "eliminated GrGLSLExpr".Gravatar Ethan Nicholas2017-05-08
| | | | | | | | | | | 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>
* Split tracking of TexelBuffers from normal samplersGravatar Greg Daniel2017-05-05
| | | | | | | | | | | | | | 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>
* Revert "Revert "Revert "eliminated GrGLSLExpr"""Gravatar Ethan Nicholas2017-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Revert "Revert "eliminated GrGLSLExpr""Gravatar Ethan Nicholas2017-05-03
| | | | | | | | | | 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>
* Revert "eliminated GrGLSLExpr"Gravatar Brian Salomon2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* eliminated GrGLSLExprGravatar Ethan Nicholas2017-05-02
| | | | | | | | | | | 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>
* Move the ability to access textures, buffers, and image storages out from ↵Gravatar Brian Salomon2017-04-04
| | | | | | | | | | | GrProcessor. GrXferProcessor can no longer use this functionality so it is moved to a new intermediate class inherited by GrFragmentProcessor and GrPrimitiveProcessor. Change-Id: I4f30c89bdceb2d77b602bf0646107e0780881c26 Reviewed-on: https://skia-review.googlesource.com/11202 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Rename vars and functions from 'glslcaps'->'shadercaps'Gravatar Brian Salomon2016-11-29
| | | | | | | Change-Id: I34d226d866dd4ba8e5f33f95cb8cbf01292f9314 Reviewed-on: https://skia-review.googlesource.com/5312 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Merge GrGLSLCaps into GrShaderCapsGravatar Brian Salomon2016-11-29
| | | | | | | | | 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>
* Reland image storage with fixes.Gravatar Brian Salomon2016-11-29
| | | | | | | | | | | | | 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>
* Revert "Initial OpenGL Image support."Gravatar Brian Salomon2016-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Initial OpenGL Image support.Gravatar Brian Salomon2016-11-22
| | | | | | | | | | | | 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>
* Remove GrGLSLSampler type and subclassesGravatar Brian Salomon2016-11-21
| | | | | | | | | | | | | 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>
* Make GrBufferAccess a nested class of GrProcessorGravatar Brian Salomon2016-11-18
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4978 Change-Id: I08c24e9183108f4dd6068216488fd3ac9b5f3ec2 Reviewed-on: https://skia-review.googlesource.com/4978 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Rename GrTextureAccess to GrProcessor::TextureSampler.Gravatar Brian Salomon2016-11-17
| | | | | | | | | | | Renames vars and methods that used the work "access" to refer to this type. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4931 Change-Id: Ibcf488fbd445c5119fc13d190544cd98981bdbee Reviewed-on: https://skia-review.googlesource.com/4931 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Stop aggregating texture/buffer access objects in GrFragmentProcessor parents.Gravatar bsalomon2016-09-26
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2349243002 Review-Url: https://codereview.chromium.org/2365943003
* Stop flattening GrCoordTransforms in parent GrFragmentProcessors.Gravatar bsalomon2016-09-20
| | | | | | | | This changes moves to a model that iterates over GrCTs in a GrFP hierarchy when inserting transformations by GrGLSLPrimitiveProcessors. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339203002 Committed: https://skia.googlesource.com/skia/+/d91237ee051523f439238042674ade99207fe4a6 Review-Url: https://codereview.chromium.org/2339203002
* Revert of Stop flattening GrCoordTransforms in parent GrFragmentProcessors. ↵Gravatar bsalomon2016-09-19
| | | | | | | | | | | | | | | | | | | | | | | | (patchset #3 id:40001 of https://codereview.chromium.org/2339203002/ ) Reason for revert: Crashing blink https://codereview.chromium.org/2351743002/ Original issue's description: > Stop flattening GrCoordTransforms in parent GrFragmentProcessors. > > This changes moves to a model that iterates over GrCTs in a GrFP hierarchy when inserting transformations by GrGLSLPrimitiveProcessors. > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339203002 > > Committed: https://skia.googlesource.com/skia/+/d91237ee051523f439238042674ade99207fe4a6 TBR=egdaniel@google.com,robertphillips@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/2351753002
* Stop flattening GrCoordTransforms in parent GrFragmentProcessors.Gravatar bsalomon2016-09-19
| | | | | | | This changes moves to a model that iterates over GrCTs in a GrFP hierarchy when inserting transformations by GrGLSLPrimitiveProcessors. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339203002 Review-Url: https://codereview.chromium.org/2339203002
* Remove unneeded GrGLSLTransformedCoordsArray typeGravatar bsalomon2016-09-12
| | | | | | | Rename GrGLSLFragmentBuilder::ensureFSCoords2D to ensureCoords2D and make it take an arbitrary GrShaderVar. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2324663004 Review-Url: https://codereview.chromium.org/2324663004
* GrFP can express distance vector field req., program builder declares ↵Gravatar dvonbeck2016-08-01
| | | | | | | | | | | | | | | | | | | | | variable for it This update allows fragment processors to require a field of vectors to the nearest edge. This requirement propagates: - from child FPs to their parent - from parent FPs to the GrPaint - from GrPaint through the PipelineBuilder into GrPipeline - acessed from GrPipeline by GrGLSLProgramBuilder GrGLSL generates a variable for the distance vector and passes it down to the GeometryProcessor->emitCode() method. This CL's base is the CL for adding the BevelNormalSource API: https://codereview.chromium.org/2080993002 BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2114993002 Committed: https://skia.googlesource.com/skia/+/4ef6dfa7089c092c67b0d5ec34e89c1e319af196 Review-Url: https://codereview.chromium.org/2114993002
* Revert of GrFP can express distance vector field req., program builder ↵Gravatar mtklein2016-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | declares variable for it (patchset #20 id:370001 of https://codereview.chromium.org/2114993002/ ) Reason for revert: UBSAN says we're reading a bad bool here: bool usesDistanceVectorField() const { return fUsesDistanceVectorField; } ../../../include/gpu/GrPaint.h:83:51: runtime error: load of value 239, which is not a valid value for type 'bool' SUMMARY: AddressSanitizer: undefined-behavior ../../../include/gpu/GrPaint.h:83:51 in Seems likely also the root of Valgrind failure: https://luci-milo.appspot.com/swarming/task/30522e4f2241cb10 Original issue's description: > GrFP can express distance vector field req., program builder declares variable for it > > This update allows fragment processors to require a field of vectors to the nearest edge. This requirement propagates: > > - from child FPs to their parent > - from parent FPs to the GrPaint > - from GrPaint through the PipelineBuilder into GrPipeline > - acessed from GrPipeline by GrGLSLProgramBuilder > > GrGLSL generates a variable for the distance vector and passes it down to the GeometryProcessor->emitCode() method. > > This CL's base is the CL for adding the BevelNormalSource API: https://codereview.chromium.org/2080993002 > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2114993002 > > Committed: https://skia.googlesource.com/skia/+/4ef6dfa7089c092c67b0d5ec34e89c1e319af196 TBR=egdaniel@google.com,robertphillips@google.com,bsalomon@google.com,dvonbeck@google.com # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=skia: Review-Url: https://codereview.chromium.org/2201613002
* GrFP can express distance vector field req., program builder declares ↵Gravatar dvonbeck2016-07-29
| | | | | | | | | | | | | | | | | | | | variable for it This update allows fragment processors to require a field of vectors to the nearest edge. This requirement propagates: - from child FPs to their parent - from parent FPs to the GrPaint - from GrPaint through the PipelineBuilder into GrPipeline - acessed from GrPipeline by GrGLSLProgramBuilder GrGLSL generates a variable for the distance vector and passes it down to the GeometryProcessor->emitCode() method. This CL's base is the CL for adding the BevelNormalSource API: https://codereview.chromium.org/2080993002 BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2114993002 Review-Url: https://codereview.chromium.org/2114993002
* Refactor how we store and use samplers in GaneshGravatar egdaniel2016-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert of Refactor how we store and use samplers in Ganesh (patchset #7 ↵Gravatar egdaniel2016-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Refactor how we store and use samplers in GaneshGravatar egdaniel2016-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Implement texel buffersGravatar cdalton2016-04-11
| | | | | | | | | | Adds a mechanism for processors to add buffer accesses and implements them in the GL backend. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1870893002 Review URL: https://codereview.chromium.org/1870893002
* Rename EmitArgs::fSamplers to fTexSamplersGravatar cdalton2016-04-11
| | | | | | | | | | | 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
* Add more specialized fragment buildersGravatar cdalton2016-02-18
| | | | | | | | | | | Adds specialized fragment builders for primitive and fragment processors. Removes fragment-specific functionality from the Xfer fragment builder. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1709153002 Review URL: https://codereview.chromium.org/1709153002
* Create GLSLUniformHandler class for gpu backendGravatar egdaniel2015-12-03
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1490283004
* Move glsl onto EmitArgs struct for emitCodeGravatar egdaniel2015-11-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1453623003
* Add ShaderBuilders to EmitArgs and remove gettings from ProgBuilder.Gravatar egdaniel2015-11-18
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1457543003
* Make all GrFragmentProcessors GL independent.Gravatar egdaniel2015-11-13
TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1434313002