mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 16:00:09 +01:00
mesa: Mark buffer objects that are used as TexBOs
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
parent
fe3133fe78
commit
8db38ba4d2
2 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue