aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLVertexArray.cpp
Commit message (Collapse)AuthorAge
* ccpr: Use primitive restart feature on ARMGravatar Chris Dalton2018-01-23
| | | | | | | | Bug: skia: Change-Id: Ia7ab55f8b6ecdd674762f5197d35e8db58f07c01 Reviewed-on: https://skia-review.googlesource.com/98180 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* CCPR: use 16-bit ints for the atlas offset attribGravatar Chris Dalton2017-10-25
| | | | | | | | Bug: skia: Change-Id: I053e8416ced317b6ebc46cc8189840d60c7f91e8 Reviewed-on: https://skia-review.googlesource.com/62060 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* changed vertex attribute precisions to be actual typesGravatar Ethan Nicholas2017-09-27
| | | | | | | | Bug: skia: Change-Id: Ic5555d9f1be7f24655bdea9f2a3677bfb128ef70 Reviewed-on: https://skia-review.googlesource.com/50221 Reviewed-by: Chris Dalton <csmartdalton@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>
* 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>
* Add support for instanced drawsGravatar Chris Dalton2017-05-31
| | | | | | | | | | | | Adds an instance buffer to GrMesh and instance attribs to GrPrimitiveProcessor. Implements support in GL and Vulkan. Adds unit tests for instanced rendering with GrMesh. Bug: skia: Change-Id: If1a9920feb9366f346b8c37cf914713c49129b3a Reviewed-on: https://skia-review.googlesource.com/16200 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* GL: track enabled vertex arrays as a count rather than a maskGravatar Chris Dalton2017-05-08
| | | | | | | | Bug: skia: Change-Id: I63e70ab844a7e04df20165aba025b963efcafa9e Reviewed-on: https://skia-review.googlesource.com/15630 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "GL: track enabled vertex arrays as a count rather than a mask"Gravatar Chris Dalton2017-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 288d041c64322fafc77cfaf23907180ebad933a1. Reason for revert: GL errors. Original change's description: > GL: track enabled vertex arrays as a count rather than a mask > > Bug: skia: > Change-Id: I46ba29cb32960a415ee1993a7b957ec49c0c56d3 > Reviewed-on: https://skia-review.googlesource.com/15520 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I63b0fd3c6f36326a13bf853d13ce8d28869a32cf Reviewed-on: https://skia-review.googlesource.com/15625 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* GL: track enabled vertex arrays as a count rather than a maskGravatar Chris Dalton2017-05-05
| | | | | | | | Bug: skia: Change-Id: I46ba29cb32960a415ee1993a7b957ec49c0c56d3 Reviewed-on: https://skia-review.googlesource.com/15520 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@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 explicit UniqueID classes for GrGpuResource & GrSurfaceProxyGravatar Robert Phillips2016-11-11
| | | | | | | | | | | This sets the stage for using the Proxy's/RenderTargetContext's ID above the flush and the RenderTarget's/GrGpuResource's below the flush. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4650 Change-Id: I9f1e6b00c02a0691d90b58c49e1d8c60684884c1 Reviewed-on: https://skia-review.googlesource.com/4650 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Have GrSurfaceProxys and GrGpuResources draw from the same pool of unique idsGravatar robertphillips2016-08-31
| | | | | | | | | | The idea here is that, for wrapped Proxy objects, we want the uniqueID to reflect that of the wrapped object. For this to work the IDs for the non-wrapped versions can't conflict with GrGpuResource's pool of IDs. Split off of: https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus)) GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2301523003 Review-Url: https://codereview.chromium.org/2301523003
* Add resource provider flag to avoid client-side buffersGravatar csmartdalton2016-07-13
| | | | | | | | | | | | | | | On some platforms, a newly-created buffer was liable to be CPU backed. This would break code that expected a VBO (aka instanced rendering). This change adds an optional flag to GrResourceProvider that requires a buffer to be created in GPU memory. It also moves the CPU backing logic into Gr land in order to properly cache real VBOs on platforms that prefer client-side buffers. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143333002 Review-Url: https://codereview.chromium.org/2143333002
* Track GL buffer state based on unique resource IDGravatar cdalton2016-04-07
| | | | | | | | | | | | | | | | | | Reworks GrGLGpu to track GL buffer state based on the unique GrGpuResource ID. This eliminates the need to notify the gpu object whenever a buffer is deleted. This change also allows us to remove the type specifier from GrBuffer. At this point a buffer is just a chunk of memory, and the type given at creation time is just a suggestion to the GL backend about which target to bind to for updates. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1854283004 Committed: https://skia.googlesource.com/skia/+/deacc97bc63513b5eacaf21f858727f6e8b98ce5 Review URL: https://codereview.chromium.org/1854283004
* Revert of Track GL buffer state based on unique resource ID (patchset #6 ↵Gravatar mtklein2016-04-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:100001 of https://codereview.chromium.org/1854283004/ ) Reason for revert: Chrome roll's broken, seems to be missing fTarget: https://codereview.chromium.org/1861473005 Original issue's description: > Track GL buffer state based on unique resource ID > > Reworks GrGLGpu to track GL buffer state based on the unique > GrGpuResource ID. This eliminates the need to notify the gpu object > whenever a buffer is deleted. > > This change also allows us to remove the type specifier from GrBuffer. > At this point a buffer is just a chunk of memory, and the type > given at creation time is just a suggestion to the GL backend about > which target to bind to for updates. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1854283004 > > Committed: https://skia.googlesource.com/skia/+/deacc97bc63513b5eacaf21f858727f6e8b98ce5 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/1870553002
* Track GL buffer state based on unique resource IDGravatar cdalton2016-04-06
| | | | | | | | | | | | | | | | Reworks GrGLGpu to track GL buffer state based on the unique GrGpuResource ID. This eliminates the need to notify the gpu object whenever a buffer is deleted. This change also allows us to remove the type specifier from GrBuffer. At this point a buffer is just a chunk of memory, and the type given at creation time is just a suggestion to the GL backend about which target to bind to for updates. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1854283004 Review URL: https://codereview.chromium.org/1854283004
* 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
* Use unorm shorts for texture coordinates when rendering text.Gravatar jvanverth2016-02-22
| | | | | | | | | | | | | | | There are a couple of reasons for this: - Vulkan does not guarantee conversions from integral vertex attributes to floating point shader variables - This may be faster and more precise on some platforms, as it avoids the aforementioned conversion and changes a multiply by a very small value to a multiply by a medium-sized value. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713693002 TBR=bsalomon@google.com Committed: https://skia.googlesource.com/skia/+/e507ff0460f4f878214b9454fb5b9ab8d64d8063 Review URL: https://codereview.chromium.org/1713693002
* Revert of Use unorm shorts for texture coordinates when rendering text. ↵Gravatar jvanverth2016-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #3 id:40001 of https://codereview.chromium.org/1713693002/ ) Reason for revert: Causing issues with text on Mali 400s. Examples: largeglyphblur, imageblurtiled. It appears that there are precision problems. Original issue's description: > Use unorm shorts for texture coordinates when rendering text. > > There are a couple of reasons for this: > - Vulkan does not guarantee conversions from integral vertex attributes > to floating point shader variables > - This may be faster and more precise on some platforms, as it avoids > the aforementioned conversion and changes a multiply by a very small > value to a multiply by a medium-sized value. > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713693002 > TBR=bsalomon@google.com > > Committed: https://skia.googlesource.com/skia/+/e507ff0460f4f878214b9454fb5b9ab8d64d8063 TBR=joshualitt@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/1709133003
* Use unorm shorts for texture coordinates when rendering text.Gravatar jvanverth2016-02-19
| | | | | | | | | | | | | There are a couple of reasons for this: - Vulkan does not guarantee conversions from integral vertex attributes to floating point shader variables - This may be faster and more precise on some platforms, as it avoids the aforementioned conversion and changes a multiply by a very small value to a multiply by a medium-sized value. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713693002 TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/1713693002
* Improve GLSL integer supportGravatar cdalton2016-02-08
| | | | | | | | | | | | | - Adds shader types for uint. - Adds a cap for integer support. - Uses glVertexAttribIPointer for integer attribs. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1669853002 Committed: https://skia.googlesource.com/skia/+/3a2caf8ecf38124f4ad21a0f6c4dabfcfa17911a Review URL: https://codereview.chromium.org/1669853002
* Revert of Improve GLSL integer support (patchset #1 id:1 of ↵Gravatar dcheng2016-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1669853002/ ) Reason for revert: MSAN bots are unhappy with this change: https://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20ChromeOS%20MSan%20Tests/builds/7068 Original issue's description: > Improve GLSL integer support > > - Adds shader types for uint. > - Adds a cap for integer support. > - Uses glVertexAttribIPointer for integer attribs. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1669853002 > > Committed: https://skia.googlesource.com/skia/+/3a2caf8ecf38124f4ad21a0f6c4dabfcfa17911a TBR=bsalomon@google.com,egdaniel@google.com,ethannicholas@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/1674813004
* Improve GLSL integer supportGravatar cdalton2016-02-05
| | | | | | | | | | | - Adds shader types for uint. - Adds a cap for integer support. - Uses glVertexAttribIPointer for integer attribs. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1669853002 Review URL: https://codereview.chromium.org/1669853002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Revert "Revert of Move copy-surface-as-draw fallback to GrGLGpu. (patchset ↵Gravatar bsalomon2015-06-01
| | | | | | | | #12 id:220001 of https://codereview.chromium.org/1144433002/)" This reverts commit 404b3b264b833eb7cffdc833c7e2ebbd708e123a. Review URL: https://codereview.chromium.org/1161063003
* Revert of Move copy-surface-as-draw fallback to GrGLGpu. (patchset #12 ↵Gravatar mtklein2015-05-18
| | | | | | | | | | | | | | | | | | | id:220001 of https://codereview.chromium.org/1144433002/) Reason for revert: Many GMs changed, some totally busted. Original issue's description: > Move copy-surface-as-draw fallback to GrGLGpu. > > Committed: https://skia.googlesource.com/skia/+/5df6fee929823f50c55cc50f7c882a309c1b1de9 TBR=joshualitt@google.com,egdaniel@google.com,bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1142003003
* Move copy-surface-as-draw fallback to GrGLGpu.Gravatar bsalomon2015-05-18
| | | | Review URL: https://codereview.chromium.org/1144433002
* Remove GrGLVertexArray from GrGpuResource hierarchy.Gravatar bsalomon2015-05-13
| | | | Review URL: https://codereview.chromium.org/1137093002
* Make uncached textures uncached from the get go.Gravatar bsalomon2015-01-14
| | | | | | | | This avoids the problem of a newly created uncached texture causing a purge of cached resources. BUG=chromium:445885 Review URL: https://codereview.chromium.org/846303002
* Rename GrGpuGL -> GrGLGpuGravatar jvanverth2014-12-22
| | | | Review URL: https://codereview.chromium.org/824753002
* Rename GrGpuGL to GrGLGpu for consistencyGravatar bsalomon2014-12-16
| | | | Review URL: https://codereview.chromium.org/808593003
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* Make GrGpuResources register with GrResourceCache2 after fully constructed.Gravatar bsalomon2014-08-26
| | | | | | | | | | Committed: https://skia.googlesource.com/skia/+/d68b3e491bb765beb7ca5e4ac8e0c80dedf5a83b R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/504313002
* Revert of Make GrGpuResources register with GrResourceCache2 after fully ↵Gravatar bsalomon2014-08-26
| | | | | | | | | | | | | | | | | | | | | constructed. (patchset #3 of https://codereview.chromium.org/504313002/) Reason for revert: Breaking the bots Original issue's description: > Make GrGpuResources register with GrResourceCache2 after fully constructed. > > Committed: https://skia.googlesource.com/skia/+/d68b3e491bb765beb7ca5e4ac8e0c80dedf5a83b R=robertphillips@google.com TBR=robertphillips@google.com NOTREECHECKS=true NOTRY=true Author: bsalomon@google.com Review URL: https://codereview.chromium.org/488463004
* Make GrGpuResources register with GrResourceCache2 after fully constructed.Gravatar bsalomon2014-08-26
| | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/504313002
* Split GrResource into GrCacheable/GrGpuObjectGravatar commit-bot@chromium.org2014-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, an object needed to inherit from GrResource (and thus be a GPU object) in order to live in the GrResourceCache. That was a problem for caching items that weren't GPU objects themselves, but owned GPU objects. This change splits GrResource into two classes: 1. GrCacheable: The base class for objects that can live in the GrResourceCache. 2. GrGpuObject, which inherits from GrCacheable: The base class for objects that get tracked by GrGpu. This change is purely a refactor; there is no change in functionality. Change-Id: I3e8daeb1f123041f414aa306c1366e959ae9e39e BUG=skia: R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/251013002 git-svn-id: http://skia.googlecode.com/svn/trunk@14553 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use vertex buffer objects instead of client side arrays in fixed-function ↵Gravatar commit-bot@chromium.org2014-02-24
| | | | | | | | | | | | | | | | | | | | | | | codepaths Pass vertices to the fixed-function shaders in vertex buffer object stored at attribute 0. This is specified in OpenGL Compatibility Profile Section 10.8.2 (Transferring Vertices With Vertex Attribute Zero). This makes future integration to Chromium command buffer better, since the command buffer already has code for vertex buffer objects but not vertex arrays. Delete unused function pointers related to fixed-function codepaths. R=bsalomon@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/130423013 git-svn-id: http://skia.googlecode.com/svn/trunk@13557 2bbb7eff-a529-9590-31e7-b0007b416f81
* Improve handling of FF vertex array stateGravatar commit-bot@chromium.org2013-09-09
| | | | | | | | | | R=robertphillips@google.com, jvanverth@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/23542013 git-svn-id: http://skia.googlecode.com/svn/trunk@11154 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace uses of GrAssert by SkASSERT.Gravatar tfarina@chromium.org2013-08-17
| | | | | | | | 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
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-03-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8033 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use vertex array objects on core profiles.Gravatar bsalomon@google.com2013-03-07
Review URL: https://codereview.chromium.org/12533007 git-svn-id: http://skia.googlecode.com/svn/trunk@8024 2bbb7eff-a529-9590-31e7-b0007b416f81