aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
Commit message (Collapse)AuthorAge
* Add Texture2D and Sampler GrSLTypesGravatar egdaniel2016-07-13
| | | | | | | | | | | | | | | | | | | | | | | | These two new types are in support of Vulkan and the ability to send separate texture and sampler uniforms to the shader. They don't really fit well in the current system, since the current system ties together to idea of intended use and how to emit shader code into the same GrSLType enum. In vulkan, I want the GrGLSLSampler object to be used as a Sampler2D, but when appending its declaration it will emit a Texture2D and sampler object. Our query for GrSLTypeIsSamplerType refers more to the combination of texture and sampler and not just the sampler part. The GrSLTypeIs2DTextureType query is for is a a SamplerType that uses Texture2Ds. My new types don't really fit into either these categories as they are just half of the whole. In some refactoring down the road (possibly connected with SkSL), I suggest we split apart the concept of how we intend to use a GrGLSLSampler (Sampler2D, SamplerBuffer, etc.), from how we actually add it to the code (sampler, texture2D, sampler2D, etc.). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143143002 Review-Url: https://codereview.chromium.org/2143143002
* Add resource provider flag to avoid client-side buffersGravatar csmartdalton2016-07-13
| | | | | | | | | | | | | | | On some platforms, a newly-created buffer was liable to be CPU backed. This would break code that expected a VBO (aka instanced rendering). This change adds an optional flag to GrResourceProvider that requires a buffer to be created in GPU memory. It also moves the CPU backing logic into Gr land in order to properly cache real VBOs on platforms that prefer client-side buffers. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143333002 Review-Url: https://codereview.chromium.org/2143333002
* Fix GL shader sources getting truncated by ADB logGravatar csmartdalton2016-07-13
| | | | | | | | | | Prints the shaders one line at a time so they don't get truncated by the ADB log. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142223003 Review-Url: https://codereview.chromium.org/2142223003
* Begin instanced rendering for simple shapesGravatar csmartdalton2016-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a module that performs instanced rendering and starts using it for a select subset of draws on Mac GL platforms. The instance processor can currently handle rects, ovals, round rects, and double round rects. It can generalize shapes as round rects in order to improve batching. The instance processor also employs new drawing algorithms, irrespective of instanced rendering, that improve GPU-side performance (e.g. sample mask, different triangle layouts, etc.). This change only scratches the surface of instanced rendering. The majority of draws still only have one instance. Future work may include: * Passing coord transforms through the texel buffer. * Sending FP uniforms through instanced vertex attribs. * Using instanced rendering for more draws (stencil writes, drawAtlas, etc.). * Adding more shapes to the instance processor’s repertoire. * Batching draws that have mismatched scissors (analyzing draw bounds, inserting clip planes, etc.). * Bindless textures. * Uber shaders. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2066993003 Committed: https://skia.googlesource.com/skia/+/42eafa4bc00354b132ad114d22ed6b95d8849891 Review-Url: https://codereview.chromium.org/2066993003
* Fix caching of sample locationsGravatar csmartdalton2016-07-06
| | | | | | | | | | | | | | | The original caching logic for sample locations wishfully assumed that the GPU would always use the same sample pattern for render targets that had the same number of samples. It turns out we can't rely on that. This change improves the caching logic to handle mismatched simple patterns with the same count, and adds a unit test that emulates different sample patterns observed on real hardware. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2111423002 Committed: https://skia.googlesource.com/skia/+/09d49a3bfe2d1e652a648ce1ea0962b38d10d166 Review-Url: https://codereview.chromium.org/2111423002
* Revert of Begin instanced rendering for simple shapes (patchset #20 ↵Gravatar ksakamoto2016-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:380001 of https://codereview.chromium.org/2066993003/ ) Reason for revert: This caused static initializer regressions in Chromium (crbug.com/625728). Relevant build logs here: Linux: https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/21849 Mac: https://build.chromium.org/p/chromium/builders/Mac/builds/17350 Relevant lines from the error log: Linux: # InstanceProcessor.cpp GrUniqueKey::GenerateDomain() # InstanceProcessor.cpp gr_instanced::kShapeBufferDomain FAILED linux-release-64/sizes/nacl_helper-si/initializers: actual 8, expected 7, better lower FAILED linux-release-64/sizes/chrome-si/initializers: actual 8, expected 7, better lower Mac: FAILED mac-release/sizes/chrome-si/initializers: actual 2, expected 0, better lower Original issue's description: > Begin instanced rendering for simple shapes > > Adds a module that performs instanced rendering and starts using it > for a select subset of draws on Mac GL platforms. The instance > processor can currently handle rects, ovals, round rects, and double > round rects. It can generalize shapes as round rects in order to > improve batching. The instance processor also employs new drawing > algorithms, irrespective of instanced rendering, that improve GPU-side > performance (e.g. sample mask, different triangle layouts, etc.). > > This change only scratches the surface of instanced rendering. The > majority of draws still only have one instance. Future work may > include: > > * Passing coord transforms through the texel buffer. > * Sending FP uniforms through instanced vertex attribs. > * Using instanced rendering for more draws (stencil writes, > drawAtlas, etc.). > * Adding more shapes to the instance processor’s repertoire. > * Batching draws that have mismatched scissors (analyzing draw > bounds, inserting clip planes, etc.). > * Bindless textures. > * Uber shaders. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2066993003 > > Committed: https://skia.googlesource.com/skia/+/42eafa4bc00354b132ad114d22ed6b95d8849891 NOTREECHECKS=true TBR=bsalomon@google.com,egdaniel@google.com,robertphillips@google.com,csmartdalton@google.com # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=skia: Review-Url: https://codereview.chromium.org/2123693002
* Revert of Fix caching of sample locations (patchset #3 id:40001 of ↵Gravatar rmistry2016-07-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2111423002/ ) Reason for revert: Seems to be causing Chromium roll failures: * https://codereview.chromium.org/2120373003 * https://codereview.chromium.org/2117193002 * https://codereview.chromium.org/2124653002 Original issue's description: > Fix caching of sample locations > > The original caching logic for sample locations wishfully assumed that > the GPU would always use the same sample pattern for render targets > that had the same number of samples. It turns out we can't rely on > that. This change improves the caching logic to handle mismatched > simple patterns with the same count, and adds a unit test that > emulates different sample patterns observed on real hardware. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2111423002 > > Committed: https://skia.googlesource.com/skia/+/09d49a3bfe2d1e652a648ce1ea0962b38d10d166 TBR=bsalomon@google.com,csmartdalton@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/2120403002
* Fix caching of sample locationsGravatar csmartdalton2016-07-04
| | | | | | | | | | | | | | The original caching logic for sample locations wishfully assumed that the GPU would always use the same sample pattern for render targets that had the same number of samples. It turns out we can't rely on that. This change improves the caching logic to handle mismatched simple patterns with the same count, and adds a unit test that emulates different sample patterns observed on real hardware. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2111423002 Review-Url: https://codereview.chromium.org/2111423002
* Begin instanced rendering for simple shapesGravatar csmartdalton2016-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a module that performs instanced rendering and starts using it for a select subset of draws on Mac GL platforms. The instance processor can currently handle rects, ovals, round rects, and double round rects. It can generalize shapes as round rects in order to improve batching. The instance processor also employs new drawing algorithms, irrespective of instanced rendering, that improve GPU-side performance (e.g. sample mask, different triangle layouts, etc.). This change only scratches the surface of instanced rendering. The majority of draws still only have one instance. Future work may include: * Passing coord transforms through the texel buffer. * Sending FP uniforms through instanced vertex attribs. * Using instanced rendering for more draws (stencil writes, drawAtlas, etc.). * Adding more shapes to the instance processor’s repertoire. * Batching draws that have mismatched scissors (analyzing draw bounds, inserting clip planes, etc.). * Bindless textures. * Uber shaders. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2066993003 Review-Url: https://codereview.chromium.org/2066993003
* Remove support for GL discardsGravatar egdaniel2016-06-30
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2112693003 Review-Url: https://codereview.chromium.org/2112693003
* Add a GL cap for instanced rendering to floating pointGravatar csmartdalton2016-06-27
| | | | | | | | | | We have observed on OS X that instanced draws don't always behave correctly when the framebuffer is floating point. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2095183002 Review-Url: https://codereview.chromium.org/2095183002
* Have gpu createTestingOlyBackendTexture know if it is a render target or notGravatar egdaniel2016-06-24
| | | | | | | | | | In Vulkan we need to know at create time of a texture whether or not we will use it as a render target. BUG=skia:5458 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2093943002 Review-Url: https://codereview.chromium.org/2093943002
* Support GL_SAMPLES queries in null contextsGravatar csmartdalton2016-06-23
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2085043002 Committed: https://skia.googlesource.com/skia/+/64b92a59294a2f73448b3fa8f36f39079f032521 Committed: https://skia.googlesource.com/skia/+/57e98530c113066c4c2d9c64505c52dc25e66c00 Review-Url: https://codereview.chromium.org/2085043002
* Start using GrGpuCommandBuffer in GrDrawTarget.Gravatar egdaniel2016-06-23
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2052263003 Review-Url: https://codereview.chromium.org/2078483002
* Revert of Support GL_SAMPLES queries in null contexts (patchset #4 id:60001 ↵Gravatar brianosman2016-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/2085043002/ ) Reason for revert: ASAN failures (including DEPS roll). Original issue's description: > Support GL_SAMPLES queries in null contexts > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2085043002 > > Committed: https://skia.googlesource.com/skia/+/64b92a59294a2f73448b3fa8f36f39079f032521 > Committed: https://skia.googlesource.com/skia/+/57e98530c113066c4c2d9c64505c52dc25e66c00 TBR=bsalomon@google.com,csmartdalton@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/2091773002
* Support GL_SAMPLES queries in null contextsGravatar csmartdalton2016-06-22
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2085043002 Committed: https://skia.googlesource.com/skia/+/64b92a59294a2f73448b3fa8f36f39079f032521 Review-Url: https://codereview.chromium.org/2085043002
* Tab -> spacesGravatar brianosman2016-06-22
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2082393002 Review-Url: https://codereview.chromium.org/2082393002
* Revert of Support GL_SAMPLES queries in null contexts (patchset #2 id:20001 ↵Gravatar brianosman2016-06-22
| | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/2085043002/ ) Reason for revert: Chrome unit tests failing (eg https://codereview.chromium.org/2085243002) Original issue's description: > Support GL_SAMPLES queries in null contexts > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2085043002 > > Committed: https://skia.googlesource.com/skia/+/64b92a59294a2f73448b3fa8f36f39079f032521 TBR=bsalomon@google.com,csmartdalton@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/2089013003
* Support GL_SAMPLES queries in null contextsGravatar csmartdalton2016-06-21
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2085043002 Review-Url: https://codereview.chromium.org/2085043002
* Integers can now be passed as uniforms; needed for passing color count to ↵Gravatar fmenozzi2016-06-21
| | | | | | | | | | fragment shader BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2076143003 Committed: https://skia.googlesource.com/skia/+/cc3a22b369e1a60fa2acf2987f2934baf7c4b198 Review-Url: https://codereview.chromium.org/2076143003
* Support texel and draw-indirect buffers in null GL contextsGravatar csmartdalton2016-06-21
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2081183002 Review-Url: https://codereview.chromium.org/2081183002
* Revert of Integers can now be passed as uniforms (patchset #1 id:1 of ↵Gravatar brianosman2016-06-19
| | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2076143003/ ) Reason for revert: Compile failures on Vulkan platforms (eg https://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Debug-Android_Vulkan) Original issue's description: > Integers can now be passed as uniforms; needed for passing color count to fragment shader > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2076143003 > > Committed: https://skia.googlesource.com/skia/+/cc3a22b369e1a60fa2acf2987f2934baf7c4b198 TBR=tomhudson@google.com,bsalomon@google.com,fmenozzi@google.com # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=skia: Review-Url: https://codereview.chromium.org/2080133002
* Integers can now be passed as uniforms; needed for passing color count to ↵Gravatar fmenozzi2016-06-18
| | | | | | | | | fragment shader BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2076143003 Review-Url: https://codereview.chromium.org/2076143003
* Workaround NVIDIA driver bug with NV_sample_mask_override_coverageGravatar csmartdalton2016-06-15
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2070133002 Review-Url: https://codereview.chromium.org/2070133002
* Better (?) interface for controlling sRGB-ness of mipmaps on GrTextureGravatar brianosman2016-06-13
| | | | | | | | | | | Switch to new SkSourceGammaTreatment type. Move to a separate setter, rather than an optional argument to dirty. Set the flag correctly after uploading CPU-built mips. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2058143002 Review-Url: https://codereview.chromium.org/2058143002
* Move multisampleDisableSupport into GrCapsGravatar csmartdalton2016-06-10
| | | | | | | | | | Non-platform code needs this information in order to make rendering decisions. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2062443002 Review-Url: https://codereview.chromium.org/2062443002
* Fix glDraw*Indirect prototypesGravatar csmartdalton2016-06-09
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2050403002 Review-Url: https://codereview.chromium.org/2050403002
* Add control of manual mipmapping to GrContextOptionsGravatar brianosman2016-06-09
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2054623003 Committed: https://skia.googlesource.com/skia/+/97e398d98928f9497063594ebe633efe2d0f4968 Review-Url: https://codereview.chromium.org/2054623003
* Revert of Add control of manual mipmapping to GrContextOptions (patchset #2 ↵Gravatar mtklein2016-06-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | id:20001 of https://codereview.chromium.org/2054623003/ ) Reason for revert: https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/3481/steps/test_skia%20on%20Ubuntu/logs/stdio ../../../src/gpu/gl/GrGLCaps.cpp:554:25: runtime error: load of value 187, which is not a valid value for type 'bool' SUMMARY: AddressSanitizer: undefined-behavior ../../../src/gpu/gl/GrGLCaps.cpp:554:25 in step returned non-zero exit code: 1 Original issue's description: > Add control of manual mipmapping to GrContextOptions > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2054623003 > > Committed: https://skia.googlesource.com/skia/+/97e398d98928f9497063594ebe633efe2d0f4968 TBR=bsalomon@google.com,brianosman@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/2050373002
* Add control of manual mipmapping to GrContextOptionsGravatar brianosman2016-06-09
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2054623003 Review-Url: https://codereview.chromium.org/2054623003
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* Eliminate special case nvpr batch handlingGravatar cdalton2016-05-12
| | | | | | | | | | Removes drawPathBatch methods from GrDrawTarget and GrDrawContext, and integrates nvpr batches in with all the other batches. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1966763002 Review-Url: https://codereview.chromium.org/1966763002
* Separate user and raw stencil settingsGravatar cdalton2016-05-11
| | | | | | | | | | | | | | | | | | | | | | | | Adds a new GrUserStencilSettings class that describes in abstract terms how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit, etc.). GrPipelineBuilder now only defines the GrUserStencilSettings. When the GrPipeline is finalized, the user stencil settings are then translated into concrete GrStencilSettings. At this point, GrClipMaskManager only needs to tell the GrAppliedClip whether or not there is a stencil clip. It does not need to modify stencil settings and GrPipelineBuilder does not need AutoRestoreStencil. This is one step of the stencil overhaul. In the future it will also allow us to clean up the special case handling for nvpr and the stateful fClipMode member of GrClipMaskManager. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962243002 Committed: https://skia.googlesource.com/skia/+/12dbb3947e1aaf205b4fcf13b40e54e50650eb37 Review-Url: https://codereview.chromium.org/1962243002
* Revert of Separate user and raw stencil settings (patchset #8 id:140001 of ↵Gravatar robertphillips2016-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1962243002/ ) Reason for revert: This seems to be breaking nanobench on the Windows bots with: Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION GrDrawTarget::stencilPath +c7 GrStencilAndCoverPathRenderer::onDrawPath +fd GrDrawContext::internalDrawPath +509 GrDrawContext::drawPath +223 GrBlurUtils::drawPathWithMaskFilter +250 SkGpuDevice::drawPath +2ea SkCanvas::onDrawPath +2e3 SkRecordDraw +2e6 SkBigPicture::playback +e5 SkCanvas::onDrawPicture +12c SkCanvas::drawPicture +145 SkRecordDraw +2e6 SkBigPicture::playback +e5 SkCanvas::onDrawPicture +12c SkCanvas::drawPicture +145 SkRecordDraw +261 SkBigPicture::playback +e5 SkCanvas::onDrawPicture +12c SkCanvas::drawPicture +145 SkMultiPictureDraw::draw +bf SKPBench::drawMPDPicture +1e0 SKPBench::onDraw +34 Benchmark::draw +32 time +92 setup_gpu_bench +6e nanobench_main +77b Original issue's description: > Separate user and raw stencil settings > > Adds a new GrUserStencilSettings class that describes in abstract terms > how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit, > etc.). GrPipelineBuilder now only defines the GrUserStencilSettings. > When the GrPipeline is finalized, the user stencil settings are then > translated into concrete GrStencilSettings. > > At this point, GrClipMaskManager only needs to tell the GrAppliedClip > whether or not there is a stencil clip. It does not need to modify > stencil settings and GrPipelineBuilder does not need > AutoRestoreStencil. > > This is one step of the stencil overhaul. In the future it will also > allow us to clean up the special case handling for nvpr and the > stateful fClipMode member of GrClipMaskManager. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962243002 > > Committed: https://skia.googlesource.com/skia/+/12dbb3947e1aaf205b4fcf13b40e54e50650eb37 TBR=bsalomon@google.com,cdalton@nvidia.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/1969693003
* Disable unpack row length when uploading mipsGravatar ericrk2016-05-10
| | | | | | | | | | | | | | | | | | When uploading multiple mip levels, the current path which uses GL_UNPACK_ROW_LENGTH doesn't work (it fails to reset this value, and is set incorrectly for subsequent mip levels). This leads to crashes as the buffer Skia provides to GL is not sized correctly. This change temporarily disables the GL_UNPACK_ROW_LENGTH path when we are uploading mips. This path was an optimization, so everything should continue working as expected. This is a temporary workaround until we can re-structure the code to set GL_UNPACK_ROW_LENGTH per mip level. BUG=609612 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1965973002 Review-Url: https://codereview.chromium.org/1965973002
* Separate user and raw stencil settingsGravatar cdalton2016-05-10
| | | | | | | | | | | | | | | | | | | | | | Adds a new GrUserStencilSettings class that describes in abstract terms how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit, etc.). GrPipelineBuilder now only defines the GrUserStencilSettings. When the GrPipeline is finalized, the user stencil settings are then translated into concrete GrStencilSettings. At this point, GrClipMaskManager only needs to tell the GrAppliedClip whether or not there is a stencil clip. It does not need to modify stencil settings and GrPipelineBuilder does not need AutoRestoreStencil. This is one step of the stencil overhaul. In the future it will also allow us to clean up the special case handling for nvpr and the stateful fClipMode member of GrClipMaskManager. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962243002 Review-Url: https://codereview.chromium.org/1962243002
* Replace GrStrokeInfo with GrStyle.Gravatar bsalomon2016-05-10
| | | | | | | | | A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f Review-Url: https://codereview.chromium.org/1957363002
* Only enable SRGB write control on desktop GL when SRGB is supported.Gravatar bsalomon2016-05-10
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1961273004 Review-Url: https://codereview.chromium.org/1961273004
* Revert of Replace GrStrokeInfo with GrStyle. (patchset #4 id:160001 of ↵Gravatar bsalomon2016-05-10
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1957363002/ ) Reason for revert: Breaking some bots Original issue's description: > Replace GrStrokeInfo with GrStyle. > > A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 > > Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f TBR=egdaniel@google.com,robertphillips@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1967513002