aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk/GrVkGpuCommandBuffer.cpp
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>
* Reland "Don't require mips in GrTextureProducer if texture is 1x1."Gravatar Greg Daniel2018-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c861eee3a6f1f93ad3df27b8be94f44b245bd128. Reason for revert: Relanding with fix for gray8 not copyable Original change's description: > Revert "Don't require mips in GrTextureProducer if texture is 1x1." > > This reverts commit 5191fd7555d34225ef771ad4cac65bcbbb50a89c. > > Reason for revert: breaking angle > > Original change's description: > > Don't require mips in GrTextureProducer if texture is 1x1. > > > > Bug: chromium:862921 > > Change-Id: I5f3584ad36e160a5a09d0a37e31e147155076b4d > > Reviewed-on: https://skia-review.googlesource.com/142586 > > Reviewed-by: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com > > Change-Id: Iaef7a56b061cb41f4c75ec20d8df77d3e52b194d > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: chromium:862921 > Reviewed-on: https://skia-review.googlesource.com/142600 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com Change-Id: I52378fa43efe2fdf583335f5fa8aa5b04a68ae2f Bug: chromium:862921 Reviewed-on: https://skia-review.googlesource.com/142760 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Don't require mips in GrTextureProducer if texture is 1x1."Gravatar Greg Daniel2018-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5191fd7555d34225ef771ad4cac65bcbbb50a89c. Reason for revert: breaking angle Original change's description: > Don't require mips in GrTextureProducer if texture is 1x1. > > Bug: chromium:862921 > Change-Id: I5f3584ad36e160a5a09d0a37e31e147155076b4d > Reviewed-on: https://skia-review.googlesource.com/142586 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com Change-Id: Iaef7a56b061cb41f4c75ec20d8df77d3e52b194d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:862921 Reviewed-on: https://skia-review.googlesource.com/142600 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Don't require mips in GrTextureProducer if texture is 1x1.Gravatar Greg Daniel2018-07-19
| | | | | | | | | Bug: chromium:862921 Change-Id: I5f3584ad36e160a5a09d0a37e31e147155076b4d Reviewed-on: https://skia-review.googlesource.com/142586 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Some scissor state cleanup."Gravatar Brian Salomon2018-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a219419c9d76432dca74494b611ff1f59086d139. Reason for revert: breaking things Original change's description: > Some scissor state cleanup. > > Separate flushing the enablement of scissor from the rect in GrGLGpu. > > Move GrPipeline::ScissorState to a global enum and use more broadly. > Rename to GrScissorTest to avoid name conflict with existing > GrScissorState. > > Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683 > Reviewed-on: https://skia-review.googlesource.com/137395 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,csmartdalton@google.com Change-Id: If71a5c5efc86d4239b40675bad2a6cb1f77460f8 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/138900 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Some scissor state cleanup.Gravatar Brian Salomon2018-07-02
| | | | | | | | | | | | | Separate flushing the enablement of scissor from the rect in GrGLGpu. Move GrPipeline::ScissorState to a global enum and use more broadly. Rename to GrScissorTest to avoid name conflict with existing GrScissorState. Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683 Reviewed-on: https://skia-review.googlesource.com/137395 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Refactor GrPipeline dynamic state.Gravatar Brian Salomon2018-06-26
| | | | | | | | | | | | | | | | | Remove scissor rect from GrPipeline. Draws can specify "fixed dynamic state" which doesn't use the dynamism at all or can specify dynamic state arrays with an entry per GrMesh. When we state other than scissor rects this will allow the caller to use a mix of truly dynamic and fixed dynamic state. So a caller that only has dynamic scissor rects doesn't need to store its remaining unvarying state in an array. Change-Id: I8fcc07eb600c72a26cc712b185755c2116021a8a Reviewed-on: https://skia-review.googlesource.com/137223 Reviewed-by: Chris Dalton <csmartdalton@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>
* Ensure that textures exported via SkImage::MakeBackendTextureFromSkImageGravatar Brian Salomon2018-06-20
| | | | | | | | | | | have consistent content in their mip map levels. Bug= chromium:850617 Change-Id: I3ad918aa453bd8e4e625eb145de6ba2a5dab7b0c Reviewed-on: https://skia-review.googlesource.com/136230 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Reland "Reland "Require mips to be allocated at texture creation time and ↵Gravatar Greg Daniel2018-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disable late allocations."" This reverts commit 01422bc8eff0c317b9c234b3b4f5a82f1011dfce. Reason for revert: follow on change may be ready Original change's description: > Revert "Reland "Require mips to be allocated at texture creation time and disable late allocations."" > > This reverts commit 9eb36b9eb8e81e970e02fa985ae82fe64de0a8f0. > > Reason for revert: Alpha8 isn't renderable on es2 so we end up dropping draws on certain A8 mip requests > > Original change's description: > > Reland "Require mips to be allocated at texture creation time and disable late allocations." > > > > This reverts commit 0c78238e2991c95b6fb3c945d4ad2b5d941ae21b. > > > > Reason for revert: <INSERT REASONING HERE> > > > > Original change's description: > > > Revert "Require mips to be allocated at texture creation time and disable late allocations." > > > > > > This reverts commit cd2c3f9055452d413d6be7ea6dc63fd1922fe994. > > > > > > Reason for revert: Looks to be causing angle failures on initial clear test > > > > > > Original change's description: > > > > Require mips to be allocated at texture creation time and disable late allocations. > > > > > > > > If we get a non-mipped texture for a draw that wants to be use mip map filter, we > > > > will copy the texture into a new mipped texture. > > > > > > > > Clean up of unused code in the GPU backends for reallocating for mips will be done > > > > in a follow up CL. > > > > > > > > Bug: skia: > > > > Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188 > > > > Reviewed-on: https://skia-review.googlesource.com/132830 > > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > > > > > > > > > Change-Id: I49f0ace52f2586d61b451630b2e6aae84b420b81 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Bug: skia: > > > Reviewed-on: https://skia-review.googlesource.com/133041 > > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > Bug: skia: > > Change-Id: I004447a5f1ec72c3be2318ddea803f57efb12ea4 > > Reviewed-on: https://skia-review.googlesource.com/133340 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com > > Change-Id: I9e9718d380c4d9927ec39e46008750ab7396391f > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/133680 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: Ic3df69f65a89962b21cdb50ee436a29fd121ab1f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/133740 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* 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>
* Revert "Reland "Require mips to be allocated at texture creation time and ↵Gravatar Greg Daniel2018-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disable late allocations."" This reverts commit 9eb36b9eb8e81e970e02fa985ae82fe64de0a8f0. Reason for revert: Alpha8 isn't renderable on es2 so we end up dropping draws on certain A8 mip requests Original change's description: > Reland "Require mips to be allocated at texture creation time and disable late allocations." > > This reverts commit 0c78238e2991c95b6fb3c945d4ad2b5d941ae21b. > > Reason for revert: <INSERT REASONING HERE> > > Original change's description: > > Revert "Require mips to be allocated at texture creation time and disable late allocations." > > > > This reverts commit cd2c3f9055452d413d6be7ea6dc63fd1922fe994. > > > > Reason for revert: Looks to be causing angle failures on initial clear test > > > > Original change's description: > > > Require mips to be allocated at texture creation time and disable late allocations. > > > > > > If we get a non-mipped texture for a draw that wants to be use mip map filter, we > > > will copy the texture into a new mipped texture. > > > > > > Clean up of unused code in the GPU backends for reallocating for mips will be done > > > in a follow up CL. > > > > > > Bug: skia: > > > Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188 > > > Reviewed-on: https://skia-review.googlesource.com/132830 > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > > > > > Change-Id: I49f0ace52f2586d61b451630b2e6aae84b420b81 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: skia: > > Reviewed-on: https://skia-review.googlesource.com/133041 > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Bug: skia: > Change-Id: I004447a5f1ec72c3be2318ddea803f57efb12ea4 > Reviewed-on: https://skia-review.googlesource.com/133340 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I9e9718d380c4d9927ec39e46008750ab7396391f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/133680 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Reland "Require mips to be allocated at texture creation time and disable ↵Gravatar Greg Daniel2018-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | late allocations." This reverts commit 0c78238e2991c95b6fb3c945d4ad2b5d941ae21b. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Require mips to be allocated at texture creation time and disable late allocations." > > This reverts commit cd2c3f9055452d413d6be7ea6dc63fd1922fe994. > > Reason for revert: Looks to be causing angle failures on initial clear test > > Original change's description: > > Require mips to be allocated at texture creation time and disable late allocations. > > > > If we get a non-mipped texture for a draw that wants to be use mip map filter, we > > will copy the texture into a new mipped texture. > > > > Clean up of unused code in the GPU backends for reallocating for mips will be done > > in a follow up CL. > > > > Bug: skia: > > Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188 > > Reviewed-on: https://skia-review.googlesource.com/132830 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > Change-Id: I49f0ace52f2586d61b451630b2e6aae84b420b81 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/133041 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> Bug: skia: Change-Id: I004447a5f1ec72c3be2318ddea803f57efb12ea4 Reviewed-on: https://skia-review.googlesource.com/133340 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Require mips to be allocated at texture creation time and disable ↵Gravatar Greg Daniel2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | late allocations." This reverts commit cd2c3f9055452d413d6be7ea6dc63fd1922fe994. Reason for revert: Looks to be causing angle failures on initial clear test Original change's description: > Require mips to be allocated at texture creation time and disable late allocations. > > If we get a non-mipped texture for a draw that wants to be use mip map filter, we > will copy the texture into a new mipped texture. > > Clean up of unused code in the GPU backends for reallocating for mips will be done > in a follow up CL. > > Bug: skia: > Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188 > Reviewed-on: https://skia-review.googlesource.com/132830 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I49f0ace52f2586d61b451630b2e6aae84b420b81 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/133041 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Require mips to be allocated at texture creation time and disable late ↵Gravatar Greg Daniel2018-06-07
| | | | | | | | | | | | | | | | allocations. If we get a non-mipped texture for a draw that wants to be use mip map filter, we will copy the texture into a new mipped texture. Clean up of unused code in the GPU backends for reallocating for mips will be done in a follow up CL. Bug: skia: Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188 Reviewed-on: https://skia-review.googlesource.com/132830 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add discard check when deciding if we should execute op list or not.Gravatar Greg Daniel2018-04-20
| | | | | | | | Bug: skia:7828 Change-Id: I339ba64b6312cd9444cd4faffd426d91852774e9 Reviewed-on: https://skia-review.googlesource.com/122784 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Don't emit empty command buffers in vulkanGravatar Greg Daniel2018-03-17
| | | | | | | | | | This may just cause use to do unneed loading and storing of memory. Bug: skia: Change-Id: I3f23d91df95f6e79b834fbb595ad9e9fb4371f9a Reviewed-on: https://skia-review.googlesource.com/114793 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Correctly discard or load RT when doing copies as draws in VulkanGravatar Greg Daniel2018-03-16
| | | | | | | | | | | This fixes all the copy as draw issues we've had with certain devices and the cap is no longer needed. Bug: skia: Change-Id: Id0b750849c4c920beae2d8cb3eda5f402018f194 Reviewed-on: https://skia-review.googlesource.com/114860 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make sure we do a render pass load if we copied to a surface before handGravatar Greg Daniel2018-03-16
| | | | | | | | Bug: skia: Change-Id: I4858e0774956f6283122bf71c84f3c6161e1d349 Reviewed-on: https://skia-review.googlesource.com/114790 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Fix vulkan layout barriers when we are doing in line uploads.Gravatar Greg Daniel2018-03-16
| | | | | | | | Bug: skia: Change-Id: I0842a4eebba8cfa8310d0680941d59f1e363e574 Reviewed-on: https://skia-review.googlesource.com/114760 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Make sure we add render target mem barriers after any last second copiesGravatar Greg Daniel2018-02-27
| | | | | | | | Bug: skia: Change-Id: I67e6e6a026145ecbd7476fbf201ce07e053c337d Reviewed-on: https://skia-review.googlesource.com/110622 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Track dirty rects on GrRenderTargets in native space rather than origin-relativeGravatar Brian Salomon2018-02-09
| | | | | | | Change-Id: Icccf2fcb5d468696c42c5a0ccf405e30e5e9bc65 Reviewed-on: https://skia-review.googlesource.com/105980 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Implement window rectangles in vulkan"Gravatar Jim Van Verth2017-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 94c0468b2b4255e3beed81efdcfbf6d9d39e11e4. Reason for revert: <INSERT REASONING HERE> Original change's description: > Implement window rectangles in vulkan > > Bug: skia: > Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a > Reviewed-on: https://skia-review.googlesource.com/65423 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com Change-Id: I5a90cb57fb5d4bcf8c7e76a5f71a7f16edbaf6be No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/67060 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Implement window rectangles in vulkanGravatar Chris Dalton2017-11-02
| | | | | | | | | Bug: skia: Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a Reviewed-on: https://skia-review.googlesource.com/65423 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove deferred upload types from GrDrawOp.h.Gravatar Brian Salomon2017-10-30
| | | | | | | | | This is motivated by exposing these to an upcoming atlas text rendering API that doesn't use ops. Change-Id: Id034dd43d13bc96fe1350fc6d8f699477bb74a05 Reviewed-on: https://skia-review.googlesource.com/65060 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* Use enum to track MipMapsStatus throughout Texture creationGravatar Greg Daniel2017-10-12
| | | | | | | | Bug: skia: Change-Id: I1de1105d74b45f7b02ff52e6b8333801d98ef1ce Reviewed-on: https://skia-review.googlesource.com/58501 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@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>
* Push full screen clears up to OpListGravatar Robert Phillips2017-08-30
| | | | | | | Change-Id: Icfc09b3b25f4d3834bee93286e2b24a559f44ed8 Reviewed-on: https://skia-review.googlesource.com/40120 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove origin field from GrSurface (take 2)Gravatar Robert Phillips2017-08-29
| | | | | | | | | | | | | This mainly consists of rm origin from GrSurface and the wrapBackEnd* methods and then re-adding an explicit origin parameter to all the GrGpu methods that need it. TBR=bsalomon@google.com Change-Id: I4248b2a4749ef844da4233ce53b0dc504bc9eb74 Reviewed-on: https://skia-review.googlesource.com/30280 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Store discard request on the opList and remove GrDiscardOp (take 3)Gravatar Robert Phillips2017-08-29
| | | | | | | | Change-Id: Ided58e0110b0b4e611ab65f46c18a6ae2b85f1bc Reviewed-on: https://skia-review.googlesource.com/39340 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Store discard request on the opList and remove GrDiscardOp (take 2)"Gravatar Robert Phillips2017-08-25
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9b0b32fda4871776eb9afdf9553e523e5c28aa63. Reason for revert: Android_Vulkan Gold images are broken Original change's description: > Store discard request on the opList and remove GrDiscardOp (take 2) > > Change-Id: I2f1bd6f8547895cc8d66cfde42d7d890441d198e > Reviewed-on: https://skia-review.googlesource.com/33460 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,robertphillips@google.com Change-Id: I1470d88c2407864da8b6ebdc119c8c2466a2a6c6 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/39000 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Store discard request on the opList and remove GrDiscardOp (take 2)Gravatar Robert Phillips2017-08-25
| | | | | | | Change-Id: I2f1bd6f8547895cc8d66cfde42d7d890441d198e Reviewed-on: https://skia-review.googlesource.com/33460 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make Copy Ops to go through GpuCommandBuffer instead of straigt to GPU.Gravatar Greg Daniel2017-08-24
| | | | | | | | Bug: skia: Change-Id: I4eae4507e07278997e26419e94586eef0780c423 Reviewed-on: https://skia-review.googlesource.com/38361 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove fStencilClearValue from Vulkan's CommandBufferInfo structGravatar Robert Phillips2017-08-10
| | | | | | | | | | | Adding this extra field to the CommandBufferInfo may or may not have led to a memory regression. Remove it until it is actually needed. Change-Id: Ibdddbeb7625f91f5199584a575289f07f6e95304 Reviewed-on: https://skia-review.googlesource.com/33280 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Store discard request on the opList and remove GrDiscardOp"Gravatar Robert Phillips2017-08-09
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit b681a0f1b0acebe36130fd463d14016d48295b97. Reason for revert: Seems to be messing up some MacMini & Nexus7 bots Original change's description: > Store discard request on the opList and remove GrDiscardOp > > Change-Id: Ic1f76bb91c16b23df1fe71c07a4d5ad5abf1dc26 > Reviewed-on: https://skia-review.googlesource.com/32640 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I8a89fae7bb11791bd023d7444a074bb34d006fd0 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/32704 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Store discard request on the opList and remove GrDiscardOpGravatar Robert Phillips2017-08-09
| | | | | | | Change-Id: Ic1f76bb91c16b23df1fe71c07a4d5ad5abf1dc26 Reviewed-on: https://skia-review.googlesource.com/32640 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix stencil clear load in VulkanGravatar Robert Phillips2017-08-09
| | | | | | | | | | A later clear call was nuking the stencil clear load setting. Bug: skia:6936 Change-Id: Ib2c5cd930273cd6e613ca7191f8b7806abe6c218 Reviewed-on: https://skia-review.googlesource.com/32541 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Store GrRenderTarget in GrGpuCommandBufferGravatar Robert Phillips2017-08-09
| | | | | | | Change-Id: I545d53ffb5f9d450b87a360516b03bdd47232a70 Reviewed-on: https://skia-review.googlesource.com/32460 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add explicit clear of stencil buffer before opLists that use themGravatar Robert Phillips2017-08-08
| | | | | | | | Change-Id: I9e2468e1331c6593dbc6da3ad510f08d1c589e8d Reviewed-on: https://skia-review.googlesource.com/32041 Commit-Queue: Stan Iliev <stani@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add GrDebugMarkerOpGravatar Robert Phillips2017-08-08
| | | | | | | Change-Id: I948838dea13d2f36194ca1043ab37e72759794e0 Reviewed-on: https://skia-review.googlesource.com/31740 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Remove origin field from GrSurface"Gravatar Robert Phillips2017-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit df0e09feacb29290fe94d37f921731b18f2edae0. Reason for revert: Experimental revert to see if this is blocking the roll Original change's description: > Remove origin field from GrSurface > > This mainly consists of rm origin from GrSurface and the wrapBackEnd* > methods and then re-adding an explicit origin parameter to all the > GrGpu methods that need it. > > Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18 > Reviewed-on: https://skia-review.googlesource.com/26363 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Id606aa01e84e2b83be71d833eefca477c1ad0d01 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/29220 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove origin field from GrSurfaceGravatar Robert Phillips2017-07-31
| | | | | | | | | | | This mainly consists of rm origin from GrSurface and the wrapBackEnd* methods and then re-adding an explicit origin parameter to all the GrGpu methods that need it. Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18 Reviewed-on: https://skia-review.googlesource.com/26363 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make GrGpuCommandBuffer's methods take a GrRenderTargetProxy (rather than a ↵Gravatar Robert Phillips2017-07-28
| | | | | | | | | | | | | | | | | | | | GrRenderTarget) In https://skia-review.googlesource.com/c/26363/ (Remove origin field from GrSurface) I just passed an extra GrSurfaceOrigin parameter to all these methods. Besides being verbose this also led to the "discard" method having an origin (to support the GrVkGpuCommandBuffer). It think this approach is better and is plausible if the GrGpuCommandBuffer is viewed as an intermediary between the GrProxy-based Ops and the Gpu. In isolation this CL doesn't really show why we want to percolate the Proxy down. Once GrSurface no longer has an origin a lot of the GrGpu methods need it passed in explicitly. By having the GrGpuCommandBuffer get the proxy it can then pass the origin to GrGpu and removes a layer of functions with an extra origin parameter. Change-Id: Ie223fdee930171a32a5923155a0322e9a9c2aaa9 Reviewed-on: https://skia-review.googlesource.com/27980 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make GrPipeline hold a GrRenderTargetProxy (instead of a GrRenderTarget)Gravatar Robert Phillips2017-07-26
| | | | | | | | | | | In a future world where GrSurface no longer has an origin it will be useful for the GrPipeline to be holding the GrRenderTargetProxy (which will still have an origin). Change-Id: I743a8cc07b6b92f8116227fb77b7c37da43cde8a Reviewed-on: https://skia-review.googlesource.com/26804 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Introduce dynamic pipeline stateGravatar Chris Dalton2017-06-07
| | | | | | | | | | | | | | Adds a DynamicState struct to GrPipeline that has a field for the scissor rect. Eventually this should become the only way to specify a scissor rectangle and may grow to contain more fields. Adds an array of DynamicStates to GrGpuCommandBuffer::draw and implements support in GL and Vulkan. Bug: skia: Change-Id: If5aebbf9da5d192acf7e68e7def4674ffc7ec310 Reviewed-on: https://skia-review.googlesource.com/18510 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@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>
* Fix glDrawRangeElementsGravatar Chris Dalton2017-05-30
| | | | | | | | | | | | | | | | | | Adds explicit min/max index value fields to GrMesh. This eliminates the previous assumption that the index values were within the range [0..vertexCount-1]. In the pattern case we still maintain this assumption. Updates GrMesh to hide its fields and handle its new complexity using a "helper" interface instead. Adds a unit test for GrMesh. Bug: skia: Change-Id: Ia23de72d510f8827cee56072b727fb70a6e46b8d Reviewed-on: https://skia-review.googlesource.com/17964 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Convert DstTexture to DstProxy (take 2)Gravatar Robert Phillips2017-05-29
| | | | | | | | | | | | | The last GrTexture-based TextureSampler::reset call must be removed before the TextureSamplers can become purely GrTextureProxy-backed Reland of: https://skia-review.googlesource.com/c/16908/ (Convert DstTexture to DstProxy) Split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) Change-Id: I3a497b6a950fad899f23882c0a9552894ef640f8 Reviewed-on: https://skia-review.googlesource.com/17205 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revise system for checking for uninstantiated proxiesGravatar Robert Phillips2017-05-29
| | | | | | | | | | | | | | The new pattern is: we will "instantiate" pipelines at flush time at flush time we will only access the backing GrSurface by peeking If instantiation fails we should never try to access the GrSurfaces Change-Id: I87f7ff41bd0e84d9ca3dbdd61d3361d3d4ceefd6 Reviewed-on: https://skia-review.googlesource.com/17932 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>