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 <jasuarez@igalia.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13409>
This commit is contained in:

committed by
Marge Bot

parent
982c630cd5
commit
2000ea7e27
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user