From: Chris Forbes Date: Wed, 1 Oct 2014 07:04:37 +0000 (+1300) Subject: mesa: Mark buffer objects that are used as TexBOs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8db38ba4d2f6dee62009f40208cb11bc6547167f;p=mesa.git mesa: Mark buffer objects that are used as TexBOs Signed-off-by: Chris Forbes Reviewed-by: Anuj Phogat --- diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 881c26ca3bc..2a01508ed6b 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1469,6 +1469,7 @@ struct gl_buffer_mapping { */ typedef enum { USAGE_UNIFORM_BUFFER = 0x1, + USAGE_TEXTURE_BUFFER = 0x2, } gl_buffer_usage; @@ -4069,6 +4070,8 @@ struct gl_driver_flags */ uint64_t NewUniformBuffer; + uint64_t NewTextureBuffer; + /** * gl_context::AtomicBufferBindings */ diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index c0298af8ea6..4f4bb11dd5c 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -4652,6 +4652,12 @@ texbufferrange(struct gl_context *ctx, GLenum target, GLenum internalFormat, texObj->BufferSize = size; } _mesa_unlock_texture(ctx, texObj); + + ctx->NewDriverState |= ctx->DriverFlags.NewTextureBuffer; + + if (bufObj) { + bufObj->UsageHistory |= USAGE_TEXTURE_BUFFER; + } }