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;
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;
/* 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 */
}
/**
* 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;
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;
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,
*/
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 ||
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,
st_texture_create(struct st_context *st,
unsigned target,
unsigned format,
- GLenum internal_format,
GLuint first_level,
GLuint last_level,
GLuint width0,
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;
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;
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;