mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 13:40:11 +01:00
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@amd.com>
This commit is contained in:
parent
b3127a96a9
commit
0f3aee888e
1 changed files with 13 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue