diff options
author | Michel Dänzer <[email protected]> | 2007-12-11 19:02:26 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2007-12-11 19:10:56 +0100 |
commit | 88723b2fc84628c1bc1e0008b88602b85e8668be (patch) | |
tree | 3dbe0b55c4257ddc33013820f933819588134c31 /src/mesa/state_tracker | |
parent | 13699463a33c1adf44005125c488e886e074a05b (diff) |
Remove internal_format field from struct pipe_texture.
It's state tracker specific / not really necessary anyway.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 15 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 5 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_texture.c | 6 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_texture.h | 1 |
4 files changed, 10 insertions, 17 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 5d4c443c01a..0bc48b70396 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -469,8 +469,8 @@ make_texture(struct st_context *st, assert(pipeFormat); cpp = st_sizeof_format(pipeFormat); - pt = st_texture_create(st, PIPE_TEXTURE_2D, pipeFormat, baseFormat, 0, 0, - width, height, 1, 0); + pt = st_texture_create(st, PIPE_TEXTURE_2D, pipeFormat, 0, 0, width, height, + 1, 0); if (!pt) return NULL; @@ -987,7 +987,6 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height, struct pipe_context *pipe = ctx->st->pipe; struct pipe_surface *surface; uint format = 0, cpp, comp; - GLenum internal_format; ubyte *dest; struct pipe_texture *pt; int row, col; @@ -995,13 +994,11 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height, /* find a texture format we know */ if (pipe->is_format_supported( pipe, PIPE_FORMAT_U_I8, PIPE_TEXTURE )) { format = PIPE_FORMAT_U_I8; - internal_format = GL_INTENSITY8; cpp = 1; comp = 0; } else if (pipe->is_format_supported( pipe, PIPE_FORMAT_A8R8G8B8_UNORM, PIPE_TEXTURE )) { format = PIPE_FORMAT_A8R8G8B8_UNORM; - internal_format = GL_RGBA8; cpp = 4; comp = 3; /* alpha channel */ /*XXX little-endian dependency */ } @@ -1013,8 +1010,8 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height, /** * Create a texture. */ - pt = st_texture_create(ctx->st, PIPE_TEXTURE_2D, format, internal_format, - 0, 0, width, height, 1, 0); + pt = st_texture_create(ctx->st, PIPE_TEXTURE_2D, format, 0, 0, width, height, + 1, 0); if (!pt) return NULL; @@ -1237,8 +1234,8 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy, psRead = rbRead->surface; format = psRead->format; - pt = st_texture_create(ctx->st, PIPE_TEXTURE_2D, format, - rbRead->Base.InternalFormat, 0, 0, width, height, 1, 0); + pt = st_texture_create(ctx->st, PIPE_TEXTURE_2D, format, 0, 0, width, height, + 1, 0); if (!pt) return; diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 39dd21dc590..e813bdb47af 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -366,7 +366,6 @@ guess_and_alloc_texture(struct st_context *st, stObj->pt = st_texture_create(st, gl_target_to_pipe(stObj->base.Target), st_mesa_format_to_pipe_format(stImage->base.TexFormat->MesaFormat), - stImage->base.InternalFormat, firstLevel, lastLevel, width, @@ -1481,7 +1480,8 @@ st_finalize_texture(GLcontext *ctx, */ if (stObj->pt && (stObj->pt->target != gl_target_to_pipe(stObj->base.Target) || - stObj->pt->internal_format != firstImage->base.InternalFormat || + stObj->pt->format != + st_mesa_format_to_pipe_format(firstImage->base.TexFormat->MesaFormat) || stObj->pt->first_level != stObj->firstLevel || stObj->pt->last_level != stObj->lastLevel || stObj->pt->width[0] != firstImage->base.Width || @@ -1499,7 +1499,6 @@ st_finalize_texture(GLcontext *ctx, stObj->pt = st_texture_create(ctx->st, gl_target_to_pipe(stObj->base.Target), st_mesa_format_to_pipe_format(firstImage->base.TexFormat->MesaFormat), - firstImage->base.InternalFormat, stObj->firstLevel, stObj->lastLevel, firstImage->base.Width, diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 1ec45148736..c7d28eeca20 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -63,7 +63,6 @@ struct pipe_texture * st_texture_create(struct st_context *st, unsigned target, unsigned format, - GLenum internal_format, GLuint first_level, GLuint last_level, GLuint width0, @@ -77,7 +76,7 @@ st_texture_create(struct st_context *st, DBG("%s target %s format %s level %d..%d\n", __FUNCTION__, _mesa_lookup_enum_by_nr(target), - _mesa_lookup_enum_by_nr(internal_format), first_level, last_level); + _mesa_lookup_enum_by_nr(format), first_level, last_level); if (!pt) return NULL; @@ -86,7 +85,6 @@ st_texture_create(struct st_context *st, pt->target = target; pt->format = format; - pt->internal_format = internal_format; pt->first_level = first_level; pt->last_level = last_level; pt->width[0] = width0; @@ -119,7 +117,7 @@ st_texture_match_image(struct pipe_texture *pt, if (image->Border) return GL_FALSE; - if (image->InternalFormat != pt->internal_format || + if (st_mesa_format_to_pipe_format(image->TexFormat->MesaFormat) != pt->format || image->IsCompressed != pt->compressed) return GL_FALSE; diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h index 2be53abf3ae..7524c219e06 100644 --- a/src/mesa/state_tracker/st_texture.h +++ b/src/mesa/state_tracker/st_texture.h @@ -39,7 +39,6 @@ extern struct pipe_texture * st_texture_create(struct st_context *st, unsigned target, unsigned format, - GLenum internal_format, GLuint first_level, GLuint last_level, GLuint width0, |