Mesa (master): mesa: call ctx->Driver.TexParameter() in texture_buffer_range()
Brian Paul
brianp at kemper.freedesktop.org
Thu Oct 6 17:30:56 UTC 2016
Module: Mesa
Branch: master
Commit: 0f3aee888efa820cb9875cfebc83cf8cc855f599
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f3aee888efa820cb9875cfebc83cf8cc855f599
Author: Brian Paul <brianp at vmware.com>
Date: Mon Oct 3 09:40:56 2016 -0600
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 <nicolai.haehnle at amd.com>
---
src/mesa/main/teximage.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index df8f0bc..411ec49 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) {
More information about the mesa-commit
mailing list