junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 1 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 2 | * Copyright 2011 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 8 | |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 9 | #ifndef GrGLProgram_DEFINED |
| 10 | #define GrGLProgram_DEFINED |
| 11 | |
joshualitt | 30ba436 | 2014-08-21 20:18:45 -0700 | [diff] [blame] | 12 | #include "builders/GrGLProgramBuilder.h" |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 13 | #include "builders/GrGLNvprProgramBuilder.h" |
tomhudson@google.com | d8f856c | 2012-05-10 12:13:36 +0000 | [diff] [blame] | 14 | #include "GrDrawState.h" |
robertphillips@google.com | 6177e69 | 2013-02-28 20:16:25 +0000 | [diff] [blame] | 15 | #include "GrGLContext.h" |
bsalomon@google.com | 31ec798 | 2013-03-27 18:14:57 +0000 | [diff] [blame] | 16 | #include "GrGLProgramDesc.h" |
tomhudson@google.com | 086e535 | 2011-12-08 14:44:10 +0000 | [diff] [blame] | 17 | #include "GrGLSL.h" |
bsalomon@google.com | 890e3b5 | 2012-06-01 19:01:37 +0000 | [diff] [blame] | 18 | #include "GrGLTexture.h" |
kkinnunen | 7510b22 | 2014-07-30 00:04:16 -0700 | [diff] [blame] | 19 | #include "GrGLProgramDataManager.h" |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 20 | |
bsalomon@google.com | f0a104e | 2012-07-10 17:51:07 +0000 | [diff] [blame] | 21 | #include "SkString.h" |
Scroggo | 97c88c2 | 2011-05-11 14:05:25 +0000 | [diff] [blame] | 22 | #include "SkXfermode.h" |
| 23 | |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 24 | class GrGLProcessor; |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 25 | class GrGLInstalledProcessors; |
joshualitt | 30ba436 | 2014-08-21 20:18:45 -0700 | [diff] [blame] | 26 | class GrGLProgramBuilder; |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 27 | |
| 28 | /** |
| 29 | * This class manages a GPU program and records per-program information. |
| 30 | * We can specify the attribute locations so that they are constant |
| 31 | * across our shaders. But the driver determines the uniform locations |
| 32 | * at link time. We don't need to remember the sampler uniform location |
| 33 | * because we will bind a texture slot to it and never change it |
| 34 | * Uniforms are program-local so we can't rely on fHWState to hold the |
| 35 | * previous uniform state after a program change. |
| 36 | */ |
commit-bot@chromium.org | a4de8c2 | 2013-09-09 13:38:37 +0000 | [diff] [blame] | 37 | class GrGLProgram : public SkRefCnt { |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 38 | public: |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 39 | SK_DECLARE_INST_COUNT(GrGLProgram) |
bsalomon@google.com | 4fa6694 | 2011-09-20 19:06:12 +0000 | [diff] [blame] | 40 | |
joshualitt | 30ba436 | 2014-08-21 20:18:45 -0700 | [diff] [blame] | 41 | typedef GrGLProgramBuilder::BuiltinUniformHandles BuiltinUniformHandles; |
kkinnunen | dddc18a | 2014-08-03 23:19:46 -0700 | [diff] [blame] | 42 | |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 43 | virtual ~GrGLProgram(); |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 44 | |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 45 | /** |
| 46 | * Call to abandon GL objects owned by this program. |
| 47 | */ |
bsalomon@google.com | ecb60aa | 2012-07-18 13:20:29 +0000 | [diff] [blame] | 48 | void abandon(); |
| 49 | |
joshualitt | 79f8fae | 2014-10-28 17:59:26 -0700 | [diff] [blame] | 50 | const GrProgramDesc& getDesc() { return fDesc; } |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 51 | |
bsalomon@google.com | 271cffc | 2011-05-20 14:13:56 +0000 | [diff] [blame] | 52 | /** |
bsalomon@google.com | 6a51dcb | 2013-02-13 16:03:51 +0000 | [diff] [blame] | 53 | * Gets the GL program ID for this program. |
| 54 | */ |
kkinnunen | dddc18a | 2014-08-03 23:19:46 -0700 | [diff] [blame] | 55 | GrGLuint programID() const { return fProgramID; } |
bsalomon@google.com | 6a51dcb | 2013-02-13 16:03:51 +0000 | [diff] [blame] | 56 | |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 57 | /* |
| 58 | * The base class always has a vertex shader, only the NVPR variants may omit a vertex shader |
| 59 | */ |
| 60 | virtual bool hasVertexShader() const { return true; } |
commit-bot@chromium.org | 6b30e45 | 2013-10-04 20:02:53 +0000 | [diff] [blame] | 61 | |
bsalomon@google.com | 6a51dcb | 2013-02-13 16:03:51 +0000 | [diff] [blame] | 62 | /** |
bsalomon@google.com | 6a51dcb | 2013-02-13 16:03:51 +0000 | [diff] [blame] | 63 | * The GrDrawState's view matrix along with the aspects of the render target determine the |
| 64 | * matrix sent to GL. The size of the render target affects the GL matrix because we must |
| 65 | * convert from Skia device coords to GL's normalized coords. Also the origin of the render |
| 66 | * target may require us to perform a mirror-flip. |
| 67 | */ |
| 68 | struct MatrixState { |
| 69 | SkMatrix fViewMatrix; |
| 70 | SkISize fRenderTargetSize; |
| 71 | GrSurfaceOrigin fRenderTargetOrigin; |
| 72 | |
| 73 | MatrixState() { this->invalidate(); } |
| 74 | void invalidate() { |
| 75 | fViewMatrix = SkMatrix::InvalidMatrix(); |
bsalomon@google.com | 45a412e | 2013-02-13 16:13:13 +0000 | [diff] [blame] | 76 | fRenderTargetSize.fWidth = -1; |
| 77 | fRenderTargetSize.fHeight = -1; |
bsalomon@google.com | 6a51dcb | 2013-02-13 16:03:51 +0000 | [diff] [blame] | 78 | fRenderTargetOrigin = (GrSurfaceOrigin) -1; |
| 79 | } |
commit-bot@chromium.org | 47c66dd | 2014-05-29 01:12:10 +0000 | [diff] [blame] | 80 | |
| 81 | /** |
| 82 | * Gets a matrix that goes from local coords to Skia's device coordinates. |
| 83 | */ |
commit-bot@chromium.org | 215a682 | 2013-09-05 18:28:42 +0000 | [diff] [blame] | 84 | template<int Size> void getGLMatrix(GrGLfloat* destMatrix) { |
commit-bot@chromium.org | 47c66dd | 2014-05-29 01:12:10 +0000 | [diff] [blame] | 85 | GrGLGetMatrix<Size>(destMatrix, fViewMatrix); |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Gets a matrix that goes from local coordinates to GL normalized device coords. |
| 90 | */ |
| 91 | template<int Size> void getRTAdjustedGLMatrix(GrGLfloat* destMatrix) { |
commit-bot@chromium.org | 215a682 | 2013-09-05 18:28:42 +0000 | [diff] [blame] | 92 | SkMatrix combined; |
| 93 | if (kBottomLeft_GrSurfaceOrigin == fRenderTargetOrigin) { |
| 94 | combined.setAll(SkIntToScalar(2) / fRenderTargetSize.fWidth, 0, -SK_Scalar1, |
| 95 | 0, -SkIntToScalar(2) / fRenderTargetSize.fHeight, SK_Scalar1, |
commit-bot@chromium.org | 47c66dd | 2014-05-29 01:12:10 +0000 | [diff] [blame] | 96 | 0, 0, 1); |
commit-bot@chromium.org | 215a682 | 2013-09-05 18:28:42 +0000 | [diff] [blame] | 97 | } else { |
| 98 | combined.setAll(SkIntToScalar(2) / fRenderTargetSize.fWidth, 0, -SK_Scalar1, |
| 99 | 0, SkIntToScalar(2) / fRenderTargetSize.fHeight, -SK_Scalar1, |
commit-bot@chromium.org | 47c66dd | 2014-05-29 01:12:10 +0000 | [diff] [blame] | 100 | 0, 0, 1); |
commit-bot@chromium.org | 215a682 | 2013-09-05 18:28:42 +0000 | [diff] [blame] | 101 | } |
commit-bot@chromium.org | b930cc3 | 2014-03-28 14:29:23 +0000 | [diff] [blame] | 102 | combined.preConcat(fViewMatrix); |
commit-bot@chromium.org | 215a682 | 2013-09-05 18:28:42 +0000 | [diff] [blame] | 103 | GrGLGetMatrix<Size>(destMatrix, combined); |
| 104 | } |
commit-bot@chromium.org | 47c66dd | 2014-05-29 01:12:10 +0000 | [diff] [blame] | 105 | |
| 106 | /** |
| 107 | * Gets a vec4 that adjusts the position from Skia device coords to GL's normalized device |
| 108 | * coords. Assuming the transformed position, pos, is a homogeneous vec3, the vec, v, is |
| 109 | * applied as such: |
| 110 | * pos.x = dot(v.xy, pos.xz) |
| 111 | * pos.y = dot(v.zq, pos.yz) |
| 112 | */ |
| 113 | void getRTAdjustmentVec(GrGLfloat* destVec) { |
| 114 | destVec[0] = 2.f / fRenderTargetSize.fWidth; |
| 115 | destVec[1] = -1.f; |
| 116 | if (kBottomLeft_GrSurfaceOrigin == fRenderTargetOrigin) { |
| 117 | destVec[2] = -2.f / fRenderTargetSize.fHeight; |
| 118 | destVec[3] = 1.f; |
| 119 | } else { |
| 120 | destVec[2] = 2.f / fRenderTargetSize.fHeight; |
| 121 | destVec[3] = -1.f; |
| 122 | } |
| 123 | } |
bsalomon@google.com | 6a51dcb | 2013-02-13 16:03:51 +0000 | [diff] [blame] | 124 | }; |
| 125 | |
| 126 | /** |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 127 | * This function uploads uniforms and calls each GrGLProcessor's setData. It is called before a |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 128 | * draw occurs using the program after the program has already been bound. It also uses the |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 129 | * GrGpuGL object to bind the textures required by the GrGLProcessors. The color and coverage |
bsalomon@google.com | 2c84aa3 | 2013-06-06 20:28:57 +0000 | [diff] [blame] | 130 | * stages come from GrGLProgramDesc::Build(). |
bsalomon@google.com | 4285acc | 2012-10-22 14:11:24 +0000 | [diff] [blame] | 131 | */ |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 132 | void setData(const GrOptDrawState&); |
bsalomon@google.com | 9196130 | 2011-05-09 18:39:58 +0000 | [diff] [blame] | 133 | |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 134 | protected: |
kkinnunen | 7510b22 | 2014-07-30 00:04:16 -0700 | [diff] [blame] | 135 | typedef GrGLProgramDataManager::UniformHandle UniformHandle; |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 136 | typedef GrGLProgramDataManager::UniformInfoArray UniformInfoArray; |
bsalomon@google.com | dbbc4e2 | 2012-07-25 17:48:39 +0000 | [diff] [blame] | 137 | |
commit-bot@chromium.org | a05fa06 | 2014-05-30 18:55:03 +0000 | [diff] [blame] | 138 | GrGLProgram(GrGpuGL*, |
joshualitt | 79f8fae | 2014-10-28 17:59:26 -0700 | [diff] [blame] | 139 | const GrProgramDesc&, |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 140 | const BuiltinUniformHandles&, |
| 141 | GrGLuint programID, |
| 142 | const UniformInfoArray&, |
joshualitt | a5305a1 | 2014-10-10 17:47:00 -0700 | [diff] [blame] | 143 | GrGLInstalledGeoProc* geometryProcessor, |
| 144 | GrGLInstalledFragProcs* fragmentProcessors); |
bsalomon@google.com | 2c84aa3 | 2013-06-06 20:28:57 +0000 | [diff] [blame] | 145 | |
commit-bot@chromium.org | a05fa06 | 2014-05-30 18:55:03 +0000 | [diff] [blame] | 146 | // Sets the texture units for samplers. |
bsalomon@google.com | 2c84aa3 | 2013-06-06 20:28:57 +0000 | [diff] [blame] | 147 | void initSamplerUniforms(); |
joshualitt | a5305a1 | 2014-10-10 17:47:00 -0700 | [diff] [blame] | 148 | void initSamplers(GrGLInstalledProc*, int* texUnitIdx); |
bsalomon@google.com | 2c84aa3 | 2013-06-06 20:28:57 +0000 | [diff] [blame] | 149 | |
| 150 | // Helper for setData(). Makes GL calls to specify the initial color when there is not |
| 151 | // per-vertex colors. |
joshualitt | 0e60282 | 2014-10-28 10:27:44 -0700 | [diff] [blame] | 152 | void setColor(const GrOptDrawState&, GrColor color); |
bsalomon@google.com | 2c84aa3 | 2013-06-06 20:28:57 +0000 | [diff] [blame] | 153 | |
| 154 | // Helper for setData(). Makes GL calls to specify the initial coverage when there is not |
| 155 | // per-vertex coverages. |
egdaniel | 37b4d86 | 2014-11-03 10:07:07 -0800 | [diff] [blame] | 156 | void setCoverage(const GrOptDrawState&, uint8_t coverage); |
bsalomon@google.com | 2c84aa3 | 2013-06-06 20:28:57 +0000 | [diff] [blame] | 157 | |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 158 | // A templated helper to loop over effects, set the transforms(via subclass) and bind textures |
joshualitt | a5305a1 | 2014-10-10 17:47:00 -0700 | [diff] [blame] | 159 | void setFragmentData(const GrOptDrawState&); |
bsalomon | ae59b77 | 2014-11-19 08:23:49 -0800 | [diff] [blame] | 160 | virtual void setTransformData(const GrPendingFragmentStage&, GrGLInstalledFragProc*); |
joshualitt | a5305a1 | 2014-10-10 17:47:00 -0700 | [diff] [blame] | 161 | void bindTextures(const GrGLInstalledProc*, const GrProcessor&); |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 162 | |
| 163 | /* |
| 164 | * Legacy NVPR needs a hook here to flush path tex gen settings. |
| 165 | * TODO when legacy nvpr is removed, remove this call. |
| 166 | */ |
| 167 | virtual void didSetData(GrGpu::DrawType); |
| 168 | |
bsalomon@google.com | 2c84aa3 | 2013-06-06 20:28:57 +0000 | [diff] [blame] | 169 | // Helper for setData() that sets the view matrix and loads the render target height uniform |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 170 | void setMatrixAndRenderTargetHeight(const GrOptDrawState&); |
| 171 | virtual void onSetMatrixAndRenderTargetHeight(const GrOptDrawState&); |
bsalomon@google.com | 2c84aa3 | 2013-06-06 20:28:57 +0000 | [diff] [blame] | 172 | |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 173 | // these reflect the current values of uniforms (GL uniform values travel with program) |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 174 | MatrixState fMatrixState; |
| 175 | GrColor fColor; |
egdaniel | 37b4d86 | 2014-11-03 10:07:07 -0800 | [diff] [blame] | 176 | uint8_t fCoverage; |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 177 | int fDstCopyTexUnit; |
| 178 | BuiltinUniformHandles fBuiltinUniformHandles; |
| 179 | GrGLuint fProgramID; |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 180 | |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 181 | // the installed effects |
joshualitt | a5305a1 | 2014-10-10 17:47:00 -0700 | [diff] [blame] | 182 | SkAutoTDelete<GrGLInstalledGeoProc> fGeometryProcessor; |
| 183 | SkAutoTUnref<GrGLInstalledFragProcs> fFragmentProcessors; |
skia.committer@gmail.com | 9681eeb | 2014-05-30 03:06:10 +0000 | [diff] [blame] | 184 | |
joshualitt | 79f8fae | 2014-10-28 17:59:26 -0700 | [diff] [blame] | 185 | GrProgramDesc fDesc; |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 186 | GrGpuGL* fGpu; |
| 187 | GrGLProgramDataManager fProgramDataManager; |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 188 | |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 189 | friend class GrGLProgramBuilder; |
commit-bot@chromium.org | 6b30e45 | 2013-10-04 20:02:53 +0000 | [diff] [blame] | 190 | |
commit-bot@chromium.org | a4de8c2 | 2013-09-09 13:38:37 +0000 | [diff] [blame] | 191 | typedef SkRefCnt INHERITED; |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 192 | }; |
| 193 | |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 194 | /* |
| 195 | * Below are slight specializations of the program object for the different types of programs |
| 196 | * The default GrGL programs consist of at the very least a vertex and fragment shader. |
| 197 | * Legacy Nvpr only has a fragment shader, 1.3+ Nvpr ignores the vertex shader, but both require |
| 198 | * specialized methods for setting transform data. Both types of NVPR also require setting the |
| 199 | * projection matrix through a special function call |
| 200 | */ |
| 201 | class GrGLNvprProgramBase : public GrGLProgram { |
| 202 | protected: |
| 203 | GrGLNvprProgramBase(GrGpuGL*, |
joshualitt | 79f8fae | 2014-10-28 17:59:26 -0700 | [diff] [blame] | 204 | const GrProgramDesc&, |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 205 | const BuiltinUniformHandles&, |
| 206 | GrGLuint programID, |
| 207 | const UniformInfoArray&, |
joshualitt | a5305a1 | 2014-10-10 17:47:00 -0700 | [diff] [blame] | 208 | GrGLInstalledFragProcs* fragmentProcessors); |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 209 | virtual void onSetMatrixAndRenderTargetHeight(const GrOptDrawState&); |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 210 | |
| 211 | typedef GrGLProgram INHERITED; |
| 212 | }; |
| 213 | |
| 214 | class GrGLNvprProgram : public GrGLNvprProgramBase { |
| 215 | public: |
bsalomon | ae59b77 | 2014-11-19 08:23:49 -0800 | [diff] [blame] | 216 | virtual bool hasVertexShader() const SK_OVERRIDE { return true; } |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 217 | |
| 218 | private: |
| 219 | typedef GrGLNvprProgramBuilder::SeparableVaryingInfo SeparableVaryingInfo; |
| 220 | typedef GrGLNvprProgramBuilder::SeparableVaryingInfoArray SeparableVaryingInfoArray; |
| 221 | GrGLNvprProgram(GrGpuGL*, |
joshualitt | 79f8fae | 2014-10-28 17:59:26 -0700 | [diff] [blame] | 222 | const GrProgramDesc&, |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 223 | const BuiltinUniformHandles&, |
| 224 | GrGLuint programID, |
| 225 | const UniformInfoArray&, |
joshualitt | a5305a1 | 2014-10-10 17:47:00 -0700 | [diff] [blame] | 226 | GrGLInstalledFragProcs* fragmentProcessors, |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 227 | const SeparableVaryingInfoArray& separableVaryings); |
| 228 | virtual void didSetData(GrGpu::DrawType) SK_OVERRIDE; |
bsalomon | ae59b77 | 2014-11-19 08:23:49 -0800 | [diff] [blame] | 229 | virtual void setTransformData(const GrPendingFragmentStage&, |
| 230 | GrGLInstalledFragProc*) SK_OVERRIDE; |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 231 | |
| 232 | struct Varying { |
| 233 | GrGLint fLocation; |
| 234 | SkDEBUGCODE( |
| 235 | GrSLType fType; |
| 236 | ); |
| 237 | }; |
| 238 | SkTArray<Varying, true> fVaryings; |
| 239 | |
| 240 | friend class GrGLNvprProgramBuilder; |
| 241 | |
| 242 | typedef GrGLNvprProgramBase INHERITED; |
| 243 | }; |
| 244 | |
| 245 | class GrGLLegacyNvprProgram : public GrGLNvprProgramBase { |
| 246 | public: |
| 247 | virtual bool hasVertexShader() const SK_OVERRIDE { return false; } |
| 248 | |
| 249 | private: |
| 250 | GrGLLegacyNvprProgram(GrGpuGL* gpu, |
joshualitt | 79f8fae | 2014-10-28 17:59:26 -0700 | [diff] [blame] | 251 | const GrProgramDesc& desc, |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 252 | const BuiltinUniformHandles&, |
| 253 | GrGLuint programID, |
| 254 | const UniformInfoArray&, |
joshualitt | 2947382 | 2014-12-10 15:03:00 -0800 | [diff] [blame] | 255 | GrGLInstalledFragProcs* fragmentProcessors, |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 256 | int texCoordSetCnt); |
| 257 | virtual void didSetData(GrGpu::DrawType) SK_OVERRIDE; |
bsalomon | ae59b77 | 2014-11-19 08:23:49 -0800 | [diff] [blame] | 258 | virtual void setTransformData(const GrPendingFragmentStage&, |
| 259 | GrGLInstalledFragProc*) SK_OVERRIDE; |
joshualitt | 47bb382 | 2014-10-07 16:43:25 -0700 | [diff] [blame] | 260 | |
| 261 | int fTexCoordSetCnt; |
| 262 | |
| 263 | friend class GrGLLegacyNvprProgramBuilder; |
| 264 | |
| 265 | typedef GrGLNvprProgramBase INHERITED; |
| 266 | }; |
| 267 | |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 268 | #endif |