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

Issue 426553011: Make GrGLProgram be available to GrGLProgramDataManager (Closed)

Created:
6 years, 4 months ago by Kimmo Kinnunen
Modified:
6 years, 4 months ago
Reviewers:
bsalomon
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Make GrGLProgram be available to GrGLProgramDataManager GL APIs such as glProgramPathFragmentInputGenNV need the explicit program id in order to set the program resources. For GrGLProgramDataManager to call the APIs, the program id needs to be available to the GrGLProgramDataManager. One GrGLProgramDataManager is used to explicitly manage the resources of one GrGLProgram. Refactor the classes to reflect this: make GrGLProgram create and own GrGLProgramDataManager. This way the program id can be made available through GrGLProgram backpointer. In order to do this, remove the population of the program link results information for uniforms in GrGLProgramDataManager during shader generation. Instead, accumulate the info to the uniform list of GrGLShaderBuilder. After the generation, compilation and link is successful, this info can be used to construct both GrGLProgram and GrGLProgramDataManager. Changes names of functions to create UniformHandles and convert them to list indices. This tries to highlight that they're different lists, even though at the moment they match index-wise. E.g the contract is that handles can be created based on the shader builder state, and the object can later be set with the handle and the manager that was created with the builder. This is needed to support NV_path_rendering for GLES. Committed: https://skia.googlesource.com/skia/+/dddc18a6bba67ad43a65f4c244b95f76cefef617

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : address review comment #

Patch Set 4 : fix win warning #

Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -267 lines) Patch
M src/gpu/gl/GrGLProgram.h View 4 chunks +12 lines, -6 lines 0 comments Download
M src/gpu/gl/GrGLProgram.cpp View 7 chunks +49 lines, -41 lines 0 comments Download
M src/gpu/gl/GrGLProgramDataManager.h View 1 2 4 chunks +16 lines, -37 lines 0 comments Download
M src/gpu/gl/GrGLProgramDataManager.cpp View 1 14 chunks +40 lines, -57 lines 0 comments Download
M src/gpu/gl/GrGLShaderBuilder.h View 1 2 3 11 chunks +44 lines, -48 lines 0 comments Download
M src/gpu/gl/GrGLShaderBuilder.cpp View 1 2 21 chunks +68 lines, -78 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Kimmo Kinnunen
How does this sound? In order to set the fragment shader variables without vertex shader, ...
6 years, 4 months ago (2014-08-01 11:24:16 UTC) #1
bsalomon
lgtm w/ a question https://codereview.chromium.org/426553011/diff/20001/src/gpu/gl/GrGLProgramDataManager.h File src/gpu/gl/GrGLProgramDataManager.h (right): https://codereview.chromium.org/426553011/diff/20001/src/gpu/gl/GrGLProgramDataManager.h#newcode49 src/gpu/gl/GrGLProgramDataManager.h:49: int toProgramDataIndex() const { SkASSERT(isValid()); ...
6 years, 4 months ago (2014-08-01 13:46:45 UTC) #2
Kimmo Kinnunen
https://codereview.chromium.org/426553011/diff/20001/src/gpu/gl/GrGLProgramDataManager.h File src/gpu/gl/GrGLProgramDataManager.h (right): https://codereview.chromium.org/426553011/diff/20001/src/gpu/gl/GrGLProgramDataManager.h#newcode49 src/gpu/gl/GrGLProgramDataManager.h:49: int toProgramDataIndex() const { SkASSERT(isValid()); return ~fValue; } On ...
6 years, 4 months ago (2014-08-04 05:43:27 UTC) #3
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 4 months ago (2014-08-04 05:47:18 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/426553011/40001
6 years, 4 months ago (2014-08-04 05:47:44 UTC) #5
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Win-VS2013-x86-Debug-Trybot on tryserver.skia ...
6 years, 4 months ago (2014-08-04 06:00:24 UTC) #6
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 4 months ago (2014-08-04 06:08:37 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/426553011/60001
6 years, 4 months ago (2014-08-04 06:08:54 UTC) #8
commit-bot: I haz the power
6 years, 4 months ago (2014-08-04 06:19:50 UTC) #9
Message was sent while issue was closed.
Change committed as dddc18a6bba67ad43a65f4c244b95f76cefef617

Powered by Google App Engine
This is Rietveld 408576698