summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-06 13:12:24 -0600
committerBrian <[email protected]>2007-08-06 13:12:24 -0600
commitb9f4b0ce4e4465f149b64a0188e304f73dfa6e94 (patch)
treebc90c25cdc29ee96b701410430a384c265fc49fb /src/mesa
parentbc3b608317fcda659e7d910b4fab06426ae5f334 (diff)
Replace intel_texture_object with st_texture_object, intel_texture_image with st_texture_image
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i915pipe/intel_fbo.c14
-rw-r--r--src/mesa/drivers/dri/i915pipe/intel_tex.c24
-rw-r--r--src/mesa/drivers/dri/i915pipe/intel_tex.h24
-rw-r--r--src/mesa/drivers/dri/i915pipe/intel_tex_copy.c10
-rw-r--r--src/mesa/drivers/dri/i915pipe/intel_tex_image.c36
-rw-r--r--src/mesa/drivers/dri/i915pipe/intel_tex_subimage.c2
-rw-r--r--src/mesa/drivers/dri/i915pipe/intel_tex_validate.c28
7 files changed, 69 insertions, 69 deletions
diff --git a/src/mesa/drivers/dri/i915pipe/intel_fbo.c b/src/mesa/drivers/dri/i915pipe/intel_fbo.c
index 061c6bfa1fb..2f1aa00038d 100644
--- a/src/mesa/drivers/dri/i915pipe/intel_fbo.c
+++ b/src/mesa/drivers/dri/i915pipe/intel_fbo.c
@@ -532,7 +532,7 @@ intel_render_texture(GLcontext * ctx,
struct gl_texture_image *newImage
= att->Texture->Image[att->CubeMapFace][att->TextureLevel];
struct intel_renderbuffer *irb = intel_renderbuffer(att->Renderbuffer);
- struct intel_texture_image *intel_image;
+ struct st_texture_image *st_image;
GLuint imageOffset;
(void) fb;
@@ -558,26 +558,26 @@ intel_render_texture(GLcontext * ctx,
irb->Base.RefCount);
/* point the renderbufer's region to the texture image region */
- intel_image = intel_texture_image(newImage);
- if (irb->region != intel_image->mt->region) {
+ st_image = st_texture_image(newImage);
+ if (irb->region != st_image->mt->region) {
if (irb->region)
intel->pipe->region_release(intel->pipe, &irb->region);
- pipe_region_reference(&irb->region, intel_image->mt->region);
+ pipe_region_reference(&irb->region, st_image->mt->region);
}
/* compute offset of the particular 2D image within the texture region */
- imageOffset = st_miptree_image_offset(intel_image->mt,
+ imageOffset = st_miptree_image_offset(st_image->mt,
att->CubeMapFace,
att->TextureLevel);
if (att->Texture->Target == GL_TEXTURE_3D) {
- const GLuint *offsets = st_miptree_depth_offsets(intel_image->mt,
+ const GLuint *offsets = st_miptree_depth_offsets(st_image->mt,
att->TextureLevel);
imageOffset += offsets[att->Zoffset];
}
/* store that offset in the region */
- intel_image->mt->region->draw_offset = imageOffset;
+ st_image->mt->region->draw_offset = imageOffset;
/* update drawing region, etc */
intel_draw_buffer(ctx, fb);
diff --git a/src/mesa/drivers/dri/i915pipe/intel_tex.c b/src/mesa/drivers/dri/i915pipe/intel_tex.c
index c2f5727e6b4..94583cba974 100644
--- a/src/mesa/drivers/dri/i915pipe/intel_tex.c
+++ b/src/mesa/drivers/dri/i915pipe/intel_tex.c
@@ -10,12 +10,12 @@ intelIsTextureResident(GLcontext * ctx, struct gl_texture_object *texObj)
{
#if 0
struct intel_context *intel = intel_context(ctx);
- struct intel_texture_object *intelObj = intel_texture_object(texObj);
+ struct st_texture_object *stObj = st_texture_object(texObj);
return
- intelObj->mt &&
- intelObj->mt->region &&
- intel_is_region_resident(intel, intelObj->mt->region);
+ stObj->mt &&
+ stObj->mt->region &&
+ intel_is_region_resident(intel, stObj->mt->region);
#endif
return 1;
}
@@ -27,14 +27,14 @@ intelNewTextureImage(GLcontext * ctx)
{
DBG("%s\n", __FUNCTION__);
(void) ctx;
- return (struct gl_texture_image *) CALLOC_STRUCT(intel_texture_image);
+ return (struct gl_texture_image *) CALLOC_STRUCT(st_texture_image);
}
static struct gl_texture_object *
intelNewTextureObject(GLcontext * ctx, GLuint name, GLenum target)
{
- struct intel_texture_object *obj = CALLOC_STRUCT(intel_texture_object);
+ struct st_texture_object *obj = CALLOC_STRUCT(st_texture_object);
DBG("%s\n", __FUNCTION__);
_mesa_initialize_texture_object(&obj->base, name, target);
@@ -47,10 +47,10 @@ intelDeleteTextureObject(GLcontext *ctx,
struct gl_texture_object *texObj)
{
struct intel_context *intel = intel_context(ctx);
- struct intel_texture_object *intelObj = intel_texture_object(texObj);
+ struct st_texture_object *stObj = st_texture_object(texObj);
- if (intelObj->mt)
- st_miptree_release(intel->pipe, &intelObj->mt);
+ if (stObj->mt)
+ st_miptree_release(intel->pipe, &stObj->mt);
_mesa_delete_texture_object(ctx, texObj);
}
@@ -60,12 +60,12 @@ static void
intelFreeTextureImageData(GLcontext * ctx, struct gl_texture_image *texImage)
{
struct intel_context *intel = intel_context(ctx);
- struct intel_texture_image *intelImage = intel_texture_image(texImage);
+ struct st_texture_image *stImage = st_texture_image(texImage);
DBG("%s\n", __FUNCTION__);
- if (intelImage->mt) {
- st_miptree_release(intel->pipe, &intelImage->mt);
+ if (stImage->mt) {
+ st_miptree_release(intel->pipe, &stImage->mt);
}
if (texImage->Data) {
diff --git a/src/mesa/drivers/dri/i915pipe/intel_tex.h b/src/mesa/drivers/dri/i915pipe/intel_tex.h
index d90a80ffa9f..7a1cc919749 100644
--- a/src/mesa/drivers/dri/i915pipe/intel_tex.h
+++ b/src/mesa/drivers/dri/i915pipe/intel_tex.h
@@ -32,7 +32,7 @@
#include "intel_context.h"
#include "texmem.h"
-struct intel_texture_object
+struct st_texture_object
{
struct gl_texture_object base; /* The "parent" object */
@@ -58,7 +58,7 @@ struct intel_texture_object
-struct intel_texture_image
+struct st_texture_image
{
struct gl_texture_image base;
@@ -67,8 +67,8 @@ struct intel_texture_image
GLuint level;
GLuint face;
- /* If intelImage->mt != NULL, image data is stored here.
- * Else if intelImage->base.Data != NULL, image is stored there.
+ /* If stImage->mt != NULL, image data is stored here.
+ * Else if stImage->base.Data != NULL, image is stored there.
* Else there is no image data.
*/
struct pipe_mipmap_tree *mt;
@@ -187,25 +187,25 @@ GLuint intel_finalize_mipmap_tree(GLcontext *ctx,
#if 0
void intel_tex_map_images(struct pipe_context *pipe,
- struct intel_texture_object *intelObj);
+ struct st_texture_object *stObj);
void intel_tex_unmap_images(struct pipe_context *pipe,
- struct intel_texture_object *intelObj);
+ struct st_texture_object *stObj);
#endif
int intel_compressed_num_bytes(GLuint mesaFormat);
-static INLINE struct intel_texture_object *
-intel_texture_object(struct gl_texture_object *obj)
+static INLINE struct st_texture_object *
+st_texture_object(struct gl_texture_object *obj)
{
- return (struct intel_texture_object *) obj;
+ return (struct st_texture_object *) obj;
}
-static INLINE struct intel_texture_image *
-intel_texture_image(struct gl_texture_image *img)
+static INLINE struct st_texture_image *
+st_texture_image(struct gl_texture_image *img)
{
- return (struct intel_texture_image *) img;
+ return (struct st_texture_image *) img;
}
diff --git a/src/mesa/drivers/dri/i915pipe/intel_tex_copy.c b/src/mesa/drivers/dri/i915pipe/intel_tex_copy.c
index 88cdee45838..b62aaaeebb2 100644
--- a/src/mesa/drivers/dri/i915pipe/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/i915pipe/intel_tex_copy.c
@@ -84,7 +84,7 @@ get_teximage_source(struct intel_context *intel, GLenum internalFormat)
static GLboolean
do_copy_texsubimage(struct intel_context *intel,
- struct intel_texture_image *intelImage,
+ struct st_texture_image *intelImage,
GLenum internalFormat,
GLint dstx, GLint dsty,
GLint x, GLint y, GLsizei width, GLsizei height)
@@ -186,7 +186,7 @@ intelCopyTexImage1D(GLcontext * ctx, GLenum target, GLint level,
&ctx->DefaultPacking, texObj, texImage);
if (!do_copy_texsubimage(intel_context(ctx),
- intel_texture_image(texImage),
+ st_texture_image(texImage),
internalFormat, 0, 0, x, y, width, 1))
goto fail;
@@ -223,7 +223,7 @@ intelCopyTexImage2D(GLcontext * ctx, GLenum target, GLint level,
if (!do_copy_texsubimage(intel_context(ctx),
- intel_texture_image(texImage),
+ st_texture_image(texImage),
internalFormat, 0, 0, x, y, width, height))
goto fail;
@@ -256,7 +256,7 @@ intelCopyTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
*/
if (!do_copy_texsubimage(intel_context(ctx),
- intel_texture_image(texImage),
+ st_texture_image(texImage),
internalFormat, xoffset, 0, x, y, width, 1)) {
#if 0
_swrast_copy_texsubimage1d(ctx, target, level, xoffset, x, y, width);
@@ -285,7 +285,7 @@ intelCopyTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
*/
if (!do_copy_texsubimage(intel_context(ctx),
- intel_texture_image(texImage),
+ st_texture_image(texImage),
internalFormat,
xoffset, yoffset, x, y, width, height)) {
#if 0
diff --git a/src/mesa/drivers/dri/i915pipe/intel_tex_image.c b/src/mesa/drivers/dri/i915pipe/intel_tex_image.c
index ea7b26b7f1e..2825df37f6e 100644
--- a/src/mesa/drivers/dri/i915pipe/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i915pipe/intel_tex_image.c
@@ -61,9 +61,9 @@ logbase2(int n)
* saving is worth it.
*/
static void
-guess_and_alloc_mipmap_tree(struct intel_context *intel,
- struct intel_texture_object *intelObj,
- struct intel_texture_image *intelImage)
+guess_and_alloc_mipmap_tree(struct pipe_context *pipe,
+ struct st_texture_object *intelObj,
+ struct st_texture_image *intelImage)
{
GLuint firstLevel;
GLuint lastLevel;
@@ -125,7 +125,7 @@ guess_and_alloc_mipmap_tree(struct intel_context *intel,
assert(!intelObj->mt);
if (intelImage->base.IsCompressed)
comp_byte = intel_compressed_num_bytes(intelImage->base.TexFormat->MesaFormat);
- intelObj->mt = st_miptree_create(intel->pipe,
+ intelObj->mt = st_miptree_create(pipe,
intelObj->base.Target,
intelImage->base.InternalFormat,
firstLevel,
@@ -190,7 +190,7 @@ check_pbo_format(GLint internalFormat,
*/
static GLboolean
try_pbo_upload(struct intel_context *intel,
- struct intel_texture_image *intelImage,
+ struct st_texture_image *intelImage,
const struct gl_pixelstore_attrib *unpack,
GLint internalFormat,
GLint width, GLint height,
@@ -250,7 +250,7 @@ try_pbo_upload(struct intel_context *intel,
static GLboolean
try_pbo_zcopy(struct intel_context *intel,
- struct intel_texture_image *intelImage,
+ struct st_texture_image *intelImage,
const struct gl_pixelstore_attrib *unpack,
GLint internalFormat,
GLint width, GLint height,
@@ -277,8 +277,8 @@ intelTexImage(GLcontext * ctx,
struct gl_texture_image *texImage, GLsizei imageSize, int compressed)
{
struct intel_context *intel = intel_context(ctx);
- struct intel_texture_object *intelObj = intel_texture_object(texObj);
- struct intel_texture_image *intelImage = intel_texture_image(texImage);
+ struct st_texture_object *intelObj = st_texture_object(texObj);
+ struct st_texture_image *intelImage = st_texture_image(texImage);
GLint postConvWidth = width;
GLint postConvHeight = height;
GLint texelBytes, sizeInBytes;
@@ -352,7 +352,7 @@ intelTexImage(GLcontext * ctx,
}
if (!intelObj->mt) {
- guess_and_alloc_mipmap_tree(intel, intelObj, intelImage);
+ guess_and_alloc_mipmap_tree(intel->pipe, intelObj, intelImage);
if (!intelObj->mt) {
DBG("guess_and_alloc_mipmap_tree: failed\n");
}
@@ -572,7 +572,7 @@ intel_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
struct gl_texture_image *texImage, int compressed)
{
struct intel_context *intel = intel_context(ctx);
- struct intel_texture_image *intelImage = intel_texture_image(texImage);
+ struct st_texture_image *intelImage = st_texture_image(texImage);
/* Map */
if (intelImage->mt) {
@@ -647,18 +647,18 @@ intelSetTexOffset(__DRIcontext *pDRICtx, GLint texname,
struct intel_context *intel = (struct intel_context*)
((__DRIcontextPrivate*)pDRICtx->private)->driverPrivate;
struct gl_texture_object *tObj = _mesa_lookup_texture(&intel->ctx, texname);
- struct intel_texture_object *intelObj = intel_texture_object(tObj);
+ struct st_texture_object *stObj = st_texture_object(tObj);
- if (!intelObj)
+ if (!stObj)
return;
- if (intelObj->mt)
- st_miptree_release(intel->pipe, &intelObj->mt);
+ if (stObj->mt)
+ st_miptree_release(intel->pipe, &stObj->mt);
- intelObj->imageOverride = GL_TRUE;
- intelObj->depthOverride = depth;
- intelObj->pitchOverride = pitch;
+ stObj->imageOverride = GL_TRUE;
+ stObj->depthOverride = depth;
+ stObj->pitchOverride = pitch;
if (offset)
- intelObj->textureOffset = offset;
+ stObj->textureOffset = offset;
}
diff --git a/src/mesa/drivers/dri/i915pipe/intel_tex_subimage.c b/src/mesa/drivers/dri/i915pipe/intel_tex_subimage.c
index 27b56e907d6..c5aab96ea7f 100644
--- a/src/mesa/drivers/dri/i915pipe/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/i915pipe/intel_tex_subimage.c
@@ -52,7 +52,7 @@ intelTexSubimage(GLcontext * ctx,
struct gl_texture_image *texImage)
{
struct intel_context *intel = intel_context(ctx);
- struct intel_texture_image *intelImage = intel_texture_image(texImage);
+ struct st_texture_image *intelImage = st_texture_image(texImage);
GLuint dstRowStride;
DBG("%s target %s level %d offset %d,%d %dx%d\n", __FUNCTION__,
diff --git a/src/mesa/drivers/dri/i915pipe/intel_tex_validate.c b/src/mesa/drivers/dri/i915pipe/intel_tex_validate.c
index 2083a2434d8..d0631a88f19 100644
--- a/src/mesa/drivers/dri/i915pipe/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/i915pipe/intel_tex_validate.c
@@ -14,7 +14,7 @@
* GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, and GL_TEXTURE_MAX_LEVEL.
*/
static void
-intel_calculate_first_last_level(struct intel_texture_object *intelObj)
+intel_calculate_first_last_level(struct st_texture_object *intelObj)
{
struct gl_texture_object *tObj = &intelObj->base;
const struct gl_texture_image *const baseImage =
@@ -64,8 +64,8 @@ intel_calculate_first_last_level(struct intel_texture_object *intelObj)
static void
copy_image_data_to_tree(struct pipe_context *pipe,
- struct intel_texture_object *intelObj,
- struct intel_texture_image *intelImage)
+ struct st_texture_object *intelObj,
+ struct st_texture_image *intelImage)
{
if (intelImage->mt) {
/* Copy potentially with the blitter:
@@ -106,13 +106,13 @@ intel_finalize_mipmap_tree(GLcontext *ctx,
GLboolean *needFlush)
{
struct gl_texture_object *tObj = ctx->Texture.Unit[unit]._Current;
- struct intel_texture_object *intelObj = intel_texture_object(tObj);
+ struct st_texture_object *intelObj = st_texture_object(tObj);
int comp_byte = 0;
int cpp;
GLuint face, i;
GLuint nr_faces = 0;
- struct intel_texture_image *firstImage;
+ struct st_texture_image *firstImage;
*needFlush = GL_FALSE;
@@ -124,7 +124,7 @@ intel_finalize_mipmap_tree(GLcontext *ctx,
*/
intel_calculate_first_last_level(intelObj);
firstImage =
- intel_texture_image(intelObj->base.Image[0][intelObj->firstLevel]);
+ st_texture_image(intelObj->base.Image[0][intelObj->firstLevel]);
/* Fallback case:
*/
@@ -201,8 +201,8 @@ intel_finalize_mipmap_tree(GLcontext *ctx,
nr_faces = (intelObj->base.Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1;
for (face = 0; face < nr_faces; face++) {
for (i = intelObj->firstLevel; i <= intelObj->lastLevel; i++) {
- struct intel_texture_image *intelImage =
- intel_texture_image(intelObj->base.Image[face][i]);
+ struct st_texture_image *intelImage =
+ st_texture_image(intelObj->base.Image[face][i]);
/* Need to import images in main memory or held in other trees.
*/
@@ -225,7 +225,7 @@ intel_finalize_mipmap_tree(GLcontext *ctx,
#if 0 /* unused? */
void
intel_tex_map_images(struct pipe_context *pipe,
- struct intel_texture_object *intelObj)
+ struct st_texture_object *intelObj)
{
GLuint nr_faces = (intelObj->base.Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1;
GLuint face, i;
@@ -234,8 +234,8 @@ intel_tex_map_images(struct pipe_context *pipe,
for (face = 0; face < nr_faces; face++) {
for (i = intelObj->firstLevel; i <= intelObj->lastLevel; i++) {
- struct intel_texture_image *intelImage =
- intel_texture_image(intelObj->base.Image[face][i]);
+ struct st_texture_image *intelImage =
+ st_texture_image(intelObj->base.Image[face][i]);
if (intelImage->mt) {
intelImage->base.Data =
@@ -257,15 +257,15 @@ intel_tex_map_images(struct pipe_context *pipe,
void
intel_tex_unmap_images(struct pipe_context *pipe,
- struct intel_texture_object *intelObj)
+ struct st_texture_object *intelObj)
{
GLuint nr_faces = (intelObj->base.Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1;
GLuint face, i;
for (face = 0; face < nr_faces; face++) {
for (i = intelObj->firstLevel; i <= intelObj->lastLevel; i++) {
- struct intel_texture_image *intelImage =
- intel_texture_image(intelObj->base.Image[face][i]);
+ struct st_texture_image *intelImage =
+ st_texture_image(intelObj->base.Image[face][i]);
if (intelImage->mt) {
st_miptree_image_unmap(pipe, intelImage->mt);