Lines Matching refs:uni

14          SkASSERT(arrayCount <= uni.fArrayCount || \
15 (1 == arrayCount && GrGLSLShaderVar::kNonArray == uni.fArrayCount))
65 const Uniform& uni = fUniforms[u.toIndex()]; in setSampler() local
66 SkASSERT(uni.fType == kSampler2D_GrSLType || uni.fType == kSamplerExternal_GrSLType || in setSampler()
67 uni.fType == kSampler2DRect_GrSLType); in setSampler()
68 SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount); in setSampler()
73 if (kUnusedUniform != uni.fFSLocation) { in setSampler()
74 GR_GL_CALL(fGpu->glInterface(), Uniform1i(uni.fFSLocation, texUnit)); in setSampler()
76 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { in setSampler()
77 GR_GL_CALL(fGpu->glInterface(), Uniform1i(uni.fVSLocation, texUnit)); in setSampler()
82 const Uniform& uni = fUniforms[u.toIndex()]; in set1f() local
83 SkASSERT(uni.fType == kFloat_GrSLType); in set1f()
84 SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount); in set1f()
85 SkDEBUGCODE(this->printUnused(uni);) in set1f()
86 if (kUnusedUniform != uni.fFSLocation) { in set1f()
87 GR_GL_CALL(fGpu->glInterface(), Uniform1f(uni.fFSLocation, v0)); in set1f()
89 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { in set1f()
90 GR_GL_CALL(fGpu->glInterface(), Uniform1f(uni.fVSLocation, v0)); in set1f()
97 const Uniform& uni = fUniforms[u.toIndex()]; in set1fv() local
98 SkASSERT(uni.fType == kFloat_GrSLType); in set1fv()
100 ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, arrayCount); in set1fv()
105 if (kUnusedUniform != uni.fFSLocation) { in set1fv()
106 GR_GL_CALL(fGpu->glInterface(), Uniform1fv(uni.fFSLocation, arrayCount, v)); in set1fv()
108 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { in set1fv()
109 GR_GL_CALL(fGpu->glInterface(), Uniform1fv(uni.fVSLocation, arrayCount, v)); in set1fv()
114 const Uniform& uni = fUniforms[u.toIndex()]; in set2f() local
115 SkASSERT(uni.fType == kVec2f_GrSLType); in set2f()
116 SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount); in set2f()
117 SkDEBUGCODE(this->printUnused(uni);) in set2f()
118 if (kUnusedUniform != uni.fFSLocation) { in set2f()
119 GR_GL_CALL(fGpu->glInterface(), Uniform2f(uni.fFSLocation, v0, v1)); in set2f()
121 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { in set2f()
122 GR_GL_CALL(fGpu->glInterface(), Uniform2f(uni.fVSLocation, v0, v1)); in set2f()
129 const Uniform& uni = fUniforms[u.toIndex()]; in set2fv() local
130 SkASSERT(uni.fType == kVec2f_GrSLType); in set2fv()
132 ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, arrayCount); in set2fv()
133 SkDEBUGCODE(this->printUnused(uni);) in set2fv()
134 if (kUnusedUniform != uni.fFSLocation) { in set2fv()
135 GR_GL_CALL(fGpu->glInterface(), Uniform2fv(uni.fFSLocation, arrayCount, v)); in set2fv()
137 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { in set2fv()
138 GR_GL_CALL(fGpu->glInterface(), Uniform2fv(uni.fVSLocation, arrayCount, v)); in set2fv()
143 const Uniform& uni = fUniforms[u.toIndex()]; in set3f() local
144 SkASSERT(uni.fType == kVec3f_GrSLType); in set3f()
145 SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount); in set3f()
146 SkDEBUGCODE(this->printUnused(uni);) in set3f()
147 if (kUnusedUniform != uni.fFSLocation) { in set3f()
148 GR_GL_CALL(fGpu->glInterface(), Uniform3f(uni.fFSLocation, v0, v1, v2)); in set3f()
150 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { in set3f()
151 GR_GL_CALL(fGpu->glInterface(), Uniform3f(uni.fVSLocation, v0, v1, v2)); in set3f()
158 const Uniform& uni = fUniforms[u.toIndex()]; in set3fv() local
159 SkASSERT(uni.fType == kVec3f_GrSLType); in set3fv()
161 ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, arrayCount); in set3fv()
162 SkDEBUGCODE(this->printUnused(uni);) in set3fv()
163 if (kUnusedUniform != uni.fFSLocation) { in set3fv()
164 GR_GL_CALL(fGpu->glInterface(), Uniform3fv(uni.fFSLocation, arrayCount, v)); in set3fv()
166 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { in set3fv()
167 GR_GL_CALL(fGpu->glInterface(), Uniform3fv(uni.fVSLocation, arrayCount, v)); in set3fv()
176 const Uniform& uni = fUniforms[u.toIndex()]; in set4f() local
177 SkASSERT(uni.fType == kVec4f_GrSLType); in set4f()
178 SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount); in set4f()
179 SkDEBUGCODE(this->printUnused(uni);) in set4f()
180 if (kUnusedUniform != uni.fFSLocation) { in set4f()
181 GR_GL_CALL(fGpu->glInterface(), Uniform4f(uni.fFSLocation, v0, v1, v2, v3)); in set4f()
183 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { in set4f()
184 GR_GL_CALL(fGpu->glInterface(), Uniform4f(uni.fVSLocation, v0, v1, v2, v3)); in set4f()
191 const Uniform& uni = fUniforms[u.toIndex()]; in set4fv() local
192 SkASSERT(uni.fType == kVec4f_GrSLType); in set4fv()
194 ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, arrayCount); in set4fv()
195 SkDEBUGCODE(this->printUnused(uni);) in set4fv()
196 if (kUnusedUniform != uni.fFSLocation) { in set4fv()
197 GR_GL_CALL(fGpu->glInterface(), Uniform4fv(uni.fFSLocation, arrayCount, v)); in set4fv()
199 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { in set4fv()
200 GR_GL_CALL(fGpu->glInterface(), Uniform4fv(uni.fVSLocation, arrayCount, v)); in set4fv()
205 const Uniform& uni = fUniforms[u.toIndex()]; in setMatrix3f() local
206 SkASSERT(uni.fType == kMat33f_GrSLType); in setMatrix3f()
207 SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount); in setMatrix3f()
208 SkDEBUGCODE(this->printUnused(uni);) in setMatrix3f()
209 if (kUnusedUniform != uni.fFSLocation) { in setMatrix3f()
210 GR_GL_CALL(fGpu->glInterface(), UniformMatrix3fv(uni.fFSLocation, 1, false, matrix)); in setMatrix3f()
212 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { in setMatrix3f()
213 GR_GL_CALL(fGpu->glInterface(), UniformMatrix3fv(uni.fVSLocation, 1, false, matrix)); in setMatrix3f()
218 const Uniform& uni = fUniforms[u.toIndex()]; in setMatrix4f() local
219 SkASSERT(uni.fType == kMat44f_GrSLType); in setMatrix4f()
220 SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount); in setMatrix4f()
221 SkDEBUGCODE(this->printUnused(uni);) in setMatrix4f()
222 if (kUnusedUniform != uni.fFSLocation) { in setMatrix4f()
223 GR_GL_CALL(fGpu->glInterface(), UniformMatrix4fv(uni.fFSLocation, 1, false, matrix)); in setMatrix4f()
225 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { in setMatrix4f()
226 GR_GL_CALL(fGpu->glInterface(), UniformMatrix4fv(uni.fVSLocation, 1, false, matrix)); in setMatrix4f()
233 const Uniform& uni = fUniforms[u.toIndex()]; in setMatrix3fv() local
234 SkASSERT(uni.fType == kMat33f_GrSLType); in setMatrix3fv()
236 ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, arrayCount); in setMatrix3fv()
237 SkDEBUGCODE(this->printUnused(uni);) in setMatrix3fv()
238 if (kUnusedUniform != uni.fFSLocation) { in setMatrix3fv()
240 UniformMatrix3fv(uni.fFSLocation, arrayCount, false, matrices)); in setMatrix3fv()
242 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { in setMatrix3fv()
244 UniformMatrix3fv(uni.fVSLocation, arrayCount, false, matrices)); in setMatrix3fv()
251 const Uniform& uni = fUniforms[u.toIndex()]; in setMatrix4fv() local
252 SkASSERT(uni.fType == kMat44f_GrSLType); in setMatrix4fv()
254 ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, arrayCount); in setMatrix4fv()
255 SkDEBUGCODE(this->printUnused(uni);) in setMatrix4fv()
256 if (kUnusedUniform != uni.fFSLocation) { in setMatrix4fv()
258 UniformMatrix4fv(uni.fFSLocation, arrayCount, false, matrices)); in setMatrix4fv()
260 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { in setMatrix4fv()
262 UniformMatrix4fv(uni.fVSLocation, arrayCount, false, matrices)); in setMatrix4fv()
283 void GrGLProgramDataManager::printUnused(const Uniform& uni) const { in printUnused()
284 if (kUnusedUniform == uni.fFSLocation && kUnusedUniform == uni.fVSLocation) { in printUnused()