aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLProgramBuilder.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>
* Introduce enum class for texture type.Gravatar Brian Salomon2018-07-30
| | | | | | | | | | | This represents the GL texture "target" but at the API-neutral level. It will be needed here because proxy's that wrap imported texture's need to know about sampling restrictions. Change-Id: Ie811a6f6d04ba1b04faa6908422dca64e8e447c8 Reviewed-on: https://skia-review.googlesource.com/144304 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* Put GrPrimitiveProcessor/GrGeometryProcessor before GrPipeline in param lists.Gravatar Brian Salomon2018-06-25
| | | | | | | | | | | We were inconsistent about which order these were in. Having the processor first will make the parameter order more logical for an upcoming change. Also, the primitive processor comes logically before the pipeline. Change-Id: I3968c5e4e6dff01f9c4ad311eb1795b3c7580ff5 Reviewed-on: https://skia-review.googlesource.com/137228 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove include of GrGLProgramBuilder.h from GrGLProgram.h and ↵Gravatar Brian Salomon2018-06-08
| | | | | | | | | | | | | | | | | | | | | GrVkPipelineState.h Make GrGLProgram and GrCkPipelineState cons. public and remove builder friendship. Neither GrGLProgram nor GrVkPipelineState need to know their Desc so remove it. Move the VK desc subclass defn. to GrVkPipelineStateBuilder since it needs it while GrVkPipelineState does not. Some IWYU improvements. Move declaration of the built-in uniform struct to GrGLSLUniformHandler.h from GrGLSLProgramBuilder.h. Change-Id: Ib46817408a83a79a0f718ba2bc19411410d9065a Reviewed-on: https://skia-review.googlesource.com/133060 Reviewed-by: Greg Daniel <egdaniel@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>
* Revert "Revert "Make SkSL GLSL generator declare sk_FragColor inout when EXT ↵Gravatar Brian Salomon2018-04-04
| | | | | | | | | | | | fb fetch is used."" This reverts commit d40133092ae138b3d47a1158101faec3c53c6b1f. Bug: skia: Change-Id: I236505da047d5ad29e4952d8955eb7aa1bfb870b Reviewed-on: https://skia-review.googlesource.com/118621 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Make SkSL GLSL generator declare sk_FragColor inout when EXT fb ↵Gravatar Brian Salomon2018-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | fetch is used." This reverts commit 7e1dd2017a59a748c6cb10160868780d2dffdbc0. Reason for revert: breaking fp compilation Original change's description: > Make SkSL GLSL generator declare sk_FragColor inout when EXT fb fetch is used. > > Change-Id: I5e6e3263bb49febc757cd63d5d6c1518f174322d > Reviewed-on: https://skia-review.googlesource.com/118420 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: I2aedfaff93150ba8cd1ed9fed22f3cfdd509695a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/118600 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make SkSL GLSL generator declare sk_FragColor inout when EXT fb fetch is used.Gravatar Brian Salomon2018-04-04
| | | | | | | Change-Id: I5e6e3263bb49febc757cd63d5d6c1518f174322d Reviewed-on: https://skia-review.googlesource.com/118420 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* Convert geometry shaders to operate in Skia device spaceGravatar Chris Dalton2017-10-25
| | | | | | | | | | | | | Defers the transformation to normalized window coordinates until after the geometry shader. Merges vertex and a geometry shader builders into a single compilation unit with a common base class. Updates CCPR geometry shaders accordingly. Bug: skia: Change-Id: If93c90e978b1fdc7120febd05cfb05810fd496b5 Reviewed-on: https://skia-review.googlesource.com/62980 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Fix cleanup on program creation failureGravatar Robert Phillips2017-08-01
| | | | | | | Change-Id: Ibc9b96537f774a3b8a43848b8b626f3f036b07b3 Reviewed-on: https://skia-review.googlesource.com/29561 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Retract GrTexture*.h & GrRenderTarget*.h from other headersGravatar Robert Phillips2017-06-13
| | | | | | | | | This does push some additional work (& includes) into the .cpp files. Change-Id: I27c847e371802270d13594dcc22aae44039990bb Reviewed-on: https://skia-review.googlesource.com/19660 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: 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>
* Store the dst texture used by an XP in GrPipeline rather than in the XP.Gravatar Brian Salomon2017-04-03
| | | | | | | | | This will allow the XP to be created before the dst texture. Change-Id: I3e5bdfa8e5d47e58a3560792ce5cf3899d30a024 Reviewed-on: https://skia-review.googlesource.com/11011 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove PLS path rendererGravatar Brian Salomon2017-03-06
| | | | | | | Change-Id: Ib727b0749a5a7da95832970e79804417e8b6a247 Reviewed-on: https://skia-review.googlesource.com/9300 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move the rt adjust uniform into GP EmitArgsGravatar csmartdalton2017-02-13
| | | | | | | | | | | | | The GP will likely require this value when dealing with a geometry shader. In the future we may wish to either switch to device-space geometry shaders, or else put this value in an "sk_" builtin. BUG=skia: Change-Id: I8dff88fc219feef84d39fb7bbd08f3b5686f53d2 Reviewed-on: https://skia-review.googlesource.com/8362 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Replaced all calls to fragmentPosition() with sk_FragCoordGravatar Ethan Nicholas2017-02-13
| | | | | | | Change-Id: I2ed4558aea74b3ae7ee11dfe4736cdbcb16ae49e Reviewed-on: https://skia-review.googlesource.com/8278 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Replaced all calls to fragmentPosition() with sk_FragCoord"Gravatar Ethan Nicholas2017-02-02
| | | | | | | | | | | | | This reverts commit de4d301881e7fd084f1f0b359ec6f9b2bf8bd4c5. Reason for revert: several Chrome rendering bugs on Mac BUG=skia: Change-Id: I492082b0b7e7c902ede4b598c5809f604d210ce1 Reviewed-on: https://skia-review.googlesource.com/7887 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Replaced all calls to fragmentPosition() with sk_FragCoordGravatar Ethan Nicholas2017-01-19
| | | | | | | | | BUG=skia: Change-Id: I179576e148ea6caf6e1c40f0a216421898bcb35d Reviewed-on: https://skia-review.googlesource.com/5941 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Removing tracking of whether GP/FP coverage calculations are used by XP.Gravatar Brian Salomon2017-01-04
| | | | | | | | | | | | | | | Remove readsCoverage from GrPipelineOptimizations Remove kNone from GrDefaultGeoProc::Coverage Remove kIgnoreCoverage from GrXferProcessor::OptFlags Remove GrPipeline::fIgnoresCoverage Change-Id: I8f0c9337ee98b9c77af1e9a8a184519ce63822d4 Reviewed-on: https://skia-review.googlesource.com/6552 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* re-land of added sk_FragCoord support to skslcGravatar Ethan Nicholas2016-12-13
| | | | | | | | | BUG=skia: Change-Id: Ifac1aa39839058787ad1794200c3dbb93c147a69 Reviewed-on: https://skia-review.googlesource.com/5850 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "added sk_FragCoord support to skslc"Gravatar Greg Daniel2016-12-12
| | | | | | | | | | | This reverts commit ce33f10677630e34187b661a02161378d8304d68. Reason for revert: Breaking many gpu bots Change-Id: I94c813ed6a9311458c872f74bb1b0792f46ff414 Reviewed-on: https://skia-review.googlesource.com/5737 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* added sk_FragCoord support to skslcGravatar Ethan Nicholas2016-12-12
| | | | | | | | | BUG=skia: Change-Id: If78a4d08121699f87659f0d2e35f3edbf1867401 Reviewed-on: https://skia-review.googlesource.com/5408 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@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>
* Merge GrGLSLShaderVar and GrShaderVarGravatar Brian Salomon2016-11-21
| | | | | | | | | 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>
* 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>
* 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
* Move GrPipelineBuilder out of gms & reduce use of GrPipelineBuilder.hGravatar robertphillips2016-06-23
| | | | | | | | Just another step in reining in the GrPLB GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2086293006 Review-Url: https://codereview.chromium.org/2086293006
* 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
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | 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
* Update how we send draws to gpu backend to reduce state setting.Gravatar egdaniel2016-03-17
| | | | | | | | | The main change here is that we pull primitive type off of the vertices, we set the gpu state on gpu once per pipeline/prim proc draw batch, and we create the ProgramDescriptor only for the Cache/ProgramBuilder. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1806983002 Review URL: https://codereview.chromium.org/1806983002
* Add support for vertex and geometry shader texturesGravatar cdalton2016-03-11
| | | | | | | | | | | Adds a visibility bitfield to GrTextureAccess that controls in which shaders the texture should be accessible. Also adds caps and validation to ensure we don't exceed texture limits. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1782583002 Review URL: https://codereview.chromium.org/1782583002
* Replace fWillReadFragmentPosition with a bitfieldGravatar cdalton2016-02-26
| | | | | | | | | | | | Replaces fWillReadFragmentPosition on GrProcessor with a "RequiredFeatures" bitfield. This will allow us to add additional built-in features. Completely removes information about reading the fragment position from GrPipeline and GrProcOptInfo. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1734163002 Review URL: https://codereview.chromium.org/1734163002
* Add GrShaderFlags enumGravatar cdalton2016-02-11
| | | | | | | | | 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