diff options
Diffstat (limited to 'src/gpu/gl/GrGLProgram.cpp')
-rw-r--r-- | src/gpu/gl/GrGLProgram.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp index 1f2e1c8446..8a61ecafa7 100644 --- a/src/gpu/gl/GrGLProgram.cpp +++ b/src/gpu/gl/GrGLProgram.cpp @@ -32,6 +32,7 @@ GrGLProgram::GrGLProgram(GrGLGpu* gpu, GrGLuint programID, const UniformInfoArray& uniforms, const UniformInfoArray& samplers, + const UniformInfoArray& imageStorages, const VaryingInfoArray& pathProcVaryings, GrGLSLPrimitiveProcessor* geometryProcessor, GrGLSLXferProcessor* xferProcessor, @@ -47,6 +48,7 @@ GrGLProgram::GrGLProgram(GrGLGpu* gpu, // Assign texture units to sampler uniforms one time up front. GL_CALL(UseProgram(fProgramID)); fProgramDataManager.setSamplers(samplers); + fProgramDataManager.setImageStorages(imageStorages); } GrGLProgram::~GrGLProgram() { @@ -162,6 +164,11 @@ void GrGLProgram::bindTextures(const GrProcessor& processor, fGpu->bindTexelBuffer((*nextSamplerIdx)++, access.texelConfig(), static_cast<GrGLBuffer*>(access.buffer())); } + for (int i = 0; i < processor.numImageStorages(); ++i) { + const GrProcessor::ImageStorageAccess& access = processor.imageStorageAccess(i); + fGpu->bindImageStorage((*nextSamplerIdx)++, access.ioType(), + static_cast<GrGLTexture *>(access.texture())); + } } void GrGLProgram::generateMipmaps(const GrProcessor& processor, |