diff options
Diffstat (limited to 'src/mesa/main/texobj.h')
-rw-r--r-- | src/mesa/main/texobj.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h index 03dfbe3045d..850091e9636 100644 --- a/src/mesa/main/texobj.h +++ b/src/mesa/main/texobj.h @@ -35,6 +35,7 @@ #include "compiler.h" #include "glheader.h" #include "mtypes.h" +#include "samplerobj.h" /** @@ -77,6 +78,18 @@ _mesa_reference_texobj(struct gl_texture_object **ptr, } +/** Is the texture "complete" with respect to the given sampler state? */ +static inline GLboolean +_mesa_is_texture_complete(const struct gl_texture_object *texObj, + const struct gl_sampler_object *sampler) +{ + if (_mesa_is_mipmap_filter(sampler)) + return texObj->_MipmapComplete; + else + return texObj->_BaseComplete; +} + + extern void _mesa_test_texobj_completeness( const struct gl_context *ctx, struct gl_texture_object *obj ); |