aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk/GrVkResourceProvider.cpp
Commit message (Collapse)AuthorAge
* Fix some static intializers in Vulkan code.Gravatar Greg Daniel2018-06-26
| | | | | | | | | Bug: skia: Change-Id: Ia5160376ff456874459430e51c2f57acdb1a4de1 Reviewed-on: https://skia-review.googlesource.com/137584 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Chris Blume <cblume@chromium.org> Commit-Queue: Greg Daniel <egdaniel@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>
* Add unit test the explicit tests create a GrVkCopyPipelineGravatar Greg Daniel2018-03-01
| | | | | | | | Bug: skia:7663 Change-Id: I9883d903302fbbcd42f73601f49af96b6cc875ba Reviewed-on: https://skia-review.googlesource.com/111361 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
* Remove uses of sk_sp when passing around GrVkPipelineStateGravatar Greg Daniel2017-10-16
| | | | | | | | | | | | There is no need to be passing ref's around when we get a GrVkPipelineState from the cache. We don't track its use on the GPU and we never delete them from the cache until we are destorying the GrVkGpu object. Bug: skia: Change-Id: If675ce9e0690b36663f6d227c48fd4874ba46770 Reviewed-on: https://skia-review.googlesource.com/59985 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Rework GrSamplerParams to be more compact and use its own wrap mode enum.Gravatar Brian Salomon2017-09-07
| | | | | | | | | The main change is to make GrSamplerParams smaller by making its enums have byte-sized underlying types. The rest is cosmetic. Change-Id: Ib71ea50612d24619a85e463826c6b8dfb9b445e3 Reviewed-on: https://skia-review.googlesource.com/43200 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Fix up and clarify use of maxMipLevel in VulkanGravatar Greg Daniel2017-09-01
| | | | | | | | Bug: skia: Change-Id: I5b31e0c74be8f650e97c448b1029a2277dfee978 Reviewed-on: https://skia-review.googlesource.com/41844 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Remove Gr*Gpu includes from header files.""Gravatar Greg Daniel2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 56af45b03c542ef0bc198e42687bf685aafaae81. Reason for revert: Relanding now that pre CL has relanded Original change's description: > Revert "Remove Gr*Gpu includes from header files." > > This reverts commit 2bd381bffd36cdcffacf606d952547ce66fed7e9. > > Reason for revert: Need to revert change this landed on top of > > Original change's description: > > Remove Gr*Gpu includes from header files. > > > > Some general cleanup to try to keep use of the backend gpu class in cpps. > > > > Bug: skia: > > Change-Id: I1a28e0e5c2e55562b3fff56c284c3405b5b6d8bc > > Reviewed-on: https://skia-review.googlesource.com/20057 > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,robertphillips@google.com > > Change-Id: I5b27d50654a17502c056d59b2d4f9609376d189e > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20064 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,robertphillips@google.com Change-Id: Id1656a7708223bc4dcc8eb4444ef41ada61be5d0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/20148 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Remove Gr*Gpu includes from header files."Gravatar Greg Daniel2017-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2bd381bffd36cdcffacf606d952547ce66fed7e9. Reason for revert: Need to revert change this landed on top of Original change's description: > Remove Gr*Gpu includes from header files. > > Some general cleanup to try to keep use of the backend gpu class in cpps. > > Bug: skia: > Change-Id: I1a28e0e5c2e55562b3fff56c284c3405b5b6d8bc > Reviewed-on: https://skia-review.googlesource.com/20057 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,robertphillips@google.com Change-Id: I5b27d50654a17502c056d59b2d4f9609376d189e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/20064 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Remove Gr*Gpu includes from header files.Gravatar Greg Daniel2017-06-15
| | | | | | | | | | Some general cleanup to try to keep use of the backend gpu class in cpps. Bug: skia: Change-Id: I1a28e0e5c2e55562b3fff56c284c3405b5b6d8bc Reviewed-on: https://skia-review.googlesource.com/20057 Reviewed-by: Robert Phillips <robertphillips@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>
* Setup support for UNIFORM_TEXEL_BUFFER descriptor sets in VulkanGravatar Greg Daniel2017-05-02
| | | | | | | | | | This is the first CL to get support for using texel buffers in vulkan. Bug: skia: Change-Id: Iaac5ba4a356b487bc2b63111cca34ed968881f6b Reviewed-on: https://skia-review.googlesource.com/15100 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@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 GrTextureParams to GrSamplerParamsGravatar Brian Salomon2016-11-17
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4965 Change-Id: I7d52e81c670e92ca96117284f44b274ce3cc3671 Reviewed-on: https://skia-review.googlesource.com/4965 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Fix Vulkan command buffer assert on device lostGravatar Jim Van Verth2016-11-07
| | | | | | | | | | | | BUG=skia:5939 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4483 Change-Id: Id363c4d774095b1707adbe6c8ab537c6e5ecab6c Reviewed-on: https://skia-review.googlesource.com/4483 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Remove GrStencilSettings from GrPipelineGravatar csmartdalton2016-11-01
| | | | | | | | | | | | | | | | Updates the GrPipeline to have user stencil settings instead of actual settings. This allows us to further defer creating and attaching a stencil buffer. This change is a partial step. The ultimate goal is to attach the stencil buffer and create the stencil settings during render target flush, but for the sake of keeping this CL smaller, we create the stencil settings right before use for now. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2468653002 Review-Url: https://codereview.chromium.org/2468653002
* Remove unused resolve parameters for vulkan render passesGravatar Greg Daniel2016-10-03
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2874 Change-Id: Ie8ad608c02e824ba5af2a81ada724dca22ac92e5 Reviewed-on: https://skia-review.googlesource.com/2874 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add GrVkCopyPipeline to handle vulkan copies as drawsGravatar egdaniel2016-09-27
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2274663005 Review-Url: https://codereview.chromium.org/2274663005
* Don't add the resolve attachment to vulkan render passes.Gravatar egdaniel2016-08-26
| | | | | | | | | Also includes some other msaa bug fixes BUG=skia:5127 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2256843002 Review-Url: https://codereview.chromium.org/2256843002
* Add support for getting vulkan descriptor sets without a GrVkUniformHandler.Gravatar egdaniel2016-08-25
| | | | | | | | | | | This change allows us to use the current descriptor set system for doing copies as draws. This is a step towards being able to track resources for draws that don't go through out normal pipeline. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2275633002 Review-Url: https://codereview.chromium.org/2275633002
* Reuse sampler descriptor set allocations in VulkanGravatar egdaniel2016-07-26
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2172873003 Review-Url: https://codereview.chromium.org/2172873003
* Recycle small uniform buffers.Gravatar jvanverth2016-07-22
| | | | | | | BUG=skia:5031 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2159333002 Review-Url: https://codereview.chromium.org/2159333002
* Setup system in Vulkan to reuse VkDescriptorSet allocations.Gravatar egdaniel2016-07-21
| | | | | | | | | | This CL uses the new system for uniform buffers. In a follow up CL I will add support for samplers. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2163673002 Review-Url: https://codereview.chromium.org/2163673002
* Update RT views and framebuffer in vulkan after mipmapingGravatar egdaniel2016-07-13
| | | | | | | | | | | | I've also changed it so all attachment views (texture, color, and resolve) are created separately and not shared with each other. This just added a lot more complexity than we were probably even saving in time. A quick fix to make sure we don't reuse keys in resource tracking also got merged into this change. BUG=skia:5223 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146103002 Review-Url: https://codereview.chromium.org/2146103002
* Only check resource tracking on program shutdown, not context shutdownGravatar jvanverth2016-07-07
| | | | | | | BUG=skia:5496 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2128273002 Review-Url: https://codereview.chromium.org/2128273002
* Vulkan fixes for TesselatingPathRenderer testGravatar jvanverth2016-07-06
| | | | | | | | - Be sure to release all secondard command buffers on shutdown - Allow mapping of static buffers GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2123323002 Review-Url: https://codereview.chromium.org/2123323002
* Grow descriptor pools by 1.5Gravatar egdaniel2016-07-06
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2121243002 Review-Url: https://codereview.chromium.org/2121243002
* Add resource tracking output and command buffer recyclingGravatar jvanverth2016-07-06
| | | | | | | BUG=skia:5042 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2115993002 Review-Url: https://codereview.chromium.org/2115993002
* Add static buffer supportGravatar jvanverth2016-06-30
| | | | | | | | | Put resource tracking check in the right place BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2112653002 Review-Url: https://codereview.chromium.org/2112653002
* Start using GrGpuCommandBuffer in GrDrawTarget.Gravatar egdaniel2016-06-23
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2052263003 Review-Url: https://codereview.chromium.org/2078483002
* Add GpuCommandBuffer support.Gravatar egdaniel2016-06-08
| | | | | | | | | | | | | | | Currently this is not actually hooked into the system. To give some context, in a follow up CL I'll add this to GrDrawTarget. For this I will move the gpu onDraw command to the GpuCommandBuffer as well. For GL this will end up just being a pass through to a non virtual draw(...) on GrGLGpu, and for vulkan it will mostly do what it currently does but adding commands to the secondary command buffer instead. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2038583002 Review-Url: https://codereview.chromium.org/2038583002
* Subclass GrVkCommandBuffer into Primary and Secondary CommandBuffers.Gravatar egdaniel2016-06-08
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2019723002 Review-Url: https://codereview.chromium.org/2019723002
* Add support for finding/creating general GrVkRenderPass from the ↵Gravatar egdaniel2016-06-08
| | | | | | | | | VkResourceProvider. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2035853002 Review-Url: https://codereview.chromium.org/2035853002
* Refactor creation of GrVkRenderPasses to make them move generalGravatar egdaniel2016-06-07
| | | | | | | | | | | | | | | | | | | | | This change is a refactorization to open up more flexable use for render passes in the future. Once we start bundling draw calls into a single render pass we will need to start using specific load and store ops instead of the default currently of load and store everything. We still will need to simply get a compatible render pass for creation of framebuffers and pipeline objects. These render passes don't need to know load and store ops. Thus in this change, I'm defaulting the "compatible" render pass to always be the one which both loads and stores. All other load/store combinations will be created lazily when requested for a specific draw (future change). The CompatibleRPHandle is a way for us to avoid analysing the RenderTarget every time we want to get a new GrVkRenderPass. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1977403002 Review-Url: https://codereview.chromium.org/1977403002
* Unify DescriptorPools for vulkan uniform descriptor setsGravatar egdaniel2016-05-02
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1927943002 Review-Url: https://codereview.chromium.org/1927943002
* Add automatic generation of mipmaps to VulkanGravatar jvanverth2016-04-26
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1916563002 Review URL: https://codereview.chromium.org/1916563002
* 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
* Change VkPipelineStateCahce to use Hash and LRU LList.Gravatar egdaniel2016-03-28
| | | | | | | | | | This simplifies the caching code and forms the base for a caching template that will be easier to use for other objects within Vulkan. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1836863002 Review URL: https://codereview.chromium.org/1836863002
* Set up cache in vulkan to reuse GrVkPrograms (aka VkPipelines)Gravatar egdaniel2016-03-23
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1816153002 Review URL: https://codereview.chromium.org/1816153002
* Add DescriptorPool and set manager to GrVkProgramGravatar egdaniel2016-03-18
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1765923002 Review URL: https://codereview.chromium.org/1765923002
* Add a cache of GrVkSamplers in GrVkResourceProvider.Gravatar egdaniel2016-03-04
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1765523002 Review URL: https://codereview.chromium.org/1765523002
* Use VkPipelineCaches during VkPipeline creationGravatar jvanverth2016-03-02
| | | | | | | BUG=skia:5037 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1756493002 Review URL: https://codereview.chromium.org/1756493002
* Add vulkan files into skia repo. This is an incomplete backend with only ↵Gravatar Greg Daniel2016-02-22
| | | | | | | | | | | | | | partial functionality at this time. R=robertphillips@google.com TBR=bsalomon@google.com BUG=skia:4955 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1718693002 Committed: https://skia.googlesource.com/skia/+/48cf268defad66f58f1aa03b4835e5583be96b2f Review URL: https://codereview.chromium.org/1718693002
* Revert of Add vulkan files into skia repo. (patchset #2 id:20001 of ↵Gravatar egdaniel2016-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1718693002/ ) Reason for revert: breaking builds Original issue's description: > Add vulkan files into skia repo. This is an incomplete backend with only partial functionality at this time. > > R=robertphillips@google.com > TBR=bsalomon@google.com > > BUG=skia:4955 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1718693002 > > Committed: https://skia.googlesource.com/skia/+/48cf268defad66f58f1aa03b4835e5583be96b2f TBR=robertphillips@google.com,bsalomon@google.com,jvanverth@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4955 Review URL: https://codereview.chromium.org/1723503002
* Add vulkan files into skia repo. This is an incomplete backend with only ↵Gravatar Greg Daniel2016-02-22
partial functionality at this time. R=robertphillips@google.com TBR=bsalomon@google.com BUG=skia:4955 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1718693002 Review URL: https://codereview.chromium.org/1718693002