aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-10-03 09:40:56 -0600
committerBrian Paul <[email protected]>2016-10-06 11:29:32 -0600
commit0f3aee888efa820cb9875cfebc83cf8cc855f599 (patch)
tree71bc887f88134301713f64a9f51d740abd322d38 /src
parentb3127a96a942513d0c7df9e45857959244490f4c (diff)
mesa: call ctx->Driver.TexParameter() in texture_buffer_range()
To inform drivers of texture buffer offset/size changes, as we do for other texture object parameters. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/teximage.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index df8f0bcd454..411ec49efd1 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -5046,6 +5046,8 @@ texture_buffer_range(struct gl_context *ctx,
GLintptr offset, GLsizeiptr size,
const char *caller)
{
+ GLintptr oldOffset = texObj->BufferOffset;
+ GLsizeiptr oldSize = texObj->BufferSize;
mesa_format format;
/* NOTE: ARB_texture_buffer_object has interactions with
@@ -5078,6 +5080,17 @@ texture_buffer_range(struct gl_context *ctx,
}
_mesa_unlock_texture(ctx, texObj);
+ if (ctx->Driver.TexParameter) {
+ if (offset != oldOffset) {
+ ctx->Driver.TexParameter(ctx, texObj, GL_TEXTURE_BUFFER_OFFSET,
+ (const GLfloat *) &offset);
+ }
+ if (size != oldSize) {
+ ctx->Driver.TexParameter(ctx, texObj, GL_TEXTURE_BUFFER_SIZE,
+ (const GLfloat *) &size);
+ }
+ }
+
ctx->NewDriverState |= ctx->DriverFlags.NewTextureBuffer;
if (bufObj) {