aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
Commit message (Collapse)AuthorAge
* Make SkDashPathEffect fail for stroke+fill style (in addition to fill style)Gravatar bsalomon2016-06-09
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2048183002 Review-Url: https://codereview.chromium.org/2048183002
* 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
* Fix mipmap generation on Nexus 5x & 6p devices.Gravatar brianosman2016-06-08
| | | | | | | | | | Just like copyImage, these want the Z range of blit regions to be [0, 1], even for 2D resources where Z should be ignored. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2039913007 Review-Url: https://codereview.chromium.org/2039913007
* Replace targetHasUnifiedMultisampling in GrPB constructorGravatar csmartdalton2016-06-08
| | | | | | | | | | | | Replaces targetHasUnifiedMultisampling with a simpler "useHWAA". Now the code that creates a pipeline builder needs to decide on its own whether it should enable multisampling, rather than relying on the builder to try and guess. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041283002 Review-Url: https://codereview.chromium.org/2041283002
* When setting up a copySurface dst texture make the orientation match the src ↵Gravatar bsalomon2016-06-08
| | | | | | | | | when glBlitFramebuffer requires it BUG=chromium:618122 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2049753002 Review-Url: https://codereview.chromium.org/2049753002
* Fix instances where hwaa was wrong for mixed samplesGravatar csmartdalton2016-06-08
| | | | | | | | | | | Fixes a bug with coverage-AA hairlines where hwaa was unintentionally enabled for mixed samples, and a bug with path stenciling where hwaa was unintentionally disabled for mixed samples. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2043203004 Review-Url: https://codereview.chromium.org/2043203004
* 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
* SkLeanWindows.h: #include "Windows.h" fewer placesGravatar halcanary2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | | $ git grep -l '<windows.h>' include src include/private/SkLeanWindows.h $ git grep -l SkLeanWindows.h | grep '\.h$' include/ports/SkTypeface_win.h include/utils/win/SkHRESULT.h include/utils/win/SkTScopedComPtr.h include/views/SkEvent.h src/core/SkMathPriv.h src/ports/SkTypeface_win_dw.h src/utils/SkThreadUtils_win.h src/utils/win/SkWGL.h The same for `#include <intrin.h>` that was found in SkMath.h. Those functions that needed it are moved to SkMathPriv.h. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041943002 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng Review-Url: https://codereview.chromium.org/2041943002
* Fix dashing bug where hwaa was unintentionally disabledGravatar csmartdalton2016-06-07
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2046483003 Review-Url: https://codereview.chromium.org/2046483003
* Switch to a whitelist for manual mip-map generationGravatar brianosman2016-06-07
| | | | | | | | | | | | | Due to performance regression on various GPUs, we're only going to use the new draw-call based mip-mapper when necessary. Of the bots where we have test coverage, that means Intel and Mac-NVIDIA. We also had failures on our AMD 7770 bots - I'm upgrading the drivers on those two machines, and I'm leaving them out of the whitelist for now. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2042313002 Review-Url: https://codereview.chromium.org/2042313002
* Fix for rare crash in Poly::addEdge().Gravatar senorblanco2016-06-07
| | | | | | | | | | | | Don't add an edge if the bottom vertex was already added, or if an island vertex has a left poly but no right poly. (Sorry for the lack of test, but the only reduction I could create was still a huge path and only crashes in Chrome.) BUG=617907 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2043873005 Review-Url: https://codereview.chromium.org/2043873005
* Make GrShape use the original path when path effect fails.Gravatar bsalomon2016-06-07
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2044793002 Review-Url: https://codereview.chromium.org/2044793002
* 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
* Make GrDashEffect take a AA mode enum.Gravatar bsalomon2016-06-07
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2042923003 Review-Url: https://codereview.chromium.org/2042923003
* Get segment masks from GrShape.Gravatar bsalomon2016-06-07
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2046753002 Review-Url: https://codereview.chromium.org/2046753002
* Make GrShape track the winding direction and starting point for rrect types.Gravatar bsalomon2016-06-06
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2042813002 Review-Url: https://codereview.chromium.org/2042813002
* Add new SkSourceGammaTreatment enum, used in situations like mipmap ↵Gravatar brianosman2016-06-06
| | | | | | | | | construction, where we need to know if we should respect (vs. ignore) the gamma encoding of sRGB tagged images. Plumb that extensively. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2037413002 Review-Url: https://codereview.chromium.org/2037413002
* Remove GrRenderTarget from GrPipelineBuilderGravatar robertphillips2016-06-06
| | | | | | | | | | | | | | | | This used to be "Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder" but has been split into: https://codereview.chromium.org/1993263002/ (Make GrAppliedClip friendless) https://codereview.chromium.org/1997773002/ (Retract GrRenderTarget from GLProgramsTest) https://codereview.chromium.org/1993403002/ (GrSWMaskHelper and GrSoftwarePathRenderer only need the textureProvider (not GrContext)) https://codereview.chromium.org/2004433002/ (Retract GrRenderTarget from GrTestTarget) https://codereview.chromium.org/2015333002/ (Change parameters to GrPipelineBuilder's ctor) https://codereview.chromium.org/2035823002/ (Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1988923002 Review-Url: https://codereview.chromium.org/1988923002
* More Unref GrXPFactory.Gravatar bungeman2016-06-03
| | | | | | | | | | | Not releasing the reference was caught by the Skia asan bot. All remaining occurences of this pattern have been updated. This fixes "Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack". TBR=herb Review-Url: https://codereview.chromium.org/2037243002
* Unref GrXPFactory.Gravatar bungeman2016-06-03
| | | | | | | | Not releasing the reference was caught by asan in the Chromium roll. This fixes "Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack". Review-Url: https://codereview.chromium.org/2037193002
* Plumbing mipmaps to the point of creation.Gravatar cblume2016-06-03
| | | | | | | | | | | | When creating a DeferredTextureImage we may create mipmaps. Those mipmaps need to then be passed along for when the texture is actually created. R=bsalomon@google.com BUG=578304 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2031273002 Review-Url: https://codereview.chromium.org/2031273002
* Make GrClipMaskManager stateless and push GrPipelineBuilder construction ↵Gravatar robertphillips2016-06-03
| | | | | | | | | | | | | downstack This will be followed up with a CL to remove the GrRenderTarget from the GrPipelineBuilder. Split out of: https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder) GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2035823002 Review-Url: https://codereview.chromium.org/2035823002
* Abandon offset support with texel buffersGravatar csmartdalton2016-06-03
| | | | | | | | | | | | We don't seem to require nonzero offsets for texel buffers at this point in time, and requiring this feature greatly reduces the number of desktop clients that can use texel buffers. If we find a use for offsets later we can always add it back as a separate feature. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2036953002 Review-Url: https://codereview.chromium.org/2036953002
* Support ARB extensions for indirect drawingGravatar csmartdalton2016-06-03
| | | | | | | | | | Adds support for the ARB extensions and fixes incorrect logic that was being used on the GL version for indirect drawing. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2038743002 Review-Url: https://codereview.chromium.org/2038743002
* Tessellator: stop copying vertices into Polys and Monotones.Gravatar senorblanco2016-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vertices which are produced by stage 5 of the tesselator are copied into the Polys and MonotonePolys it produces. This is necessary because each vertex may have an arbitrary valence, since it may participate in an arbitrary number of Polys, so we can't use the vertex's prev/next pointers to represent all the Monotones of which this vertex may be a member. However, each Edge can only be a member of two Polys (one on each side of the edge). So by adding two prev/next pointer pairs to each Edge, we can represent each Monotone as a list of edges instead. Then we no longer need to copy the vertices. One wrinkle is that the ear-clipping stage (6) of the tessellator does require prev/next pointers, in order to remove vertices as their ears are clipped. So we convert the edge list into a vertex list during Monotone::emit(), using the prev/next pointers temporarily for that monotone. This change improves performance by 7-20% on a non-caching version of the tessellator, and reduces memory use. Other notes: 1) Polys are initially constructed empty (no edges), but with the top vertex, which is needed for splitting Polys. Edges are added to Polys only after their bottom vertex is seen. 2) MonotonePolys are always constructed with one edge, so we always know their handedness (left/right). MonotonePoly::addEdge() no longer detects when a monotone is "done" (edge of opposite handedness); this is handled by Poly::addEdge(), so MonotonePoly::addEdge() has no return value. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2029243002 Review-Url: https://codereview.chromium.org/2029243002
* Adjust tolerance for when Ganesh stroked-line-as-rect optimization kicks inGravatar robertphillips2016-06-02
| | | | | | | | Some GPUs results look worse for the < 1.0f tolerance (i.e., iPad) GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2035843002 Review-Url: https://codereview.chromium.org/2035843002
* Exclude Mali devices from manual mip-mapping.Gravatar brianosman2016-06-02
| | | | | | | | | With manual mip-mapping, the Nexus 10 is failing the sRGB mip-map test. That suggests a failure in the sRGB implementation (decode after bilerp, possibly?). Using the driver's mip-mapper resolves the unit test issue, at least. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2036763002 Review-Url: https://codereview.chromium.org/2036763002
* Add a caps bit to enable/disable the new manual mip-mapperGravatar brianosman2016-06-02
| | | | | | | | | | Turn it off on Adreno3xx devices, because the small-render-target bug on those devices leads to empty mipmaps for the smallest mips. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2026393004 Review-Url: https://codereview.chromium.org/2026393004
* Manually generated sRGB mipmaps, with successively smaller draws.Gravatar brianosman2016-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dirty GL-generated mipmaps whenever an sRGB texture is used with a new value for TEXTURE_SRGB_DECODE. Add a new test rectangle to the gamma GM that tests that textures are correctly converted to linear before filtering when generating mipmaps. Added a new unit test that alternates how a texture is interpreted (sRGB or not), to verify that we rebuild mipmaps when needed, and that we get the correct results out in both modes. This test originally failed on four of our bots producing incorrect mips in three different ways. I'm not real surprised, but it looks like we can't rely on glGenerateMipmap to do the right thing, in conjunction with TEXTURE_SRGB_DECODE. Instead, actually create mip-chains using a series of draw calls. (My first attempt used glBlitFramebuffer, and that still had bugs on several bots). This approach appears to work correctly on any device that fully supports sRGB. Because the mipmap draws are fairly destructive to state, I had to hoist them out of bindTexture. That means adding a second pass over the texture accesses in the processor, at the very beginning of flush. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1840473002 Review-Url: https://codereview.chromium.org/2007973002
* Handle stroked single line special case in GaneshGravatar robertphillips2016-06-02
| | | | | | | | | | | | | This CL roughly halves the time spent on the captured stroked lines skp. On my Linux desktop it boosts the external benchmark from 2618 to 5007. This is a companion to: https://codereview.chromium.org/2019193002/ (Add new GM to exercise stroked line special case) The idea is to land the GM first so any regressions are visible. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2023693002 Review-Url: https://codereview.chromium.org/2023693002
* 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
* Filter out degenerate contours in GrConvexPolyEffectGravatar lsalzman2016-05-31
| | | | | | | | | | | | | | | | | | | | As noticed in a downstream Firefox bug report https://bugzilla.mozilla.org/show_bug.cgi?id=1255062 If a path such as (moveTo, moveTo, lineTo, lineTo, close) is supplied, and if the non-degenerate contour is convex, the convexity test will pass, and GrConvexPolyEffect will be used. However, the path's raw points are used to build the edge list, which does not filter out degenerate contours. This may cause the polygon to fail to draw. This patch ensures that the degenerate contours are filtered out by using an iterator as the path convexity test does. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2018613003 Review-Url: https://codereview.chromium.org/2018613003
* Fix incorrect sampler locations when using CHROMIUM_bind_uniform_locationGravatar kkinnunen2016-05-30
| | | | | | | | | | Fix incorrect sampler locations when using CHROMIUM_bind_uniform_location. The extension is not used at the moment, though. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2023783002 Review-Url: https://codereview.chromium.org/2023783002
* Change parameters to GrPipelineBuilder's ctorGravatar robertphillips2016-05-28
| | | | | | | | | | This is just plumbing prep to remove the GrRenderTarget from the GrPipelineBuilder. Split out of: https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder) GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2015333002 Review-Url: https://codereview.chromium.org/2015333002
* Don't store resources with a unique key in GrResourceCache's fScratchMapGravatar robertphillips2016-05-24
| | | | | | | | | | | The reasoning here is that resources with a unique key are never selected from fScratchMap and just clog up the search for an available resource. This knocks a 200x loop over the SVGbouncingrects case from 264ms down to 164ms. BUG=603969 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2008083002 Review-Url: https://codereview.chromium.org/2008083002
* Remove sRGB overrides on GrTextureParams. Use GrPaint flags instead.Gravatar brianosman2016-05-24
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002253002 Review-Url: https://codereview.chromium.org/2002253002
* Add Xlib support to viewerGravatar jvanverth2016-05-23
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1999213002 Review-Url: https://codereview.chromium.org/1999213002
* Enable stencil wrap ops on vulkanGravatar egdaniel2016-05-23
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002213002 Review-Url: https://codereview.chromium.org/2002213002
* Enable tri-linear and NPOT-tiling support in VulkanGravatar brianosman2016-05-23
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004123002 Review-Url: https://codereview.chromium.org/2004123002
* Pretend that Adreno4xx doesn't have sRGB write control.Gravatar brianosman2016-05-23
| | | | | | | BUG=skia:5329 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1998953003 Review-Url: https://codereview.chromium.org/1998953003
* GrSWMaskHelper and GrSoftwarePathRenderer only need the textureProvider (not ↵Gravatar robertphillips2016-05-20
| | | | | | | | | | GrContext) This is split out of: https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder) BUG=skia: Review-Url: https://codereview.chromium.org/1993403002
* Add OpenGL context to Viewer.Gravatar jvanverth2016-05-20
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978573003 Committed: https://skia.googlesource.com/skia/+/56a11e4d6f3d436a3c2497c9c9e71a117d78a93f Review-Url: https://codereview.chromium.org/1978573003
* Make GrAtlasTextBlob::run own effects it points to.Gravatar bsalomon2016-05-19
| | | | | | | | | | BUG=chromium:608566 Currently the run has bare pointers and the effects can be destroyed while a run is pointing at them. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1993213003 Review-Url: https://codereview.chromium.org/1993213003
* Retract GrRenderTarget from GLProgramsTestGravatar robertphillips2016-05-19
| | | | | | | | Split out of https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1997773002 Review-Url: https://codereview.chromium.org/1997773002
* Attempt to improve lifetime management of SkGlyphCache in Ganesh atlas text ↵Gravatar bsalomon2016-05-19
| | | | | | | | code. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1983353003 Review-Url: https://codereview.chromium.org/1983353003
* Make GrAppliedClip friendlessGravatar robertphillips2016-05-19
| | | | | | | | | GrAppliedClip is a pretty amiable class but not so good about setting boundaries. It is probably for the best that it breaks things off with GrClipMaskManager before the drama of https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder) begins. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1993263002 Review-Url: https://codereview.chromium.org/1993263002
* Revert of Don't allow uncacheable paths in tessellated path renderer ↵Gravatar bsalomon2016-05-18
| | | | | | | | | | | | | | | | | | | | | (patchset #2 id:20001 of https://codereview.chromium.org/1990793003/ ) Reason for revert: Caused innershapes test to be rendered incorrectly on the N10. This might be a driver bug. Original issue's description: > Don't allow uncacheable paths in tessellated path renderer > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1990793003 > > Committed: https://skia.googlesource.com/skia/+/aebd0fd32f8fde610de03b4f1e6d11ce24bfb73d TBR=senorblanco@google.com,senorblanco@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1993923002
* Don't allow uncacheable paths in tessellated path rendererGravatar bsalomon2016-05-18
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1990793003 Review-Url: https://codereview.chromium.org/1990793003
* Revert of Add OpenGL context to Viewer. (patchset #7 id:120001 of ↵Gravatar jvanverth2016-05-18
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1978573003/ ) Reason for revert: sk_app/WindowContext.cpp is missing. Need to add file and resubmit. Original issue's description: > Add OpenGL context to Viewer. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978573003 > > Committed: https://skia.googlesource.com/skia/+/56a11e4d6f3d436a3c2497c9c9e71a117d78a93f TBR=brianosman@google.com,bsalomon@google.com,djsollen@google.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/1990893002