return MESA_GLINTEROP_INVALID_MIP_LEVEL;
}
- if (!st_finalize_texture(ctx, st->pipe, obj)) {
+ if (!st_finalize_texture(ctx, st->pipe, obj, 0)) {
mtx_unlock(&ctx->Shared->Mutex);
return MESA_GLINTEROP_OUT_OF_RESOURCES;
}
struct pipe_image_view *img = &images[i];
if (!_mesa_is_image_unit_valid(st->ctx, u) ||
- !st_finalize_texture(st->ctx, st->pipe, u->TexObj) ||
+ !st_finalize_texture(st->ctx, st->pipe, u->TexObj, 0) ||
!stObj->pt) {
memset(img, 0, sizeof(*img));
continue;
}
stObj = st_texture_object(texObj);
- retval = st_finalize_texture(ctx, st->pipe, texObj);
+ retval = st_finalize_texture(ctx, st->pipe, texObj, 0);
if (!retval) {
/* out of mem */
return GL_FALSE;
struct st_renderbuffer *strb = st_renderbuffer(rb);
struct pipe_resource *pt;
- if (!st_finalize_texture(ctx, pipe, att->Texture))
+ if (!st_finalize_texture(ctx, pipe, att->Texture, att->CubeMapFace))
return;
pt = st_get_texobj_resource(att->Texture);
GLboolean
st_finalize_texture(struct gl_context *ctx,
struct pipe_context *pipe,
- struct gl_texture_object *tObj)
+ struct gl_texture_object *tObj,
+ GLuint cubeMapFace)
{
struct st_context *st = st_context(ctx);
struct st_texture_object *stObj = st_texture_object(tObj);
}
- firstImage = st_texture_image_const(_mesa_base_tex_image(&stObj->base));
+ firstImage = st_texture_image_const(stObj->base.Image[cubeMapFace][stObj->base.BaseLevel]);
assert(firstImage);
/* If both firstImage and stObj point to a texture which can contain
extern GLboolean
st_finalize_texture(struct gl_context *ctx,
struct pipe_context *pipe,
- struct gl_texture_object *tObj);
+ struct gl_texture_object *tObj,
+ GLuint cubeMapFace);
extern void
*
* After this, we'll have all mipmap levels in one resource.
*/
- st_finalize_texture(ctx, st->pipe, texObj);
+ st_finalize_texture(ctx, st->pipe, texObj, 0);
}
pt = stObj->pt;