Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 2036953002: Abandon offset support with texel buffers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() &&
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698