mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
mesa/teximage: add _mesa_is_cube_map_texture utility method
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
4e33278b39
commit
c5cf16a4fc
2 changed files with 22 additions and 0 deletions
|
|
@ -242,6 +242,24 @@ _mesa_is_array_texture(GLenum target)
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if a target is a cube map.
|
||||
*
|
||||
* \param target texture target.
|
||||
*
|
||||
* \return true if the target is a cube map, false otherwise.
|
||||
*/
|
||||
bool
|
||||
_mesa_is_cube_map_texture(GLenum target)
|
||||
{
|
||||
switch(target) {
|
||||
case GL_TEXTURE_CUBE_MAP:
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the proxy target which corresponds to the given texture target
|
||||
|
|
|
|||
|
|
@ -256,6 +256,10 @@ _mesa_texture_buffer_range(struct gl_context *ctx,
|
|||
struct gl_buffer_object *bufObj,
|
||||
GLintptr offset, GLsizeiptr size,
|
||||
const char *caller);
|
||||
|
||||
bool
|
||||
_mesa_is_cube_map_texture(GLenum target);
|
||||
|
||||
/*@}*/
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue