blob: 112cecd99537d98687b90d04a45f0c432e38966a [file] [log] [blame]
junov@google.comf93e7172011-03-31 21:26:24 +00001/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00002 * 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.comf93e7172011-03-31 21:26:24 +00006 */
junov@google.comf93e7172011-03-31 21:26:24 +00007#include "GrGLProgram.h"
8
tomhudson@google.comd8f856c2012-05-10 12:13:36 +00009#include "GrAllocator.h"
bsalomon@google.coma469c282012-10-24 18:28:34 +000010#include "GrEffect.h"
bsalomon@google.com77af6802013-10-02 13:04:56 +000011#include "GrCoordTransform.h"
bsalomon@google.comd698f772012-10-25 13:22:00 +000012#include "GrGLEffect.h"
bsalomon@google.com34cccde2013-01-04 18:34:30 +000013#include "GrGpuGL.h"
kkinnunenec56e452014-08-25 22:21:16 -070014#include "GrGLPathRendering.h"
bsalomon@google.com4fa66942011-09-20 19:06:12 +000015#include "GrGLShaderVar.h"
bsalomon@google.com018f1792013-04-18 19:36:09 +000016#include "GrGLSL.h"
egdaniel170f90b2014-09-16 12:54:40 -070017#include "GrOptDrawState.h"
Scroggo97c88c22011-05-11 14:05:25 +000018#include "SkXfermode.h"
19
commit-bot@chromium.org9188a152013-09-05 18:28:24 +000020#define GL_CALL(X) GR_GL_CALL(fGpu->glInterface(), X)
21#define GL_CALL_RET(R, X) GR_GL_CALL_RET(fGpu->glInterface(), R, X)
bsalomon@google.comecb60aa2012-07-18 13:20:29 +000022
commit-bot@chromium.org9188a152013-09-05 18:28:24 +000023GrGLProgram* GrGLProgram::Create(GrGpuGL* gpu,
bsalomon@google.com31ec7982013-03-27 18:14:57 +000024 const GrGLProgramDesc& desc,
joshualittbd769d02014-09-04 08:56:46 -070025 const GrEffectStage* geometryProcessor,
bsalomon@google.com2c84aa32013-06-06 20:28:57 +000026 const GrEffectStage* colorStages[],
27 const GrEffectStage* coverageStages[]) {
joshualitt30ba4362014-08-21 20:18:45 -070028 SkAutoTDelete<GrGLProgramBuilder> builder;
kkinnunenec56e452014-08-25 22:21:16 -070029 if (!desc.getHeader().fRequiresVertexShader &&
30 gpu->glCaps().pathRenderingSupport() &&
31 gpu->glPathRendering()->texturingMode() == GrGLPathRendering::FixedFunction_TexturingMode) {
joshualittbd769d02014-09-04 08:56:46 -070032 SkASSERT(NULL == geometryProcessor);
joshualitt30ba4362014-08-21 20:18:45 -070033 builder.reset(SkNEW_ARGS(GrGLFragmentOnlyProgramBuilder, (gpu, desc)));
kkinnunenec56e452014-08-25 22:21:16 -070034 } else {
35 builder.reset(SkNEW_ARGS(GrGLFullProgramBuilder, (gpu, desc)));
kkinnunendddc18a2014-08-03 23:19:46 -070036 }
joshualittbd769d02014-09-04 08:56:46 -070037 if (builder->genProgram(geometryProcessor, colorStages, coverageStages)) {
kkinnunendddc18a2014-08-03 23:19:46 -070038 SkASSERT(0 != builder->getProgramID());
39 return SkNEW_ARGS(GrGLProgram, (gpu, desc, *builder));
bsalomon@google.comecb60aa2012-07-18 13:20:29 +000040 }
commit-bot@chromium.org6eac42e2014-05-29 21:29:51 +000041 return NULL;
bsalomon@google.comecb60aa2012-07-18 13:20:29 +000042}
43
commit-bot@chromium.org9188a152013-09-05 18:28:24 +000044GrGLProgram::GrGLProgram(GrGpuGL* gpu,
bsalomon@google.com31ec7982013-03-27 18:14:57 +000045 const GrGLProgramDesc& desc,
joshualitt30ba4362014-08-21 20:18:45 -070046 const GrGLProgramBuilder& builder)
commit-bot@chromium.orga05fa062014-05-30 18:55:03 +000047 : fColor(GrColor_ILLEGAL)
commit-bot@chromium.org6eac42e2014-05-29 21:29:51 +000048 , fCoverage(GrColor_ILLEGAL)
49 , fDstCopyTexUnit(-1)
kkinnunendddc18a2014-08-03 23:19:46 -070050 , fBuiltinUniformHandles(builder.getBuiltinUniformHandles())
joshualittbd769d02014-09-04 08:56:46 -070051 , fGeometryProcessor(SkSafeRef(builder.getGeometryProcessor()))
kkinnunendddc18a2014-08-03 23:19:46 -070052 , fColorEffects(SkRef(builder.getColorEffects()))
53 , fCoverageEffects(SkRef(builder.getCoverageEffects()))
54 , fProgramID(builder.getProgramID())
55 , fHasVertexShader(builder.hasVertexShader())
56 , fTexCoordSetCnt(builder.getTexCoordSetCount())
commit-bot@chromium.org6eac42e2014-05-29 21:29:51 +000057 , fDesc(desc)
58 , fGpu(gpu)
kkinnunendddc18a2014-08-03 23:19:46 -070059 , fProgramDataManager(gpu, this, builder) {
commit-bot@chromium.org6eac42e2014-05-29 21:29:51 +000060 this->initSamplerUniforms();
junov@google.comf93e7172011-03-31 21:26:24 +000061}
62
63GrGLProgram::~GrGLProgram() {
kkinnunendddc18a2014-08-03 23:19:46 -070064 if (fProgramID) {
65 GL_CALL(DeleteProgram(fProgramID));
bsalomon@google.comecb60aa2012-07-18 13:20:29 +000066 }
junov@google.comf93e7172011-03-31 21:26:24 +000067}
68
bsalomon@google.comecb60aa2012-07-18 13:20:29 +000069void GrGLProgram::abandon() {
kkinnunendddc18a2014-08-03 23:19:46 -070070 fProgramID = 0;
bsalomon@google.comecb60aa2012-07-18 13:20:29 +000071}
72
tomhudson@google.com0d3f1fb2011-06-01 19:27:31 +000073void GrGLProgram::overrideBlend(GrBlendCoeff* srcCoeff,
bsalomon@google.com271cffc2011-05-20 14:13:56 +000074 GrBlendCoeff* dstCoeff) const {
bsalomon@google.com2db3ded2013-05-22 14:34:04 +000075 switch (fDesc.getHeader().fCoverageOutput) {
bsalomon@google.com5920ac22013-04-19 13:14:45 +000076 case GrGLProgramDesc::kModulate_CoverageOutput:
bsalomon@google.com271cffc2011-05-20 14:13:56 +000077 break;
bsalomon@google.com5920ac22013-04-19 13:14:45 +000078 // The prog will write a coverage value to the secondary
bsalomon@google.com271cffc2011-05-20 14:13:56 +000079 // output and the dst is blended by one minus that value.
bsalomon@google.com5920ac22013-04-19 13:14:45 +000080 case GrGLProgramDesc::kSecondaryCoverage_CoverageOutput:
81 case GrGLProgramDesc::kSecondaryCoverageISA_CoverageOutput:
82 case GrGLProgramDesc::kSecondaryCoverageISC_CoverageOutput:
83 *dstCoeff = (GrBlendCoeff)GrGpu::kIS2C_GrBlendCoeff;
84 break;
85 case GrGLProgramDesc::kCombineWithDst_CoverageOutput:
86 // We should only have set this if the blend was specified as (1, 0)
tfarina@chromium.orgf6de4752013-08-17 00:02:59 +000087 SkASSERT(kOne_GrBlendCoeff == *srcCoeff && kZero_GrBlendCoeff == *dstCoeff);
bsalomon@google.com5920ac22013-04-19 13:14:45 +000088 break;
bsalomon@google.com271cffc2011-05-20 14:13:56 +000089 default:
commit-bot@chromium.org88cb22b2014-04-30 14:17:00 +000090 SkFAIL("Unexpected coverage output");
bsalomon@google.com271cffc2011-05-20 14:13:56 +000091 break;
92 }
93}
94
bsalomon@google.comdbbc4e22012-07-25 17:48:39 +000095void GrGLProgram::initSamplerUniforms() {
kkinnunendddc18a2014-08-03 23:19:46 -070096 GL_CALL(UseProgram(fProgramID));
bsalomon@google.com34cccde2013-01-04 18:34:30 +000097 GrGLint texUnitIdx = 0;
kkinnunendddc18a2014-08-03 23:19:46 -070098 if (fBuiltinUniformHandles.fDstCopySamplerUni.isValid()) {
99 fProgramDataManager.setSampler(fBuiltinUniformHandles.fDstCopySamplerUni, texUnitIdx);
bsalomon@google.com804e9942013-06-06 18:04:38 +0000100 fDstCopyTexUnit = texUnitIdx++;
bsalomon@google.com26e18b52013-03-29 19:22:36 +0000101 }
bsalomon49f085d2014-09-05 13:34:00 -0700102 if (fGeometryProcessor.get()) {
joshualittbd769d02014-09-04 08:56:46 -0700103 fGeometryProcessor->initSamplers(fProgramDataManager, &texUnitIdx);
104 }
kkinnunendddc18a2014-08-03 23:19:46 -0700105 fColorEffects->initSamplers(fProgramDataManager, &texUnitIdx);
106 fCoverageEffects->initSamplers(fProgramDataManager, &texUnitIdx);
bsalomon@google.com91961302011-05-09 18:39:58 +0000107}
108
bsalomon@google.comeb715c82012-07-11 15:03:31 +0000109///////////////////////////////////////////////////////////////////////////////
junov@google.comf93e7172011-03-31 21:26:24 +0000110
egdaniel170f90b2014-09-16 12:54:40 -0700111void GrGLProgram::setData(const GrOptDrawState& optState,
112 GrGpu::DrawType drawType,
joshualittbd769d02014-09-04 08:56:46 -0700113 const GrEffectStage* geometryProcessor,
bsalomon@google.com2c84aa32013-06-06 20:28:57 +0000114 const GrEffectStage* colorStages[],
115 const GrEffectStage* coverageStages[],
bsalomon@google.com26e18b52013-03-29 19:22:36 +0000116 const GrDeviceCoordTexture* dstCopy,
bsalomon@google.com91207482013-02-12 21:45:24 +0000117 SharedGLState* sharedState) {
egdaniel170f90b2014-09-16 12:54:40 -0700118 GrColor color = optState.getColor();
119 GrColor coverage = optState.getCoverageColor();
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000120
egdaniel170f90b2014-09-16 12:54:40 -0700121 this->setColor(optState, color, sharedState);
122 this->setCoverage(optState, coverage, sharedState);
123 this->setMatrixAndRenderTargetHeight(drawType, optState);
bsalomon@google.com91207482013-02-12 21:45:24 +0000124
bsalomon49f085d2014-09-05 13:34:00 -0700125 if (dstCopy) {
kkinnunendddc18a2014-08-03 23:19:46 -0700126 if (fBuiltinUniformHandles.fDstCopyTopLeftUni.isValid()) {
127 fProgramDataManager.set2f(fBuiltinUniformHandles.fDstCopyTopLeftUni,
kkinnunen7510b222014-07-30 00:04:16 -0700128 static_cast<GrGLfloat>(dstCopy->offset().fX),
129 static_cast<GrGLfloat>(dstCopy->offset().fY));
kkinnunendddc18a2014-08-03 23:19:46 -0700130 fProgramDataManager.set2f(fBuiltinUniformHandles.fDstCopyScaleUni,
kkinnunen7510b222014-07-30 00:04:16 -0700131 1.f / dstCopy->texture()->width(),
132 1.f / dstCopy->texture()->height());
bsalomon@google.com26e18b52013-03-29 19:22:36 +0000133 GrGLTexture* texture = static_cast<GrGLTexture*>(dstCopy->texture());
134 static GrTextureParams kParams; // the default is clamp, nearest filtering.
commit-bot@chromium.org9188a152013-09-05 18:28:24 +0000135 fGpu->bindTexture(fDstCopyTexUnit, kParams, texture);
bsalomon@google.com26e18b52013-03-29 19:22:36 +0000136 } else {
kkinnunendddc18a2014-08-03 23:19:46 -0700137 SkASSERT(!fBuiltinUniformHandles.fDstCopyScaleUni.isValid());
138 SkASSERT(!fBuiltinUniformHandles.fDstCopySamplerUni.isValid());
bsalomon@google.com26e18b52013-03-29 19:22:36 +0000139 }
140 } else {
kkinnunendddc18a2014-08-03 23:19:46 -0700141 SkASSERT(!fBuiltinUniformHandles.fDstCopyTopLeftUni.isValid());
142 SkASSERT(!fBuiltinUniformHandles.fDstCopyScaleUni.isValid());
143 SkASSERT(!fBuiltinUniformHandles.fDstCopySamplerUni.isValid());
bsalomon@google.com26e18b52013-03-29 19:22:36 +0000144 }
bsalomon@google.comc7818882013-03-20 19:19:53 +0000145
bsalomon49f085d2014-09-05 13:34:00 -0700146 if (fGeometryProcessor.get()) {
147 SkASSERT(geometryProcessor);
joshualittbd769d02014-09-04 08:56:46 -0700148 fGeometryProcessor->setData(fGpu, drawType,fProgramDataManager, geometryProcessor);
149 }
kkinnunenec56e452014-08-25 22:21:16 -0700150 fColorEffects->setData(fGpu, drawType,fProgramDataManager, colorStages);
151 fCoverageEffects->setData(fGpu, drawType,fProgramDataManager, coverageStages);
commit-bot@chromium.org20807222013-11-01 11:54:54 +0000152
commit-bot@chromium.org0a6fe712014-04-23 19:26:26 +0000153 // PathTexGen state applies to the the fixed function vertex shader. For
154 // custom shaders, it's ignored, so we don't need to change the texgen
155 // settings in that case.
kkinnunendddc18a2014-08-03 23:19:46 -0700156 if (!fHasVertexShader) {
kkinnunenccdaa042014-08-20 01:36:23 -0700157 fGpu->glPathRendering()->flushPathTexGenSettings(fTexCoordSetCnt);
commit-bot@chromium.org6b30e452013-10-04 20:02:53 +0000158 }
skia.committer@gmail.com8ae714b2013-01-05 02:02:05 +0000159}
bsalomon@google.com91207482013-02-12 21:45:24 +0000160
egdaniel170f90b2014-09-16 12:54:40 -0700161void GrGLProgram::setColor(const GrOptDrawState& optState,
bsalomon@google.com91207482013-02-12 21:45:24 +0000162 GrColor color,
163 SharedGLState* sharedState) {
bsalomon@google.com2db3ded2013-05-22 14:34:04 +0000164 const GrGLProgramDesc::KeyHeader& header = fDesc.getHeader();
egdaniel170f90b2014-09-16 12:54:40 -0700165 if (!optState.hasColorVertexAttribute()) {
bsalomon@google.com2db3ded2013-05-22 14:34:04 +0000166 switch (header.fColorInput) {
bsalomon@google.com31ec7982013-03-27 18:14:57 +0000167 case GrGLProgramDesc::kAttribute_ColorInput:
tfarina@chromium.orgf6de4752013-08-17 00:02:59 +0000168 SkASSERT(-1 != header.fColorAttributeIndex);
jvanverth@google.com054ae992013-04-01 20:06:51 +0000169 if (sharedState->fConstAttribColor != color ||
bsalomon@google.com2db3ded2013-05-22 14:34:04 +0000170 sharedState->fConstAttribColorIndex != header.fColorAttributeIndex) {
bsalomon@google.com91207482013-02-12 21:45:24 +0000171 // OpenGL ES only supports the float varieties of glVertexAttrib
172 GrGLfloat c[4];
173 GrColorToRGBAFloat(color, c);
bsalomon@google.com2db3ded2013-05-22 14:34:04 +0000174 GL_CALL(VertexAttrib4fv(header.fColorAttributeIndex, c));
bsalomon@google.com91207482013-02-12 21:45:24 +0000175 sharedState->fConstAttribColor = color;
bsalomon@google.com2db3ded2013-05-22 14:34:04 +0000176 sharedState->fConstAttribColorIndex = header.fColorAttributeIndex;
bsalomon@google.com91207482013-02-12 21:45:24 +0000177 }
178 break;
bsalomon@google.com31ec7982013-03-27 18:14:57 +0000179 case GrGLProgramDesc::kUniform_ColorInput:
kkinnunendddc18a2014-08-03 23:19:46 -0700180 if (fColor != color && fBuiltinUniformHandles.fColorUni.isValid()) {
bsalomon@google.com91207482013-02-12 21:45:24 +0000181 // OpenGL ES doesn't support unsigned byte varieties of glUniform
182 GrGLfloat c[4];
183 GrColorToRGBAFloat(color, c);
kkinnunendddc18a2014-08-03 23:19:46 -0700184 fProgramDataManager.set4fv(fBuiltinUniformHandles.fColorUni, 1, c);
bsalomon@google.com91207482013-02-12 21:45:24 +0000185 fColor = color;
186 }
jvanverth@google.com054ae992013-04-01 20:06:51 +0000187 sharedState->fConstAttribColorIndex = -1;
bsalomon@google.com91207482013-02-12 21:45:24 +0000188 break;
egdaniel842b0862014-09-02 10:01:30 -0700189 case GrGLProgramDesc::kAllOnes_ColorInput:
190 sharedState->fConstAttribColorIndex = -1;
191 break;
bsalomon@google.com91207482013-02-12 21:45:24 +0000192 default:
egdaniel02cafcc2014-07-21 11:37:28 -0700193 SkFAIL("Unexpected color type.");
bsalomon@google.com91207482013-02-12 21:45:24 +0000194 }
jvanverth@google.com054ae992013-04-01 20:06:51 +0000195 } else {
196 sharedState->fConstAttribColorIndex = -1;
bsalomon@google.com91207482013-02-12 21:45:24 +0000197 }
198}
199
egdaniel170f90b2014-09-16 12:54:40 -0700200void GrGLProgram::setCoverage(const GrOptDrawState& optState,
bsalomon@google.com91207482013-02-12 21:45:24 +0000201 GrColor coverage,
202 SharedGLState* sharedState) {
bsalomon@google.com2db3ded2013-05-22 14:34:04 +0000203 const GrGLProgramDesc::KeyHeader& header = fDesc.getHeader();
egdaniel170f90b2014-09-16 12:54:40 -0700204 if (!optState.hasCoverageVertexAttribute()) {
bsalomon@google.com2db3ded2013-05-22 14:34:04 +0000205 switch (header.fCoverageInput) {
bsalomon@google.com31ec7982013-03-27 18:14:57 +0000206 case GrGLProgramDesc::kAttribute_ColorInput:
jvanverth@google.com054ae992013-04-01 20:06:51 +0000207 if (sharedState->fConstAttribCoverage != coverage ||
bsalomon@google.com2db3ded2013-05-22 14:34:04 +0000208 sharedState->fConstAttribCoverageIndex != header.fCoverageAttributeIndex) {
bsalomon@google.com91207482013-02-12 21:45:24 +0000209 // OpenGL ES only supports the float varieties of glVertexAttrib
210 GrGLfloat c[4];
211 GrColorToRGBAFloat(coverage, c);
bsalomon@google.com2db3ded2013-05-22 14:34:04 +0000212 GL_CALL(VertexAttrib4fv(header.fCoverageAttributeIndex, c));
bsalomon@google.com91207482013-02-12 21:45:24 +0000213 sharedState->fConstAttribCoverage = coverage;
bsalomon@google.com2db3ded2013-05-22 14:34:04 +0000214 sharedState->fConstAttribCoverageIndex = header.fCoverageAttributeIndex;
bsalomon@google.com91207482013-02-12 21:45:24 +0000215 }
216 break;
bsalomon@google.com31ec7982013-03-27 18:14:57 +0000217 case GrGLProgramDesc::kUniform_ColorInput:
bsalomon@google.com91207482013-02-12 21:45:24 +0000218 if (fCoverage != coverage) {
219 // OpenGL ES doesn't support unsigned byte varieties of glUniform
220 GrGLfloat c[4];
221 GrColorToRGBAFloat(coverage, c);
kkinnunendddc18a2014-08-03 23:19:46 -0700222 fProgramDataManager.set4fv(fBuiltinUniformHandles.fCoverageUni, 1, c);
bsalomon@google.com91207482013-02-12 21:45:24 +0000223 fCoverage = coverage;
224 }
jvanverth@google.com054ae992013-04-01 20:06:51 +0000225 sharedState->fConstAttribCoverageIndex = -1;
bsalomon@google.com91207482013-02-12 21:45:24 +0000226 break;
egdaniel842b0862014-09-02 10:01:30 -0700227 case GrGLProgramDesc::kAllOnes_ColorInput:
jvanverth@google.com054ae992013-04-01 20:06:51 +0000228 sharedState->fConstAttribCoverageIndex = -1;
bsalomon@google.com91207482013-02-12 21:45:24 +0000229 break;
230 default:
egdaniel02cafcc2014-07-21 11:37:28 -0700231 SkFAIL("Unexpected coverage type.");
bsalomon@google.com91207482013-02-12 21:45:24 +0000232 }
jvanverth@google.com054ae992013-04-01 20:06:51 +0000233 } else {
234 sharedState->fConstAttribCoverageIndex = -1;
bsalomon@google.com91207482013-02-12 21:45:24 +0000235 }
236}
bsalomon@google.com6a51dcb2013-02-13 16:03:51 +0000237
kkinnunenec56e452014-08-25 22:21:16 -0700238void GrGLProgram::setMatrixAndRenderTargetHeight(GrGpu::DrawType drawType,
egdaniel170f90b2014-09-16 12:54:40 -0700239 const GrOptDrawState& optState) {
240 const GrRenderTarget* rt = optState.getRenderTarget();
bsalomon@google.com6a51dcb2013-02-13 16:03:51 +0000241 SkISize size;
242 size.set(rt->width(), rt->height());
243
244 // Load the RT height uniform if it is needed to y-flip gl_FragCoord.
kkinnunendddc18a2014-08-03 23:19:46 -0700245 if (fBuiltinUniformHandles.fRTHeightUni.isValid() &&
bsalomon@google.com6a51dcb2013-02-13 16:03:51 +0000246 fMatrixState.fRenderTargetSize.fHeight != size.fHeight) {
kkinnunendddc18a2014-08-03 23:19:46 -0700247 fProgramDataManager.set1f(fBuiltinUniformHandles.fRTHeightUni,
kkinnunen7510b222014-07-30 00:04:16 -0700248 SkIntToScalar(size.fHeight));
bsalomon@google.com6a51dcb2013-02-13 16:03:51 +0000249 }
250
kkinnunenec56e452014-08-25 22:21:16 -0700251 if (GrGpu::IsPathRenderingDrawType(drawType)) {
egdaniel170f90b2014-09-16 12:54:40 -0700252 fGpu->glPathRendering()->setProjectionMatrix(optState.getViewMatrix(), size, rt->origin());
commit-bot@chromium.org6b30e452013-10-04 20:02:53 +0000253 } else if (fMatrixState.fRenderTargetOrigin != rt->origin() ||
254 fMatrixState.fRenderTargetSize != size ||
egdaniel170f90b2014-09-16 12:54:40 -0700255 !fMatrixState.fViewMatrix.cheapEqualTo(optState.getViewMatrix())) {
kkinnunendddc18a2014-08-03 23:19:46 -0700256 SkASSERT(fBuiltinUniformHandles.fViewMatrixUni.isValid());
bsalomon@google.com6a51dcb2013-02-13 16:03:51 +0000257
egdaniel170f90b2014-09-16 12:54:40 -0700258 fMatrixState.fViewMatrix = optState.getViewMatrix();
bsalomon@google.com6a51dcb2013-02-13 16:03:51 +0000259 fMatrixState.fRenderTargetSize = size;
260 fMatrixState.fRenderTargetOrigin = rt->origin();
commit-bot@chromium.org215a6822013-09-05 18:28:42 +0000261
262 GrGLfloat viewMatrix[3 * 3];
263 fMatrixState.getGLMatrix<3>(viewMatrix);
kkinnunendddc18a2014-08-03 23:19:46 -0700264 fProgramDataManager.setMatrix3f(fBuiltinUniformHandles.fViewMatrixUni, viewMatrix);
commit-bot@chromium.org47c66dd2014-05-29 01:12:10 +0000265
266 GrGLfloat rtAdjustmentVec[4];
267 fMatrixState.getRTAdjustmentVec(rtAdjustmentVec);
kkinnunendddc18a2014-08-03 23:19:46 -0700268 fProgramDataManager.set4fv(fBuiltinUniformHandles.fRTAdjustmentUni, 1, rtAdjustmentVec);
bsalomon@google.com6a51dcb2013-02-13 16:03:51 +0000269 }
270}