Index: src/gpu/gl/GrGLProgramDataManager.cpp |
diff --git a/src/gpu/gl/GrGLProgramDataManager.cpp b/src/gpu/gl/GrGLProgramDataManager.cpp |
index 056e7b73dd2c4a2314130385c1b692de7fb130c8..9fe7d3b4f768c5c803d2e1d2248fe1947abb6855 100644 |
--- a/src/gpu/gl/GrGLProgramDataManager.cpp |
+++ b/src/gpu/gl/GrGLProgramDataManager.cpp |
@@ -102,6 +102,21 @@ void GrGLProgramDataManager::set1i(UniformHandle u, int32_t i) const { |
} |
} |
+void GrGLProgramDataManager::set1iv(UniformHandle u, |
+ int arrayCount, |
+ const int v[]) const { |
+ const Uniform& uni = fUniforms[u.toIndex()]; |
+ SkASSERT(uni.fType == kInt_GrSLType); |
+ SkASSERT(arrayCount > 0); |
+ ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, arrayCount); |
+ if (kUnusedUniform != uni.fFSLocation) { |
+ GR_GL_CALL(fGpu->glInterface(), Uniform1iv(uni.fFSLocation, arrayCount, v)); |
+ } |
+ if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { |
+ GR_GL_CALL(fGpu->glInterface(), Uniform1iv(uni.fVSLocation, arrayCount, v)); |
+ } |
+} |
+ |
void GrGLProgramDataManager::set1f(UniformHandle u, float v0) const { |
const Uniform& uni = fUniforms[u.toIndex()]; |
SkASSERT(uni.fType == kFloat_GrSLType); |