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

Issue 367643004: Implement NVPR on GLES (Closed)

Created:
6 years, 5 months ago by Kimmo Kinnunen
Modified:
6 years, 3 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@02-path-program-fragment
Project:
skia
Visibility:
Public.

Description

Implement NV_path_rendering on OpenGL ES Implement support for NV_path_rendering on OpenGL ES. Use glProgramPathFragmentInputGenNV function call instead of glPathTexGenNV to communicate transforms to fragment shader. The intention is that the NVPR paths will be drawn with the same shader program as non-NVPR geometry. For NVPR calls, the GPU will skip the vertex shader and just run the fragment shader. After program is linked, query the locations of the fragment shader inputs with glGetResourceLocation. The location will be used to set the transforms with glProgramPathFragmentInputGenNV. The functions and their workings are documented in: glProgramPathFragmentInputGenNV https://www.opengl.org/registry/specs/NV/path_rendering.txt (note: addition as of API version 1.3) glGetResourceLocation https://www.opengl.org/registry/specs/ARB/program_interface_query.txt http://www.opengl.org/registry/doc/glspec44.core.pdf (function is in core Open GL 4.4) Note: glProgramPathFragmentInputGenNV could be used also for OpenGL. However, using seems to trigger a bug in the driver. Disable this feature on OpenGL at least until the driver is fixed and released. The bug manifests in shadertext test, where the lower-left text pair is missing. Valgrind catches a bad read for the test and causes the context to OOM reproducibly. Committed: https://skia.googlesource.com/skia/+/ec56e4545477e30d4f165ca55ed99f90525c6c38

Patch Set 1 #

Total comments: 4

Patch Set 2 : rebase after renaming uniform manager #

Patch Set 3 : rebase #

Patch Set 4 : rebase #

Patch Set 5 : refactor #

Patch Set 6 : #

Patch Set 7 : rebase #

Patch Set 8 : rebase #

Total comments: 6

Patch Set 9 : address review comments (rebase to separated patches) #

Total comments: 6

Patch Set 10 : rebse #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+279 lines, -98 lines) Patch
M include/gpu/GrEffect.h View 1 2 3 4 5 6 7 8 9 4 chunks +5 lines, -5 lines 0 comments Download
M src/gpu/GrGpu.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M src/gpu/effects/GrVertexEffect.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLCaps.cpp View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
M src/gpu/gl/GrGLDefines.h View 1 2 3 4 5 6 1 chunk +6 lines, -1 line 0 comments Download
M src/gpu/gl/GrGLPathRendering.cpp View 1 2 3 4 5 6 7 8 9 5 chunks +19 lines, -11 lines 0 comments Download
M src/gpu/gl/GrGLProgram.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLProgram.cpp View 1 2 3 4 5 6 7 8 9 7 chunks +14 lines, -12 lines 0 comments Download
M src/gpu/gl/GrGLProgramDataManager.h View 1 2 3 4 5 6 7 8 9 3 chunks +42 lines, -13 lines 0 comments Download
M src/gpu/gl/GrGLProgramDataManager.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +28 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLProgramDesc.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLProgramDesc.cpp View 1 2 3 4 5 6 7 8 9 9 chunks +12 lines, -12 lines 0 comments Download
M src/gpu/gl/GrGLProgramEffects.h View 1 2 3 4 5 6 7 8 9 7 chunks +16 lines, -1 line 0 comments Download
M src/gpu/gl/GrGLProgramEffects.cpp View 1 2 3 4 5 6 7 8 9 6 chunks +62 lines, -9 lines 0 comments Download
M src/gpu/gl/GrGpuGL.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -7 lines 0 comments Download
M src/gpu/gl/GrGpuGL_program.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -4 lines 0 comments Download
M src/gpu/gl/builders/GrGLProgramBuilder.h View 1 2 3 4 5 6 7 8 9 6 chunks +24 lines, -2 lines 2 comments Download
M src/gpu/gl/builders/GrGLProgramBuilder.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +27 lines, -2 lines 0 comments Download
M tests/GLProgramsTest.cpp View 1 2 3 4 5 6 7 8 9 7 chunks +11 lines, -10 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
Kimmo Kinnunen
Brian, I'm trying to implement the NVPR on GL ES with the augmented NVPR API ...
6 years, 5 months ago (2014-07-01 13:01:21 UTC) #1
bsalomon
Kimmo, can you send a link to the spec for glProgramPathFragmentInputGenNV? I have a vague ...
6 years, 5 months ago (2014-07-01 20:04:18 UTC) #2
Kimmo Kinnunen
https://chromiumcodereview.appspot.com/365853002/ is a possible rename
6 years, 5 months ago (2014-07-02 11:09:45 UTC) #3
Kimmo Kinnunen
This is now updated and ready for review. This depends on following issue: https://codereview.chromium.org/426553011/
6 years, 4 months ago (2014-08-01 11:25:01 UTC) #4
bsalomon
Hey Kimmo, I'm assuming this needs some updating after Chris's recent change. Let me know ...
6 years, 4 months ago (2014-08-05 14:10:50 UTC) #5
Kimmo Kinnunen
On 2014/08/05 14:10:50, bsalomon wrote: > Hey Kimmo, I'm assuming this needs some updating after ...
6 years, 4 months ago (2014-08-07 10:51:19 UTC) #6
bsalomon
Adding Chris because some of my comments are really about where the division between GrGpuGL ...
6 years, 4 months ago (2014-08-07 21:02:52 UTC) #7
Chris Dalton
https://codereview.chromium.org/367643004/diff/140001/src/gpu/gl/GrGpuGL.cpp File src/gpu/gl/GrGpuGL.cpp (right): https://codereview.chromium.org/367643004/diff/140001/src/gpu/gl/GrGpuGL.cpp#newcode145 src/gpu/gl/GrGpuGL.cpp:145: !this->pathRendering()->caps().fragmentInputGenSupport) { On 2014/08/07 21:02:52, bsalomon wrote: > Maybe ...
6 years, 4 months ago (2014-08-07 23:02:55 UTC) #8
Kimmo Kinnunen
On 2014/08/07 21:02:52, bsalomon wrote: > Adding Chris because some of my comments are really ...
6 years, 4 months ago (2014-08-08 12:49:25 UTC) #9
Kimmo Kinnunen
The depends are now merged. Should you have sudden craving for path rendering, this is ...
6 years, 4 months ago (2014-08-22 12:55:39 UTC) #10
Kimmo Kinnunen
The depends are now merged. Should you have sudden craving for path rendering, this is ...
6 years, 4 months ago (2014-08-22 12:55:39 UTC) #11
bsalomon
Hey Kimmo, I think you need to rebase again :( The shader builder code was ...
6 years, 4 months ago (2014-08-22 13:31:13 UTC) #12
Kimmo Kinnunen
On 2014/08/22 13:31:13, bsalomon wrote: > Hey Kimmo, I think you need to rebase again ...
6 years, 3 months ago (2014-08-25 12:43:09 UTC) #13
Kimmo Kinnunen
https://codereview.chromium.org/367643004/diff/160001/src/gpu/gl/GrGLProgramEffects.cpp File src/gpu/gl/GrGLProgramEffects.cpp (right): https://codereview.chromium.org/367643004/diff/160001/src/gpu/gl/GrGLProgramEffects.cpp#newcode429 src/gpu/gl/GrGLProgramEffects.cpp:429: if (transforms[t].fCurrentValue.cheapEqualTo(transform)) On 2014/08/22 13:31:13, bsalomon wrote: > minor ...
6 years, 3 months ago (2014-08-25 12:43:28 UTC) #14
bsalomon
lgtm, but since Joshua is actively working in this area I'd like him to approve ...
6 years, 3 months ago (2014-08-25 14:49:28 UTC) #15
joshua.litt
Just to clarify, with this enabled, a user created vertex will be ignored completely? https://codereview.chromium.org/367643004/diff/180001/src/gpu/gl/builders/GrGLProgramBuilder.h ...
6 years, 3 months ago (2014-08-25 17:00:05 UTC) #16
Chris Dalton
On 2014/08/25 17:00:05, joshua.litt wrote: > Just to clarify, with this enabled, a user created ...
6 years, 3 months ago (2014-08-25 18:04:23 UTC) #17
Chris Dalton
https://codereview.chromium.org/367643004/diff/180001/src/gpu/gl/builders/GrGLProgramBuilder.h File src/gpu/gl/builders/GrGLProgramBuilder.h (right): https://codereview.chromium.org/367643004/diff/180001/src/gpu/gl/builders/GrGLProgramBuilder.h#newcode295 src/gpu/gl/builders/GrGLProgramBuilder.h:295: On 2014/08/25 17:00:05, joshua.litt wrote: > Since this only ...
6 years, 3 months ago (2014-08-25 18:04:50 UTC) #18
joshua.litt
I see what you are saying. In the long term this change should hopefully allow ...
6 years, 3 months ago (2014-08-25 18:36:20 UTC) #19
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 3 months ago (2014-08-26 05:12:48 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/367643004/180001
6 years, 3 months ago (2014-08-26 05:13:54 UTC) #21
commit-bot: I haz the power
6 years, 3 months ago (2014-08-26 05:21:23 UTC) #22
Message was sent while issue was closed.
Committed patchset #10 (180001) as ec56e4545477e30d4f165ca55ed99f90525c6c38

Powered by Google App Engine
This is Rietveld 408576698