X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmesa%2Fdrivers%2Fdri%2Fintel%2Fintel_tex_obj.h;h=e30dd8ae7a3f9b748c37ed3075d551d8fdd0c79f;hb=57407bcaf8b0ee249a64b25483dcd1fc1268cf5c;hp=5f60e0ea4f3a1bc3af6119fea49511647320bb24;hpb=685340a53e1dcb2a888e634ee71ba24356befe69;p=mesa.git diff --git a/src/mesa/drivers/dri/intel/intel_tex_obj.h b/src/mesa/drivers/dri/intel/intel_tex_obj.h index 5f60e0ea4f3..e30dd8ae7a3 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_obj.h +++ b/src/mesa/drivers/dri/intel/intel_tex_obj.h @@ -28,41 +28,45 @@ #ifndef _INTEL_TEX_OBJ_H #define _INTEL_TEX_OBJ_H +#include "swrast/s_context.h" + + struct intel_texture_object { - struct gl_texture_object base; /* The "parent" object */ + struct gl_texture_object base; - /* The mipmap tree must include at least these levels once - * validated: + /* This is a mirror of base._MaxLevel, updated at validate time, + * except that we don't bother with the non-base levels for + * non-mipmapped textures. */ - GLuint firstLevel; - GLuint lastLevel; - - /* Offset for firstLevel image: - */ - GLuint textureOffset; + unsigned int _MaxLevel; /* On validation any active images held in main memory or in other * regions will be copied to this region and the old storage freed. */ struct intel_mipmap_tree *mt; + + /** + * Set when mipmap trees in the texture images of this texture object + * might not all be the mipmap tree above. + */ + bool needs_validate; }; + +/** + * intel_texture_image is a subclass of swrast_texture_image because we + * sometimes fall back to using the swrast module for software rendering. + */ struct intel_texture_image { - struct gl_texture_image base; - - /* These aren't stored in gl_texture_image - */ - GLuint level; - GLuint face; + struct swrast_texture_image base; /* If intelImage->mt != NULL, image data is stored here. - * Else if intelImage->base.Data != NULL, image is stored there. + * Else if intelImage->base.Buffer != NULL, image is stored there. * Else there is no image data. */ struct intel_mipmap_tree *mt; - GLboolean used_as_render_target; }; static INLINE struct intel_texture_object *