aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk/GrVkUniformHandler.cpp
Commit message (Collapse)AuthorAge
* 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 unused kTexture2D_GrSLType and kSampler_GrSLTypeGravatar Brian Salomon2018-07-27
| | | | | | | | | | Also remove unused GrSLTypeIs2DCombinedSamplerType Bug: skia: Change-Id: I9c670535dbbc30ddeb3636acb5b784580a968ee4 Reviewed-on: https://skia-review.googlesource.com/144035 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove unused kBufferSampler_GrSLTypeGravatar Brian Salomon2018-07-27
| | | | | | | | Change-Id: I3e0476d92dfde928ef7d49155afdc3685c4ca03e Reviewed-on: https://skia-review.googlesource.com/144023 Auto-Submit: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* added byte and ubyte types to SKSLGravatar Ruiqi Mao2018-07-17
| | | | | | | | | | | created new GMs for skinning Bug: skia: Change-Id: I15fb2bd02fba8beb6dd2dd3f3716da016ea92192 Reviewed-on: https://skia-review.googlesource.com/140241 Commit-Queue: Ruiqi Mao <ruiqimao@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@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 integer texture supportGravatar Brian Salomon2018-02-06
| | | | | | | Change-Id: I0db1c4d705711b8d980bbe0d986013daec6c8ef3 Reviewed-on: https://skia-review.googlesource.com/103762 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Revert "converted vertex shaders to device coords""Gravatar Robert Phillips2018-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 29b3434e48ca41672266ac40f5b9e8f8a0405cb5. Reason for revert: The Chrome perf regression is suspect & the Nexus 5 is broken w/o this CL. Original change's description: > Revert "converted vertex shaders to device coords" > > This reverts commit e7e81c15c144b8133f696d0744ed9f7e8d06e936. > > Reason for revert: Chrome perf regressions > > Bug: skia: > Change-Id: I17fadc97c4b8e80bfdccbf123554614a00c58473 > Reviewed-on: https://skia-review.googlesource.com/99040 > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> TBR=csmartdalton@google.com,ethannicholas@google.com Change-Id: Iff3c9fce65beeca16028ae59d4d08b1413b90530 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/99241 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "converted vertex shaders to device coords"Gravatar Ethan Nicholas2018-01-23
| | | | | | | | | | | | This reverts commit e7e81c15c144b8133f696d0744ed9f7e8d06e936. Reason for revert: Chrome perf regressions Bug: skia: Change-Id: I17fadc97c4b8e80bfdccbf123554614a00c58473 Reviewed-on: https://skia-review.googlesource.com/99040 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* converted vertex shaders to device coordsGravatar Ethan Nicholas2017-12-12
| | | | | | | | Bug: skia:6239 Change-Id: I1a3b67fe84d208d426d71deb7aea6b0cd433af37 Reviewed-on: https://skia-review.googlesource.com/75501 Reviewed-by: Chris Dalton <csmartdalton@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>
* Add vector GrSLTypes for shortsGravatar Chris Dalton2017-10-25
| | | | | | | | Bug: skia: Change-Id: I686950df9f5470b4885823471957c3859cc692ea Reviewed-on: https://skia-review.googlesource.com/63441 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Add vector GrSLTypes for shorts"Gravatar Chris Dalton2017-10-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit af37a53a84d03fa08bc2f447034d7db754cfc5ba. Reason for revert: Compiler errors Original change's description: > Add vector GrSLTypes for shorts > > Bug: skia: > Change-Id: Icb9eb1fcb0f879cd0bfdd27d06459843361c9947 > Reviewed-on: https://skia-review.googlesource.com/62943 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=egdaniel@google.com,csmartdalton@google.com,ethannicholas@google.com Change-Id: Ib23b28be92e199459fe1666fb1ec0e46e141a8f7 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/63460 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add vector GrSLTypes for shortsGravatar Chris Dalton2017-10-24
| | | | | | | | | Bug: skia: Change-Id: Icb9eb1fcb0f879cd0bfdd27d06459843361c9947 Reviewed-on: https://skia-review.googlesource.com/62943 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* switched SkSL's temporary 'highfloat' type back to 'float'Gravatar Ethan Nicholas2017-09-22
| | | | | | | | Bug: skia: Change-Id: If0debae7318b6b5b4a7cb85d458996a09931127e Reviewed-on: https://skia-review.googlesource.com/48760 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: 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>
* Switch atlas clients over to using absolute texture coordinates (take 2)Gravatar Robert Phillips2017-08-25
| | | | | | | | | 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>
* Revert "Switch atlas clients over to using absolute texture coordinates"Gravatar Robert Phillips2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e84c087e621978e6d298b8ca950521601a0366cb. Reason for revert: ANGLE is unhappy Original change's description: > Switch atlas clients over to using absolute texture coordinates > > This is a prerequisite for being able to resize the atlas with impunity. > > Change-Id: I509816c8d6f38fbc92fa39aeab303b42ab09f58b > Reviewed-on: https://skia-review.googlesource.com/37560 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,jvanverth@google.com,robertphillips@google.com,brianosman@google.com Change-Id: I329efd642c22e11a5c576a4632fc557759b200d5 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/38400 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Switch atlas clients over to using absolute texture coordinatesGravatar Robert Phillips2017-08-24
| | | | | | | | | This is a prerequisite for being able to resize the atlas with impunity. Change-Id: I509816c8d6f38fbc92fa39aeab303b42ab09f58b Reviewed-on: https://skia-review.googlesource.com/37560 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@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>
* Replace SkFAIL with SK_ABORT.Gravatar Ben Wagner2017-08-16
| | | | | | | | | | | | SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically changes uses of SkFAIL to SK_ABORT in preparation for its removal. The related sk_throw macro will be changed independently, due to needing to actually clean up its users. Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb Reviewed-on: https://skia-review.googlesource.com/35284 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Ben Wagner <bungeman@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>
* Update visibility checks in Vulkan to support geom shadersGravatar Greg Daniel2017-07-17
| | | | | | | | Bug: skia: Change-Id: Ie80bea38e644647e5a09e95053ddace30521361d Reviewed-on: https://skia-review.googlesource.com/23300 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add support for using texel buffers in Vulkan backend.Gravatar Greg Daniel2017-05-09
| | | | | | | | Bug: skia: Change-Id: I5cc7b18263dbe28d5d8d89301111ef240109704a Reviewed-on: https://skia-review.googlesource.com/15770 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add support for Geom shaders in Vulkan backend.Gravatar Greg Daniel2017-05-04
| | | | | | | | | | | | | | | | Still requires SkSL support before it will work. The main changes here involve support for uniforms in the geometry shader. We use the same buffer for vertex and geometry shader stages. These uniforms are not expected to be updated as often as frag data so we keep them separate to avoid larger buffer uploads to the gpu. BUG=skia: Change-Id: I10b631c24071b6ffa258907a02a009ec6c8accd0 Reviewed-on: https://skia-review.googlesource.com/8413 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Add integer vectors to GrSLTypeGravatar csmartdalton2017-02-08
| | | | | | | | | BUG=skia: Change-Id: I4a4a50e214f2240d83f6f0b02cf43e695c067933 Reviewed-on: https://skia-review.googlesource.com/8122 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add offset to uniform blocks in VulkanGravatar Greg Daniel2017-01-27
| | | | | | | | | | | This is the first step to being able to use push constants. BUG=skia:5039 Change-Id: I49edea8faacf78814036ce3b3f9f2814974cf2c7 Reviewed-on: https://skia-review.googlesource.com/7448 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Greg Daniel <egdaniel@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>
* Move GrShaderVar to an appending model for layout qualifiersGravatar Brian Salomon2016-11-22
| | | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5144 Change-Id: I05e88961e50bd679cfe5863f413f3ec65bc9fd95 Reviewed-on: https://skia-review.googlesource.com/5144 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>
* Rename GrTextureBufferSampler to GrBufferSamplerGravatar csmartdalton2016-11-16
| | | | | | | | | | | | | | Just a simple renaming to reinforce the Ganesh notion that a buffer access is not related to a texture. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4879 Change-Id: I3f12b6eccff744e246618be0a7abf41c4a1228a1 Reviewed-on: https://skia-review.googlesource.com/4879 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Rename kTexture2DISampler to kITexture2DSampler.Gravatar Brian Salomon2016-11-16
| | | | | | | | | | | Also remove unused kGrSLTypeCount. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4903 Change-Id: I7f934c56515424b2668886dec2f16296a1256e2c Reviewed-on: https://skia-review.googlesource.com/4903 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Remove static asserts for GrSLType and GrVertexAttribType enum values.Gravatar Brian Salomon2016-11-14
| | | | | | | | | | | | | Replaces with switch statements that will produce a compiler warning if a type is added and helper functions are not updated. This also removes several unused helper functions for these enum types. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4486 Change-Id: Iee6d8e5095dc4ba2488a8928bf60f8e903cd3320 Reviewed-on: https://skia-review.googlesource.com/4486 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Add integer texture support.""Gravatar Brian Salomon2016-11-11
| | | | | | | | | | | | | This reverts commit 9c7edb8311409a141b0dc1d5e480c68c629f1997. Fixes ASAN errors GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4736 Change-Id: I1b1dae754d357b01da7169c8e7c59d7d8d8a10f6 Reviewed-on: https://skia-review.googlesource.com/4736 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Add integer texture support."Gravatar Leon Scroggins2016-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 434c534bd0ec08cb355fecfb6d2110197b523e74. Reason for revert: Undefined behavior. From https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/1272/steps/test_skia%20on%20Ubuntu/logs/stdio ../../../tests/IntTextureTest.cpp:51:44: runtime error: left shift of negative value -1 #0 0x2257480 in test_IntTexture(skiatest::Reporter*, sk_gpu_test::ContextInfo const&) (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x2257480) #1 0x1ca1066 in skiatest::RunWithGPUTestContexts(void (*)(skiatest::Reporter*, sk_gpu_test::ContextInfo const&), bool (*)(sk_gpu_test::GrContextFactory::ContextType), skiatest::Reporter*, sk_gpu_test::GrContextFactory*) (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x1ca1066) #2 0x1ca080d in run_test(skiatest::Test) (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x1ca080d) #3 0x1c9e5e9 in dm_main() (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x1c9e5e9) #4 0x7f2d2ba8df44 in __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:287 #5 0x1bb3028 in _start (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x1bb3028) SUMMARY: AddressSanitizer: undefined-behavior ../../../tests/IntTextureTest.cpp:51:44 in step returned non-zero exit code: 1 Original change's description: > Add integer texture support. > > This allows us to create integer textures and sample them from a GrProcessor's code. > > Filtering is limited to NEAREST. > > Adds tests for reading/writing pixels, copying, and drawing. These operations are not allowed to convert to fixed/float configs. > > Vulkan support is TBD. > > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4348 > > Change-Id: If38d89a03285d4bd98d1f14f9638b0320977e43d > Reviewed-on: https://skia-review.googlesource.com/4348 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Chris Dalton <csmartdalton@google.com> > TBR=bsalomon@google.com,csmartdalton@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I39f1a0a0dd3e6cde1143c8cc1217d2e3d5977b21 Reviewed-on: https://skia-review.googlesource.com/4663 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Add integer texture support.Gravatar Brian Salomon2016-11-10
| | | | | | | | | | | | | | | | | | This allows us to create integer textures and sample them from a GrProcessor's code. Filtering is limited to NEAREST. Adds tests for reading/writing pixels, copying, and drawing. These operations are not allowed to convert to fixed/float configs. Vulkan support is TBD. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4348 Change-Id: If38d89a03285d4bd98d1f14f9638b0320977e43d Reviewed-on: https://skia-review.googlesource.com/4348 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Add Texture2D and Sampler GrSLTypesGravatar egdaniel2016-07-13
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Correctly handle mat2x2 in VulkanGravatar egdaniel2016-07-07
| | | | | | | BUG=skia:5497 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2129953002 Review-Url: https://codereview.chromium.org/2129953002
* 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
* Fix Vk build breakage due to new GrSLTypeGravatar bsalomon2016-04-12
| | | | | | | R=egdaniel@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1881033002 Review URL: https://codereview.chromium.org/1881033002
* 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
* Add support for 2x2 matricesGravatar cdalton2016-03-07
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1755483002 Review URL: https://codereview.chromium.org/1755483002