From 2000ea7e272be45e2140e0dd5c2ee7cf4675b95c Mon Sep 17 00:00:00 2001 From: "Juan A. Suarez Romero" Date: Tue, 14 Sep 2021 09:37:16 +0200 Subject: [PATCH] mesa: allow TEXTURE_BUFFER target for ARB_texture_buffer_range While TEXTURE_BUFFER do not support texture parameters in ARB_texture_buffer_object specification, it does in ARB_texture_buffer_range, specifically TEXTURE_BUFFER_OFFSET and TEXTURE_BUFFER_SIZE. Signed-off-by: Juan A. Suarez Romero Reviewed-by: Ilia Mirkin Reviewed-by: Iago Toral Quiroga Part-of: --- src/mesa/main/texparam.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 3a3ea8aae94..ffa12134f17 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -1580,9 +1580,13 @@ _mesa_legal_get_tex_level_parameter_target(struct gl_context *ctx, GLenum target * * From the OpenGL 3.1 spec: * "target may also be TEXTURE_BUFFER, indicating the texture buffer." + * + * From ARB_texture_buffer_range, GL_TEXTURE is a valid target in + * GetTexLevelParameter. */ return (_mesa_is_desktop_gl(ctx) && ctx->Version >= 31) || - _mesa_has_OES_texture_buffer(ctx); + _mesa_has_OES_texture_buffer(ctx) || + _mesa_has_ARB_texture_buffer_range(ctx); case GL_TEXTURE_CUBE_MAP_ARRAY: return _mesa_has_texture_cube_map_array(ctx); }