aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk/GrVkTextureRenderTarget.h
Commit message (Collapse)AuthorAge
* Update getBackendInfo calls on GrBackendTexture to support VkImageLayout better.Gravatar Greg Daniel2018-04-10
| | | | | | | | | | | | | | | The big api level change here is that the getBackendInfo calls now return by value instead of a pointer. These changes are being made in support of Vulkan so that the client can update the VkImageLayout on the GrBackendTexture and have that update get reflected in our internal tracking of the image. This is done by storing a ref counted GrVkImageLayout object on the GrBackendTexture and the GrVkImage. Bug: skia: Change-Id: I8c6158fd3a66eb61fef97ebf09ea5364bca3f1ae Reviewed-on: https://skia-review.googlesource.com/119101 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@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>
* Set correct mip map status on GrTexture since we no longer require all mip dataGravatar Greg Daniel2017-10-10
| | | | | | | | Bug: skia: Change-Id: I5074028f307187eef3201523cbd1ddc7d9bf9013 Reviewed-on: https://skia-review.googlesource.com/54102 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Use GrBackendObjectOwnership instead of GrVkImage::WrappedGravatar Greg Daniel2017-08-18
| | | | | | | | | | | This is more in line with what GL does and will make things cleaner for the metal backend as well. Bug: skia: Change-Id: I0ba0c588f813ad78051251c1cb9e8f92fd917ecc Reviewed-on: https://skia-review.googlesource.com/35940 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@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>
* Retract GrTexture*.h & GrRenderTarget*.h from other headersGravatar Robert Phillips2017-06-13
| | | | | | | | | This does push some additional work (& includes) into the .cpp files. Change-Id: I27c847e371802270d13594dcc22aae44039990bb Reviewed-on: https://skia-review.googlesource.com/19660 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* sk_sp-ify GrResourceProvider some moreGravatar Robert Phillips2017-06-05
| | | | | | | | | | I believe this addresses the concerns of this particular bug (although more remains to be done) Bug: skia:5327 Change-Id: Ie82f08f87b3cf3d7986fe4eeb16a5d2553173913 Reviewed-on: https://skia-review.googlesource.com/18599 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove GrSurfaceDesc member from GrSurfaceProxy.Gravatar Brian Salomon2017-05-17
| | | | | | | | | Stores the config, origin, and dimensions in GrSurfaceProxy, sample count in GrRenderTargetProxy, and "was constructed with mip maps" in GrTextureProxy. Change-Id: Iee058674dce49107a991cca9d083cd33e3572809 Reviewed-on: https://skia-review.googlesource.com/17209 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Further centralize computation of GrSurface VRAM consumption - take 2Gravatar Robert Phillips2016-11-07
| | | | | | | | | | | This is the same as https://skia-review.googlesource.com/c/4383/ (Further centralize computation of GrSurface VRAM consumption) but with a suppression for Vulkan in the new test and removal of an assert Chromium was triggering. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4450 Change-Id: Ie87d32fd5f0d35c21326b066a0c733cb6f8a5bea Reviewed-on: https://skia-review.googlesource.com/4450 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Further centralize computation of GrSurface VRAM consumption"Gravatar Ben Wagner2016-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ccd3c8937fce4bb28df19533ed043cad209e277d. Reason for revert: Blocking Chromium roll: https://codereview.chromium.org/2482643002/ Original change's description: > Further centralize computation of GrSurface VRAM consumption > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4383 > > Change-Id: I054b74f2cd15f904f8e05af0fda58d6e8a523eb9 > Reviewed-on: https://skia-review.googlesource.com/4383 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=662630 Change-Id: I186db2a41eb2bd789e6f681b3547e32d9ca374cf Reviewed-on: https://skia-review.googlesource.com/4443 Commit-Queue: Ben Wagner <benjaminwagner@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
* Further centralize computation of GrSurface VRAM consumptionGravatar Robert Phillips2016-11-04
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4383 Change-Id: I054b74f2cd15f904f8e05af0fda58d6e8a523eb9 Reviewed-on: https://skia-review.googlesource.com/4383 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove SkAutoTUnref and SkAutoTDelete from public includes.Gravatar bungeman2016-10-27
| | | | | | | | | | | | | | | This also makes the required changed to src, tests, and tools. The few public APIs modified by this change appear to be unused outside of Skia. Removing these from the public API makes it easier to ensure users are no longer using them. This also updates GrGpu::wrapBackendXXX and the ::onWrapBackendXXX methods to clarify ownership. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2448593002 Review-Url: https://codereview.chromium.org/2448593002
* 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
* Refactor Vulkan image, texture, RTs so that create and getter handles match.Gravatar egdaniel2016-05-13
| | | | | | | | | | This allows allows us to track and notify clients when either side changes and image layout. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1974983002 Review-Url: https://codereview.chromium.org/1974983002
* Refactor to separate backend object lifecycle and GpuResource budget decisionGravatar kkinnunen2016-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor GrGpuResource to contain two different pieces of state: a) instance is budgeted or not budgeted b) instance references wrapped backend objects or not The "object lifecycle" was also attached to backend object handles (ids), which made the code a bit unclear. Backend objects would be associated with GrGpuResource::LifeCycle, even though GrGpuResource::LifeCycle refers to the GpuResource, and individual backend objects in one GpuResource might be governed with different "lifecycle". Mark the budgeted/not budgeted with SkBudgeted::kYes, SkBudgeted::kNo. This was previously GrGpuResource::kCached_LifeCycle, GrGpuResource::kUncached_LifeCycle. Mark the "references wrapped object" with boolean. This was previously GrGpuResource::kBorrowed_LifeCycle, GrGpuResource::kAdopted_LifeCycle for GrGpuResource. Associate the backend object ownership status with GrBackendObjectOwnership for the backend object handles. The resource type leaf constuctors, such has GrGLTexture or GrGLTextureRenderTarget take "budgeted" parameter. This parameter is passed to GrGpuResource::registerWithCache(). The resource type intermediary constructors, such as GrGLTexture constructors for class GrGLTextureRenderTarget do not take "budgeted" parameters, intermediary construtors do not call registerWithCache. Removes the need for tagging GrGpuResource -derived subclass constructors with "Derived" parameter. Makes instances that wrap backend objects be registered with a new function GrGpuResource::registerWithCacheWrapped(). Removes "budgeted" parameter from classes such as StencilAttahment, as they are always cached and never wrap any external backend objects. Removes the use of concept "external" from the member function names. The API refers to the objects as "wrapped", so make all related functions use the term consistently. No change in functionality. Resources referencing wrapped objects are always inserted to the cache with budget decision kNo. BUG=594928 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1862043002 Review URL: https://codereview.chromium.org/1862043002
* 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
* Implement Vulkan GrBackendObject for textures.Gravatar jvanverth2016-03-18
| | | | | | | BUG=skia:5043 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1808263002 Review URL: https://codereview.chromium.org/1808263002
* 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