28
28
#ifndef _INTEL_TEX_OBJ_H
29
29
#define _INTEL_TEX_OBJ_H
31
#include "swrast/s_context.h"
31
34
struct intel_texture_object
33
struct gl_texture_object base; /* The "parent" object */
36
struct gl_texture_object base;
35
38
/* This is a mirror of base._MaxLevel, updated at validate time,
36
39
* except that we don't bother with the non-base levels for
48
51
struct intel_mipmap_tree *mt;
56
* intel_texture_image is a subclass of swrast_texture_image because we
57
* sometimes fall back to using the swrast module for software rendering.
51
59
struct intel_texture_image
53
struct gl_texture_image base;
55
/* These aren't stored in gl_texture_image
61
struct swrast_texture_image base;
60
63
/* If intelImage->mt != NULL, image data is stored here.
61
* Else if intelImage->base.Data != NULL, image is stored there.
64
* Else if intelImage->base.Buffer != NULL, image is stored there.
62
65
* Else there is no image data.
64
67
struct intel_mipmap_tree *mt;
65
GLboolean used_as_render_target;
68
* \name Renderbuffers for faking packed depth/stencil
70
* These renderbuffers are non-null only if the intel_context is using
71
* separate stencil and this texture has a packed depth/stencil format. When
72
* glFramebufferTexture is called on this image, the resultant renderbuffer
73
* wrapper reuses these renderbuffers as its own.
75
* \see intel_wrap_texture
76
* \see intel_tex_image_s8z24_create_renderbuffers
77
* \see intel_tex_image_s8z24_scatter
78
* \see intel_tex_image_s8z24_gather
84
* The depth buffer has format X8_Z24. The x8 bits are undefined unless
85
* intel_tex_image_s8z24_gather has been immediately called. The depth buffer
86
* resuses the image miptree's region and hiz_region as its own.
88
struct gl_renderbuffer *depth_rb;
91
* The stencil buffer has format S8 and keeps its data in its own region.
93
struct gl_renderbuffer *stencil_rb;
68
bool used_as_render_target;
98
71
static INLINE struct intel_texture_object *