Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(732)

Issue 6199053: Ganesh custom shader: GrConvolutionEffect (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by TomH
Modified:
12 years, 6 months ago
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Here's GrConvolutionEffect. Passes GM and GLPrograms unit test; Linux GPU benchmarking is noisy, but the numbers don't look much worse there. Current shader output looks like: ... coverage2 = value2 * coverage1; vec4 coverage3; float c3 = dot(vStage3, vStage3) - uRadial2Params3[4]; { // stage 3 Convolution vec4 sum = vec4(0, 0, 0, 0); vec2 coord = vec2((-c3 / vRadial2BCoeff3), 0.5); for (int i = 0; i < 7; i++) { sum += texture2D(uSampler3, coord) * uKernel3[i]; coord += uImageIncrement3; } coverage3 = sum * coverage2; } dualSourceOut = vec4(coverage3); fsColorOut = vec4(matrixedColor * coverage3);

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : Restore flushConvolution() for Morphology's sake #

Patch Set 5 : Now with extra (unit) testiness! #

Patch Set 6 : cleanup #

Total comments: 21

Patch Set 7 : Fix comments that don't require structural changes #

Patch Set 8 : New GrProgramStageFactory.{h,cpp} #

Total comments: 2

Patch Set 9 : Respond to Brian's comments #

Total comments: 13
Unified diffs Side-by-side diffs Delta from patch set Stats (+462 lines, -158 lines) Patch
M gyp/gpu.gyp View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M include/gpu/GrCustomStage.h View 1 2 3 4 5 6 7 3 chunks +16 lines, -6 lines 0 comments Download
M include/gpu/GrSamplerState.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 2 comments Download
M src/gpu/GrContext.cpp View 2 chunks +3 lines, -2 lines 2 comments Download
A src/gpu/GrProgramStageFactory.h View 1 2 3 4 5 6 7 8 1 chunk +50 lines, -0 lines 2 comments Download
A src/gpu/GrProgramStageFactory.cpp View 1 2 3 4 5 6 7 1 chunk +17 lines, -0 lines 0 comments Download
A src/gpu/effects/GrConvolutionEffect.h View 1 2 3 4 5 6 7 1 chunk +41 lines, -0 lines 0 comments Download
A src/gpu/effects/GrConvolutionEffect.cpp View 1 2 3 4 5 6 7 8 1 chunk +257 lines, -0 lines 2 comments Download
M src/gpu/gl/GrGLProgram.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLProgram.cpp View 1 2 3 4 5 6 7 11 chunks +28 lines, -96 lines 2 comments Download
M src/gpu/gl/GrGLProgramStage.h View 1 2 3 4 5 6 7 5 chunks +8 lines, -33 lines 0 comments Download
M src/gpu/gl/GrGLProgramStage.cpp View 1 2 3 4 5 6 7 1 chunk +4 lines, -11 lines 0 comments Download
M src/gpu/gl/GrGpuGLShaders.cpp View 1 2 3 4 5 6 7 7 chunks +26 lines, -7 lines 3 comments Download

Messages

Total messages: 12
TomH
Ready to be torn apart by my discerning coworkers.
12 years, 6 months ago (2012-05-08 21:57:10 UTC) #1
robertphillips
LGTM modulo some minor nits Do we care at all about the human readability of ...
12 years, 6 months ago (2012-05-09 13:54:57 UTC) #2
bsalomon
http://codereview.appspot.com/6199053/diff/8001/src/gpu/GrContext.cpp File src/gpu/GrContext.cpp (right): http://codereview.appspot.com/6199053/diff/8001/src/gpu/GrContext.cpp#newcode300 src/gpu/GrContext.cpp:300: drawState->sampler(0)->setCustomStage( Convolution is pretty heavyweight but as the custom ...
12 years, 6 months ago (2012-05-09 14:02:19 UTC) #3
TomH
Also responded to verbal comments: made factory class name backend-agnostic, moved from gpu/gl/ to its ...
12 years, 6 months ago (2012-05-09 15:44:50 UTC) #4
bsalomon
http://codereview.appspot.com/6199053/diff/8001/src/gpu/GrContext.cpp File src/gpu/GrContext.cpp (right): http://codereview.appspot.com/6199053/diff/8001/src/gpu/GrContext.cpp#newcode300 src/gpu/GrContext.cpp:300: drawState->sampler(0)->setCustomStage( On 2012/05/09 15:44:50, TomH wrote: > Well, we ...
12 years, 6 months ago (2012-05-09 16:00:22 UTC) #5
TomH
On 2012/05/09 16:00:22, bsalomon wrote: > ... Done.
12 years, 6 months ago (2012-05-09 16:24:26 UTC) #6
bsalomon
On 2012/05/09 16:24:26, TomH wrote: > On 2012/05/09 16:00:22, bsalomon wrote: > > ... > ...
12 years, 6 months ago (2012-05-09 16:29:20 UTC) #7
Stephen White
LGTM, assuming it passes the WebKit layout tests. Most of my comments are nits. http://codereview.appspot.com/6199053/diff/1012/include/gpu/GrSamplerState.h ...
12 years, 6 months ago (2012-05-09 19:15:53 UTC) #8
TomH
http://codereview.appspot.com/6199053/diff/1012/include/gpu/GrSamplerState.h File include/gpu/GrSamplerState.h (right): http://codereview.appspot.com/6199053/diff/1012/include/gpu/GrSamplerState.h#newcode293 include/gpu/GrSamplerState.h:293: /// NULL; we need to have a complex ID ...
12 years, 6 months ago (2012-05-09 19:39:39 UTC) #9
bsalomon
We should probably put src/gpu in the gpu target's -I list so that files in ...
12 years, 6 months ago (2012-05-09 21:12:07 UTC) #10
TomH
On 2012/05/09 21:12:07, bsalomon wrote: > We should probably put src/gpu in the gpu target's ...
12 years, 6 months ago (2012-05-10 12:14:31 UTC) #11
TomH
12 years, 6 months ago (2012-05-10 13:36:22 UTC) #12
On 2012/05/10 12:14:31, TomH wrote:
> Closed with r3887.

... and Windows/Mac compiler errors fixed with r3889.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b