aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk/GrVkRenderTarget.cpp
Commit message (Collapse)AuthorAge
* Centralize computation of GrRenderTarget & GrTexture VRAM consumptionGravatar Robert Phillips2016-11-03
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4310 Change-Id: I676749ecf1e489f825799b619a15a45fc7dcd219 Reviewed-on: https://skia-review.googlesource.com/4310 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@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
* In VulkanWindowContext add check to see if ganesh changed the layout of the ↵Gravatar egdaniel2016-08-31
| | | | | | | | image. BUG=skia: Review-Url: https://codereview.chromium.org/2299663002
* Add some copy support for vulkan msaaGravatar egdaniel2016-08-31
| | | | | | | | | | | | | | This allows us to do copies from: msaa->msaa with same sample count msaa->no-msaa with a resolve Still missing support for no-msaa to msaa which will require a copyAsDraw which is currently stalled and fixing possible driver bugs. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2294533002 Review-Url: https://codereview.chromium.org/2294533002
* 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 flag for window rectangles to GrRenderTargetGravatar csmartdalton2016-08-10
| | | | | | | | | | | Adds a flag to GrRenderTarget that indicates whether it can be used with window rectangles. Also attempts to clean up some of the mixed samples API. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225303002 Review-Url: https://codereview.chromium.org/2225303002
* 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 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
* Add offset to memory allocationsGravatar jvanverth2016-06-01
| | | | | | | | | | | This is setting up for suballocations within one large allocation BUG=skia:5031 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2018933004 TBR=bsalomon@google.com Review-Url: https://codereview.chromium.org/2018933004
* Fix msaa on GrVkRenderTargetGravatar egdaniel2016-05-13
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1977113002 Review-Url: https://codereview.chromium.org/1977113002
* 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
* Apply setImageLayout() to all of a VkImage's subresources.Gravatar jvanverth2016-05-03
| | | | | | | | | | | This also adds fLevelCount to GrVkImage::Resource, which allows clients to wrap mipmapped textures. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1943933002 TBR=bsalomon@google.com Review-Url: https://codereview.chromium.org/1943933002
* 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
* 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
* Update min Vulkan version to 1.0.8.0, and fix various bugsGravatar egdaniel2016-04-21
| | | | | | | | | | | | | | | | | | | | With updating the SDK, the debug layers also showed multiple bugs. I have fixed those as well in this CL. These include: 1. Incorrectly tracking the allocated descriptor sets from the descriptor pools 2. Using MemoryBarriers inside render passes. 3. Correctly setting the Stencil Image layout anytime we are using a render pass with a stencil attachment 4. Setting the correct aspect mask for Depth/Stencil in a barrier. TBR=bsalomon@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1906623002 Review URL: https://codereview.chromium.org/1906623002
* 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
* Fix borrowed GrVkImage::Resource.Gravatar jvanverth2016-03-22
| | | | | | | | | | | | With the current system, if we wrap a given GrVkTextureInfo*, add a command using it to the command buffer, then delete the texture, the command buffer will unref the GrVkImage::Resource when it's done, which will delete the VkImage and VkDeviceMemory. This subclasses GrVkImage::Resource for those cases, and will not delete the data on an unref. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1824123002 Review URL: https://codereview.chromium.org/1824123002
* 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
* Implement various vulkan stencil clears and fix various stenciling bugs.Gravatar egdaniel2016-03-01
| | | | | | | BUG=skia:4973 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1755753002 Review URL: https://codereview.chromium.org/1755753002
* 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