ANGLE generates GL_POINTS geometry shader even if it isn't used |
||||
Issue descriptionI'm not sure why, but ANGLE always generates the GL_POINTS geometry shader when linking the program. In my testing this takes over 1/3rd of the linking time (apparently compiling geometry shaders is slow) and we don't seem to use the shader anyway with shaders generated by skia. Maybe there's some way to avoid compiling it unless it's absolutely necessary. This would help the browser's cold startup time when the binary program cache has been cleared.
,
Sep 21 2016
One note is deferred compiles might interact with the shader cache. Point sprite shaders might not get cached if the shader binary is pulled immediately after linking, and end up being recompiled every use. This could be fixed when we move to the pass-through command buffer if we move the shader caching entirely into ANGLE.
,
Sep 21 2016
Actually John, I mistakenly thought we generate the geometry shader always. It looks as though we only generate if the GS if the shader uses gl_PointSize. Can you confirm you can't remove gl_PointSize when you're drawing triangles/lines? It could be a case of an ubershader or something like that, that you use for points and tris, but if it's not, you should be able to avoid the compile by removing any use of gl_PointSize.
,
Sep 21 2016
Skia inserts gl_PointSize even when we're not drawing points in order to not have to recreate nearly identical shaders specifically for points. We could change that behavior. Points are rare.
,
Sep 21 2016
Well, that would allow us to keep the caching behaviour for point sprite shaders the same, so I'd vote for Skia to skip gl_PointSize for non-point shaders if possible.
,
Sep 21 2016
Another possibility is to defer the ANGLE compile, and give ANGLE a mechanism to tell Chromium that a shader needs to be re-cached. I'd worry that this might be finicky to get right, but it should be possible.
,
Sep 21 2016
The following revision refers to this bug: https://skia.googlesource.com/skia.git/+/2eda5b3a65f54105ae3776160373eed5500c515f commit 2eda5b3a65f54105ae3776160373eed5500c515f Author: bsalomon <bsalomon@google.com> Date: Wed Sep 21 17:53:24 2016 Conditionally insert gl_PointSize into shaders. BUG= chromium:648816 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358843002 Review-Url: https://codereview.chromium.org/2358843002 [modify] https://crrev.com/2eda5b3a65f54105ae3776160373eed5500c515f/src/gpu/GrProgramDesc.cpp [modify] https://crrev.com/2eda5b3a65f54105ae3776160373eed5500c515f/src/gpu/GrProgramDesc.h [modify] https://crrev.com/2eda5b3a65f54105ae3776160373eed5500c515f/src/gpu/gl/GrGLGpu.cpp [modify] https://crrev.com/2eda5b3a65f54105ae3776160373eed5500c515f/src/gpu/gl/GrGLGpu.h [modify] https://crrev.com/2eda5b3a65f54105ae3776160373eed5500c515f/src/gpu/gl/GrGLGpuProgramCache.cpp [modify] https://crrev.com/2eda5b3a65f54105ae3776160373eed5500c515f/src/gpu/gl/GrGLPathRendering.cpp [modify] https://crrev.com/2eda5b3a65f54105ae3776160373eed5500c515f/src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp [modify] https://crrev.com/2eda5b3a65f54105ae3776160373eed5500c515f/src/gpu/instanced/GLInstancedRendering.cpp [modify] https://crrev.com/2eda5b3a65f54105ae3776160373eed5500c515f/src/gpu/vk/GrVkPipelineState.cpp
,
Sep 21 2016
,
Sep 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4a35aa63801770012471d58b6d400bfd635c83f1 commit 4a35aa63801770012471d58b6d400bfd635c83f1 Author: skia-deps-roller <skia-deps-roller@chromium.org> Date: Wed Sep 21 22:31:03 2016 Roll src/third_party/skia/ e4a9bd79c..0e4a466a6 (12 commits). https://chromium.googlesource.com/skia.git/+log/e4a9bd79c676..0e4a466a613f $ git log e4a9bd79c..0e4a466a6 --date=short --no-merges --format='%ad %ae %s' 2016-09-21 bsalomon Use sk_careful_memcpy when writing optional conic weights for GrShape path data key. 2016-09-21 bsalomon Add optional sw generated path coverage mask caching 2016-09-21 reed allow clip calls w/o op param, remove unnecessary kReplace ops 2016-09-21 robertphillips Remove unused SkImage_Base and SkImage_Gpu onNewSurface methods GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2353403002 2016-09-21 bsalomon Conditionally insert gl_PointSize into shaders. 2016-09-21 jvanverth Always use transfer_dst for buffers. 2016-09-21 mtklein Build tools on NoGPU bots. 2016-09-21 brianosman Add a transient image filter cache to SkImage::makeWithFilter & PDF 2016-09-21 mtklein GN: is_skia_standalone 2016-09-21 caryclark fix skia pathops fuzzers 2016-09-21 bsalomon Make GrShape compute keys for short paths from path data instead of using the gen id. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357643002 2016-09-21 bsalomon Stop closing filled paths in GrShape BUG= 648816 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel TBR=borenet@google.com Review-Url: https://codereview.chromium.org/2358963002 Cr-Commit-Position: refs/heads/master@{#420183} [modify] https://crrev.com/4a35aa63801770012471d58b6d400bfd635c83f1/DEPS
,
Sep 21 2016
,
Sep 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4a35aa63801770012471d58b6d400bfd635c83f1 commit 4a35aa63801770012471d58b6d400bfd635c83f1 Author: skia-deps-roller <skia-deps-roller@chromium.org> Date: Wed Sep 21 22:31:03 2016 Roll src/third_party/skia/ e4a9bd79c..0e4a466a6 (12 commits). https://chromium.googlesource.com/skia.git/+log/e4a9bd79c676..0e4a466a613f $ git log e4a9bd79c..0e4a466a6 --date=short --no-merges --format='%ad %ae %s' 2016-09-21 bsalomon Use sk_careful_memcpy when writing optional conic weights for GrShape path data key. 2016-09-21 bsalomon Add optional sw generated path coverage mask caching 2016-09-21 reed allow clip calls w/o op param, remove unnecessary kReplace ops 2016-09-21 robertphillips Remove unused SkImage_Base and SkImage_Gpu onNewSurface methods GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2353403002 2016-09-21 bsalomon Conditionally insert gl_PointSize into shaders. 2016-09-21 jvanverth Always use transfer_dst for buffers. 2016-09-21 mtklein Build tools on NoGPU bots. 2016-09-21 brianosman Add a transient image filter cache to SkImage::makeWithFilter & PDF 2016-09-21 mtklein GN: is_skia_standalone 2016-09-21 caryclark fix skia pathops fuzzers 2016-09-21 bsalomon Make GrShape compute keys for short paths from path data instead of using the gen id. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357643002 2016-09-21 bsalomon Stop closing filled paths in GrShape BUG= 648816 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel TBR=borenet@google.com Review-Url: https://codereview.chromium.org/2358963002 Cr-Commit-Position: refs/heads/master@{#420183} [modify] https://crrev.com/4a35aa63801770012471d58b6d400bfd635c83f1/DEPS
,
Sep 22 2016
,
Sep 22 2016
Thanks Brian! |
||||
►
Sign in to add a comment |
||||
Comment 1 by jmad...@chromium.org
, Sep 21 2016Status: Assigned (was: Available)