aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLVertexArray.h
Commit message (Collapse)AuthorAge
* Stop passing GrPrimitiveProcessor to GrMesh::sendToGpu.Gravatar Brian Salomon2018-06-08
| | | | | | | | | | | | | It is currently used in GrGLGpu::setupGeometry. Instead: 1) Make GrMesh track whether primitive restart should be enabled. 2) Make GrGLProgram track program attributes. Change-Id: Ice411a495961fcbc3cedc81e8ae0583537f42153 Reviewed-on: https://skia-review.googlesource.com/132267 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* 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>
* 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>
* Remove unnecessary non-UTF8 characterGravatar Leon Scroggins III2017-05-05
| | | | | | | | | | | | | | Google3 roll is complaining about this character, so remove it. (It does not look to be intentional.) The roll is affected because this file is changed (though this line is not). TBR=bsalomon@google.com, benjaminwagner@google.com Change-Id: I639a04c424ea11e1a5e7df10c9d6c7233031bf2b Reviewed-on: https://skia-review.googlesource.com/15612 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Leon Scroggins <scroggo@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 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>
* 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
* Consolidate GPU buffer implementationsGravatar cdalton2016-03-25
| | | | | | | | | | | | | | | | Consolidates all the different buffer implementations into a single GrBuffer class. This will allow us to add new buffer types, use DSA in OpenGL, track buffer bindings by unique ID, cache buffers without respect to the type of data they have been used for previously, etc. This change is strictly a refactor; it introduces no change in functionality. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002 Committed: https://skia.googlesource.com/skia/+/8b1bff29675afd25843439eade634a57f68fe16f Review URL: https://codereview.chromium.org/1825393002
* Revert of Consolidate GPU buffer implementations (patchset #10 id:180001 of ↵Gravatar robertphillips2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1825393002/ ) Reason for revert: Lots of Android redness Original issue's description: > Consolidate GPU buffer implementations > > Consolidates all the different buffer implementations into a single > GrBuffer class. This will allow us to add new buffer types, use DSA in > OpenGL, track buffer bindings by unique ID, cache buffers without > respect to the type of data they have been used for previously, etc. > This change is strictly a refactor; it introduces no change in > functionality. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002 > > Committed: https://skia.googlesource.com/skia/+/8b1bff29675afd25843439eade634a57f68fe16f TBR=bsalomon@google.com,egdaniel@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/1831133004
* Consolidate GPU buffer implementationsGravatar cdalton2016-03-25
| | | | | | | | | | | | | | Consolidates all the different buffer implementations into a single GrBuffer class. This will allow us to add new buffer types, use DSA in OpenGL, track buffer bindings by unique ID, cache buffers without respect to the type of data they have been used for previously, etc. This change is strictly a refactor; it introduces no change in functionality. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002 Review URL: https://codereview.chromium.org/1825393002
* 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
* added support for PLS path renderingGravatar ethannicholas2016-01-30
| | | | | | | | | BUG=skia:3555 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002 Committed: https://skia.googlesource.com/skia/+/7df3f5e127f8016d17b637cc48a6a4718f1a6822 Review URL: https://codereview.chromium.org/1541903002
* Revert of added support for PLS path rendering (patchset #16 id:360001 of ↵Gravatar ethannicholas2016-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1541903002/ ) Reason for revert: ASAN failure at src/gpu/GrXferProcessor.cpp:224 Original issue's description: > added support for PLS path rendering > > BUG=skia:3555 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002 > > Committed: https://skia.googlesource.com/skia/+/7df3f5e127f8016d17b637cc48a6a4718f1a6822 TBR=bsalomon@google.com,egdaniel@google.com,joshualitt@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:3555 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1626553002 Review URL: https://codereview.chromium.org/1626553002
* added support for PLS path renderingGravatar ethannicholas2016-01-22
| | | | | | | BUG=skia:3555 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002 Review URL: https://codereview.chromium.org/1541903002
* Move definitions of GrGL basic types (e.g. GrGLenum) to their own header.Gravatar bsalomon2015-10-19
| | | | Review URL: https://codereview.chromium.org/1410333003
* 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
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* Use uint16s for texture coordinates when rendering text.Gravatar jvanverth2015-02-18
| | | | | | | | | Allows us to push more vertices into a given vertex buffer, with a slight performance improvement. Committed: https://skia.googlesource.com/skia/+/059034d252007d0dd86fff5ffdbb53cbcb10d34b Review URL: https://codereview.chromium.org/917373002
* Revert of Use uint16s for texture coordinates when rendering text. (patchset ↵Gravatar reed2015-02-17
| | | | | | | | | | | | | | | | | | | | | | | | #5 id:80001 of https://codereview.chromium.org/917373002/) Reason for revert: speculative revert for DEPS failures https://codereview.chromium.org/932973002/ Original issue's description: > Use uint16s for texture coordinates when rendering text. > > Allows us to push more vertices into a given vertex buffer, with > a slight performance improvement. > > Committed: https://skia.googlesource.com/skia/+/059034d252007d0dd86fff5ffdbb53cbcb10d34b TBR=joshualitt@google.com,robertphillips@google.com,bsalomon@google.com,reed@google.com,djsollen@google.com,jvanverth@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/920333003
* Use uint16s for texture coordinates when rendering text.Gravatar jvanverth2015-02-17
| | | | | | | Allows us to push more vertices into a given vertex buffer, with a slight performance improvement. Review URL: https://codereview.chromium.org/917373002
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* Rename GrGpuGL to GrGLGpu for consistencyGravatar bsalomon2014-12-16
| | | | Review URL: https://codereview.chromium.org/808593003
* Make GrGpuResource::gpuMemorySize non-virtual w/ onGpuMemorySize virtual implGravatar bsalomon2014-11-12
| | | | | | BUG=skia:2889 Review URL: https://codereview.chromium.org/702413003
* Force input coverage to be only a byte in gpu shaders.Gravatar egdaniel2014-11-03
| | | | | | | | Prime coverage invariant output calculations with single component BUG=skia: Review URL: https://codereview.chromium.org/649783003
* Rename GrGpuObject to GrGpuResourceGravatar bsalomon2014-07-25
| | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/418143004
* 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
* Move GrGLProgram::Desc out of GrGLProgram.Gravatar bsalomon@google.com2013-03-27
| | | | | | Review URL: https://codereview.chromium.org/12942014 git-svn-id: http://skia.googlecode.com/svn/trunk@8411 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix uninitialized memory accessGravatar robertphillips@google.com2013-03-13
| | | | | | | | https://codereview.appspot.com/7657044/ git-svn-id: http://skia.googlecode.com/svn/trunk@8142 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