| Index: src/gpu/gl/GrGLGpu.cpp
|
| diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
|
| index 6daf9551706bc335f8d6a5588efe82f4633536a9..170fd70f90195f09c350bed8d9824449082f9aed 100644
|
| --- a/src/gpu/gl/GrGLGpu.cpp
|
| +++ b/src/gpu/gl/GrGLGpu.cpp
|
| @@ -3224,11 +3224,9 @@ void GrGLGpu::bindTexture(int unitIdx, const GrTextureParams& params, bool allow
|
| texture->setCachedTexParams(newTexParams, this->getResetTimestamp());
|
| }
|
|
|
| -void GrGLGpu::bindTexelBuffer(int unitIdx, intptr_t offsetInBytes, GrPixelConfig texelConfig,
|
| - GrGLBuffer* buffer) {
|
| +void GrGLGpu::bindTexelBuffer(int unitIdx, GrPixelConfig texelConfig, GrGLBuffer* buffer) {
|
| SkASSERT(this->glCaps().canUseConfigWithTexelBuffer(texelConfig));
|
| SkASSERT(unitIdx >= 0 && unitIdx < fHWBufferTextures.count());
|
| - SkASSERT(offsetInBytes >= 0 && offsetInBytes < (intptr_t) buffer->glSizeInBytes());
|
|
|
| BufferTexture& buffTex = fHWBufferTextures[unitIdx];
|
|
|
| @@ -3247,22 +3245,14 @@ void GrGLGpu::bindTexelBuffer(int unitIdx, intptr_t offsetInBytes, GrPixelConfig
|
| }
|
|
|
| if (buffer->getUniqueID() != buffTex.fAttachedBufferUniqueID ||
|
| - buffTex.fOffsetInBytes != offsetInBytes ||
|
| - buffTex.fTexelConfig != texelConfig ||
|
| - buffTex.fAttachedSizeInBytes != buffer->glSizeInBytes() - offsetInBytes) {
|
| -
|
| - size_t attachmentSizeInBytes = buffer->glSizeInBytes() - offsetInBytes;
|
| + buffTex.fTexelConfig != texelConfig) {
|
|
|
| this->setTextureUnit(unitIdx);
|
| - GL_CALL(TexBufferRange(GR_GL_TEXTURE_BUFFER,
|
| - this->glCaps().configSizedInternalFormat(texelConfig),
|
| - buffer->bufferID(),
|
| - offsetInBytes,
|
| - attachmentSizeInBytes));
|
| + GL_CALL(TexBuffer(GR_GL_TEXTURE_BUFFER,
|
| + this->glCaps().configSizedInternalFormat(texelConfig),
|
| + buffer->bufferID()));
|
|
|
| - buffTex.fOffsetInBytes = offsetInBytes;
|
| buffTex.fTexelConfig = texelConfig;
|
| - buffTex.fAttachedSizeInBytes = attachmentSizeInBytes;
|
| buffTex.fAttachedBufferUniqueID = buffer->getUniqueID();
|
|
|
| if (this->glCaps().textureSwizzleSupport() &&
|
|
|