Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Issue 1001503002: Implement support for mixed sampled render targets (Closed)

Created:
5 years, 9 months ago by vbuzinov
Modified:
5 years, 6 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@mix1
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Implement support for mixed sampled render targets Adds a new FBO type kStencil_MSFBOType that is selected whenever NV_framebuffer_mixed_samples extension is available. In this new FBO type a non-msaa color buffer is created with a multisampled stencil buffer attachment. Replaces numSamples() with separate numColorSamples and numStencilSamples methods in RenderTarget. In mixed samples mode non-MSAA codepaths are used to draw simple shapes, while NVPR-rendered paths and text are rendered with a multisampled stencil. BUG=skia:3177 Committed: https://skia.googlesource.com/skia/+/dded69693dd3779f081326cde24c3954505b129d

Patch Set 1 #

Total comments: 15

Patch Set 2 : Fixes and squash with 3rd commit #

Total comments: 7

Patch Set 3 : Multisampling and other fixes #

Total comments: 7

Patch Set 4 : GrPipelineStage-related changes #

Patch Set 5 : Rebase on top of text context patch 2 #

Total comments: 3

Patch Set 6 : PipelineStage enum relocation #

Total comments: 8

Patch Set 7 : Corrections #

Patch Set 8 : Undo modification in GrPipelineBuilder #

Total comments: 2

Patch Set 9 : GrProcOptInfo bug #

Total comments: 20

Patch Set 10 : kMixedSamples_MSFBOType and applyStencilCoverageModulation #

Patch Set 11 : GrRenderTarget::BufferBits, BackendRTDesc::fFlags and hasMixedSamplesModulation #

Total comments: 17

Patch Set 12 : Rebase and address the comments #

Patch Set 13 : willXPNeedDstCopy check #

Patch Set 14 : Do willNeedDstCopy check inside isAntialias clause #

Patch Set 15 : Fix thinko introduced in change #12: isHWAntialias flag read before being set #

Patch Set 16 : Handle numSamples cases in SkGpuDevice #

Total comments: 1

Patch Set 17 : kHWAntialias_StateBit set too late in GrStencilAndCoverPathRenderer #

Patch Set 18 : Just a rebase #

Patch Set 19 : Rebase #

Patch Set 20 : Rebase #

Patch Set 21 : Rebase #

Patch Set 22 : numColorSamples, numStencilSamples and isStencilBufferMultisampled() #

Patch Set 23 : Rebase #

Total comments: 8

Patch Set 24 : Address comments #

Total comments: 12

Patch Set 25 : Corrections #

Patch Set 26 : Cap check #

Total comments: 4

Patch Set 27 : Disable fDiscardRenderTargetSupport for NV with fms #

Patch Set 28 : Fix build error related to isMultisamped renaming #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -59 lines) Patch
M include/gpu/GrRenderTarget.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +61 lines, -6 lines 0 comments Download
M samplecode/SampleApp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +2 lines, -2 lines 0 comments Download
M src/core/SkMultiPictureDraw.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/GrBlurUtils.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrClipMaskManager.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +3 lines, -3 lines 0 comments Download
M src/gpu/GrContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +2 lines, -1 line 0 comments Download
M src/gpu/GrDrawContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +6 lines, -5 lines 0 comments Download
M src/gpu/GrGpu.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -1 line 0 comments Download
M src/gpu/GrOvalRenderer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +3 lines, -3 lines 0 comments Download
M src/gpu/GrPipelineBuilder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrPipelineBuilder.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrStencilAndCoverPathRenderer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +16 lines, -4 lines 0 comments Download
M src/gpu/GrStencilAndCoverTextContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/GrTexture.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 6 chunks +6 lines, -6 lines 0 comments Download
M src/gpu/effects/GrDashingEffect.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLCaps.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +10 lines, -6 lines 0 comments Download
M src/gpu/gl/GrGLCaps.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 5 chunks +12 lines, -1 line 0 comments Download
M src/gpu/gl/GrGLGpu.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 5 chunks +14 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLRenderTarget.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +6 lines, -5 lines 0 comments Download
M src/gpu/gl/GrGLRenderTarget.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -2 lines 0 comments Download
M src/image/SkSurface_Gpu.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +2 lines, -2 lines 0 comments Download
M tests/GLProgramsTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +1 line, -1 line 0 comments Download
M tests/ResourceCacheTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M tests/SurfaceTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 62 (14 generated)
Chris Dalton
Great! I love how small this is getting. Where's the magic that causes paths to ...
5 years, 9 months ago (2015-03-12 07:43:35 UTC) #2
Chris Dalton
Also: Where is the magic that enables MULTISAMPLE when drawing with nvpr, and disables it ...
5 years, 9 months ago (2015-03-12 08:04:52 UTC) #3
Chris Dalton
https://codereview.chromium.org/1001503002/diff/1/include/gpu/GrRenderTarget.h File include/gpu/GrRenderTarget.h (right): https://codereview.chromium.org/1001503002/diff/1/include/gpu/GrRenderTarget.h#newcode113 include/gpu/GrRenderTarget.h:113: GrSampleConfig sampleConfig = kUnified_GrSampleConfig) I don't think sampleConfig needs ...
5 years, 9 months ago (2015-03-13 03:11:32 UTC) #4
vbuzinov
Some of the comments not addressed yet. New version: squash with 3rd commit, flushHWAAState receives ...
5 years, 9 months ago (2015-03-13 13:37:23 UTC) #5
Chris Dalton
Seva, I've uploaded a new patch that I think will help with the HWAA state: ...
5 years, 9 months ago (2015-03-14 02:51:30 UTC) #6
Chris Dalton
https://codereview.chromium.org/1001503002/diff/20001/src/gpu/GrStencilAndCoverPathRenderer.cpp File src/gpu/GrStencilAndCoverPathRenderer.cpp (right): https://codereview.chromium.org/1001503002/diff/20001/src/gpu/GrStencilAndCoverPathRenderer.cpp#newcode164 src/gpu/GrStencilAndCoverPathRenderer.cpp:164: pipelineBuilder->stencil()->setDisabled(); On 2015/03/14 02:51:30, Chris Dalton wrote: > After ...
5 years, 9 months ago (2015-03-16 07:30:49 UTC) #7
Chris Dalton
Almost there -- this is coming together very nicely. https://codereview.chromium.org/1001503002/diff/40001/src/gpu/GrStencilAndCoverPathRenderer.cpp File src/gpu/GrStencilAndCoverPathRenderer.cpp (right): https://codereview.chromium.org/1001503002/diff/40001/src/gpu/GrStencilAndCoverPathRenderer.cpp#newcode106 src/gpu/GrStencilAndCoverPathRenderer.cpp:106: ...
5 years, 9 months ago (2015-03-16 19:31:24 UTC) #8
Chris Dalton
https://codereview.chromium.org/1001503002/diff/40001/include/gpu/GrRenderTarget.h File include/gpu/GrRenderTarget.h (right): https://codereview.chromium.org/1001503002/diff/40001/include/gpu/GrRenderTarget.h#newcode32 include/gpu/GrRenderTarget.h:32: // GrRenderTarget I've thought about it more, and I ...
5 years, 9 months ago (2015-03-17 00:39:35 UTC) #9
Chris Dalton
Looking good. Sorry I didn't send this sooner. https://codereview.chromium.org/1001503002/diff/80001/include/gpu/GrRenderTarget.h File include/gpu/GrRenderTarget.h (right): https://codereview.chromium.org/1001503002/diff/80001/include/gpu/GrRenderTarget.h#newcode38 include/gpu/GrRenderTarget.h:38: */ ...
5 years, 9 months ago (2015-03-19 12:07:41 UTC) #10
vbuzinov
Moved PipelineStage to GrRenderTarget, adjusted comments
5 years, 9 months ago (2015-03-19 13:04:05 UTC) #11
Chris Dalton
Sorry, one more set of nit picks, mostly about comments. Once these are addressed the ...
5 years, 9 months ago (2015-03-20 07:01:45 UTC) #12
Chris Dalton
lgtm after one final comment https://codereview.chromium.org/1001503002/diff/140001/src/gpu/GrProcOptInfo.h File src/gpu/GrProcOptInfo.h (right): https://codereview.chromium.org/1001503002/diff/140001/src/gpu/GrProcOptInfo.h#newcode60 src/gpu/GrProcOptInfo.h:60: fNeedsCoverageModulation = true; Oops, ...
5 years, 9 months ago (2015-03-23 19:15:37 UTC) #13
vbuzinov
Oops. How did I miss that one! Thanks Chris.
5 years, 9 months ago (2015-03-24 06:25:31 UTC) #14
vbuzinov
Adding Brian - could you take a look? The patch depends on https://codereview.chromium.org/993363002/ and https://codereview.chromium.org/1010113004/
5 years, 9 months ago (2015-03-24 06:34:47 UTC) #16
Mark Kilgard
LGTM https://codereview.chromium.org/1001503002/diff/140001/src/gpu/GrPipeline.cpp File src/gpu/GrPipeline.cpp (right): https://codereview.chromium.org/1001503002/diff/140001/src/gpu/GrPipeline.cpp#newcode55 src/gpu/GrPipeline.cpp:55: optFlags = xferProcessor->getOptimizations(localColorPOI, For Google: enabling/disabling GL_BLEND when ...
5 years, 9 months ago (2015-03-24 14:05:09 UTC) #18
Chris Dalton
https://codereview.chromium.org/1001503002/diff/160001/src/gpu/GrStencilAndCoverPathRenderer.cpp File src/gpu/GrStencilAndCoverPathRenderer.cpp (right): https://codereview.chromium.org/1001503002/diff/160001/src/gpu/GrStencilAndCoverPathRenderer.cpp#newcode71 src/gpu/GrStencilAndCoverPathRenderer.cpp:71: pipelineBuilder->canTweakAlphaForCoverage(); Here too -- may need to check if ...
5 years, 9 months ago (2015-03-26 05:11:39 UTC) #19
bsalomon
WRT Mark's comment about blend disabling: I'll file a bug about this. I think we'll ...
5 years, 8 months ago (2015-03-31 16:37:34 UTC) #21
Chris Dalton
https://codereview.chromium.org/1001503002/diff/160001/include/gpu/GrRenderTarget.h File include/gpu/GrRenderTarget.h (right): https://codereview.chromium.org/1001503002/diff/160001/include/gpu/GrRenderTarget.h#newcode39 include/gpu/GrRenderTarget.h:39: enum PipelineStage { I'm going to try replying inline. ...
5 years, 8 months ago (2015-03-31 19:47:30 UTC) #22
Chris Dalton
https://codereview.chromium.org/1001503002/diff/160001/include/gpu/GrRenderTarget.h File include/gpu/GrRenderTarget.h (right): https://codereview.chromium.org/1001503002/diff/160001/include/gpu/GrRenderTarget.h#newcode39 include/gpu/GrRenderTarget.h:39: enum PipelineStage { Sorry to pollute your inboxes :) ...
5 years, 8 months ago (2015-03-31 22:24:57 UTC) #23
bsalomon
I'm wondering if this should be a property of the render target at all as ...
5 years, 8 months ago (2015-04-01 13:15:36 UTC) #24
Chris Dalton
> it would have to be part of the key even though it isn't an ...
5 years, 8 months ago (2015-04-01 20:34:17 UTC) #25
vbuzinov
Rebase + kMixedSamples_MSFBOType and renamed the xp's flag to applyStencilCoverageModulation. https://codereview.chromium.org/1001503002/diff/160001/include/gpu/GrRenderTarget.h File include/gpu/GrRenderTarget.h (right): https://codereview.chromium.org/1001503002/diff/160001/include/gpu/GrRenderTarget.h#newcode39 ...
5 years, 8 months ago (2015-04-02 13:10:37 UTC) #26
Chris Dalton
Looking good! We still need to resolve the issue where an Xfer processor might use ...
5 years, 8 months ago (2015-04-07 23:48:24 UTC) #27
Mark Kilgard
LGTM with a few comments (see below) great to see this come together https://codereview.chromium.org/1001503002/diff/200001/src/gpu/gl/GrGLCaps.cpp File ...
5 years, 8 months ago (2015-04-08 03:20:09 UTC) #28
Chris Dalton
https://codereview.chromium.org/1001503002/diff/200001/src/gpu/gl/GrGLCaps.cpp File src/gpu/gl/GrGLCaps.cpp (right): https://codereview.chromium.org/1001503002/diff/200001/src/gpu/gl/GrGLCaps.cpp#newcode785 src/gpu/gl/GrGLCaps.cpp:785: if (ctxInfo.hasExtension("GL_NV_framebuffer_mixed_samples")) { We may consider only using MixedSamples ...
5 years, 8 months ago (2015-04-08 04:55:26 UTC) #29
vbuzinov
Uploaded a new version plus please see some comments inline with the previous version. https://codereview.chromium.org/1001503002/diff/200001/include/gpu/GrRenderTarget.h ...
5 years, 8 months ago (2015-04-08 12:05:30 UTC) #30
Mark Kilgard
lgtm
5 years, 8 months ago (2015-04-09 22:09:30 UTC) #31
Chris Dalton
https://codereview.chromium.org/1001503002/diff/340001/src/gpu/GrStencilAndCoverPathRenderer.cpp File src/gpu/GrStencilAndCoverPathRenderer.cpp (right): https://codereview.chromium.org/1001503002/diff/340001/src/gpu/GrStencilAndCoverPathRenderer.cpp#newcode186 src/gpu/GrStencilAndCoverPathRenderer.cpp:186: pipelineBuilder->enableState(GrPipelineBuilder::kHWAntialias_StateBit); Sorry, I think I may have misled you ...
5 years, 8 months ago (2015-04-17 22:05:12 UTC) #34
bsalomon
So thinking about this more, I don't see a good reason to gate this on ...
5 years, 7 months ago (2015-05-11 18:29:21 UTC) #35
Chris Dalton
Just a few comments. Looking good! I think the numColorSamples/numStencilSamples part is a positive change. ...
5 years, 6 months ago (2015-06-09 17:39:52 UTC) #36
Chris Dalton
5 years, 6 months ago (2015-06-09 17:40:49 UTC) #38
vbuzinov
Addressed Chris's comments, currently there is still a problem with uninitialized fShaderCaps. https://codereview.chromium.org/1001503002/diff/500001/src/gpu/gl/GrGLCaps.cpp File src/gpu/gl/GrGLCaps.cpp ...
5 years, 6 months ago (2015-06-10 11:23:27 UTC) #39
Chris Dalton
https://codereview.chromium.org/1001503002/diff/500001/src/gpu/gl/GrGLCaps.h File src/gpu/gl/GrGLCaps.h (right): https://codereview.chromium.org/1001503002/diff/500001/src/gpu/gl/GrGLCaps.h#newcode232 src/gpu/gl/GrGLCaps.h:232: return fMultisampleDisableSupport || fShaderCaps->mixedSamplesSupport(); I guess I was kind ...
5 years, 6 months ago (2015-06-10 19:52:39 UTC) #40
bsalomon
https://codereview.chromium.org/1001503002/diff/500001/include/gpu/GrRenderTarget.h File include/gpu/GrRenderTarget.h (right): https://codereview.chromium.org/1001503002/diff/500001/include/gpu/GrRenderTarget.h#newcode49 include/gpu/GrRenderTarget.h:49: * @return true if the surface is multisampled in ...
5 years, 6 months ago (2015-06-10 19:57:07 UTC) #41
Chris Dalton
https://codereview.chromium.org/1001503002/diff/500001/include/gpu/GrTypes.h File include/gpu/GrTypes.h (right): https://codereview.chromium.org/1001503002/diff/500001/include/gpu/GrTypes.h#newcode535 include/gpu/GrTypes.h:535: enum GrBackendRenderTargetFlags { On 2015/06/10 19:57:06, bsalomon wrote: > ...
5 years, 6 months ago (2015-06-10 20:55:57 UTC) #42
Chris Dalton
https://codereview.chromium.org/1001503002/diff/500001/include/gpu/GrRenderTarget.h File include/gpu/GrRenderTarget.h (right): https://codereview.chromium.org/1001503002/diff/500001/include/gpu/GrRenderTarget.h#newcode91 include/gpu/GrRenderTarget.h:91: return fSampleConfig; Maybe change this to: bool hasMixedSamples() const ...
5 years, 6 months ago (2015-06-11 00:02:29 UTC) #43
vbuzinov
Addressed the comments, see also the comment below regarding glInvalidateFramebuffer workaround. Looks like we can ...
5 years, 6 months ago (2015-06-11 12:30:57 UTC) #44
bsalomon
small request inline, otherwise lgtm https://codereview.chromium.org/1001503002/diff/540001/src/gpu/gl/GrGLGpu.cpp File src/gpu/gl/GrGLGpu.cpp (right): https://codereview.chromium.org/1001503002/diff/540001/src/gpu/gl/GrGLGpu.cpp#newcode1622 src/gpu/gl/GrGLGpu.cpp:1622: this->glCaps().shaderCaps()->mixedSamplesSupport()) { On 2015/06/11 ...
5 years, 6 months ago (2015-06-11 13:33:14 UTC) #45
Chris Dalton
Two small requests from me too https://codereview.chromium.org/1001503002/diff/540001/src/gpu/gl/GrGLCaps.cpp File src/gpu/gl/GrGLCaps.cpp (right): https://codereview.chromium.org/1001503002/diff/540001/src/gpu/gl/GrGLCaps.cpp#newcode240 src/gpu/gl/GrGLCaps.cpp:240: if (kGL_GrGLStandard == ...
5 years, 6 months ago (2015-06-11 23:34:38 UTC) #46
vbuzinov
Added disabling of fDiscardRenderTargetSupport for NV + fms and addressed Chris's comments.
5 years, 6 months ago (2015-06-12 06:00:01 UTC) #47
Chris Dalton
Patch 27 lgtm
5 years, 6 months ago (2015-06-12 14:31:17 UTC) #48
bsalomon
On 2015/06/12 14:31:17, Chris Dalton wrote: > Patch 27 lgtm lgtm too
5 years, 6 months ago (2015-06-12 14:35:03 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1001503002/560001
5 years, 6 months ago (2015-06-12 14:40:05 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: Build-Ubuntu-Clang-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-Clang-x86_64-Debug-Trybot/builds/1501) Build-Ubuntu-GCC-x86_64-Release-Trybot on client.skia.compile (JOB_FAILED, ...
5 years, 6 months ago (2015-06-12 14:41:49 UTC) #54
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1001503002/580001
5 years, 6 months ago (2015-06-12 15:39:10 UTC) #57
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-12 15:55:30 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1001503002/580001
5 years, 6 months ago (2015-06-12 15:59:07 UTC) #61
commit-bot: I haz the power
5 years, 6 months ago (2015-06-12 15:59:50 UTC) #62
Message was sent while issue was closed.
Committed patchset #28 (id:580001) as
https://skia.googlesource.com/skia/+/dded69693dd3779f081326cde24c3954505b129d

Powered by Google App Engine
This is Rietveld 408576698