struct gl_renderbuffer *rb,
GLeglImageOES image_handle)
{
- struct st_context *st = ctx->st;
+ struct st_context *st = st_context(ctx);
struct st_renderbuffer *strb = st_renderbuffer(rb);
struct pipe_surface *ps;
unsigned usage;
- usage = PIPE_BIND_RENDER_TARGET | PIPE_BIND_BLIT_SOURCE | PIPE_BIND_BLIT_DESTINATION;
+ usage = PIPE_BIND_RENDER_TARGET;
ps = st_manager_get_egl_image_surface(st, (void *) image_handle, usage);
if (ps) {
strb->Base.Width = ps->width;
/* FIXME create a non-default sampler view from the pipe_surface? */
pipe_resource_reference(&stImage->pt, ps->texture);
+ stObj->width0 = ps->width;
+ stObj->height0 = ps->height;
+ stObj->depth0 = 1;
+
_mesa_dirty_texobj(ctx, texObj, GL_TRUE);
}
struct gl_texture_image *texImage,
GLeglImageOES image_handle)
{
- struct st_context *st = ctx->st;
+ struct st_context *st = st_context(ctx);
struct pipe_surface *ps;
unsigned usage;
- usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_BLIT_DESTINATION | PIPE_BIND_BLIT_SOURCE;
+ usage = PIPE_BIND_SAMPLER_VIEW;
ps = st_manager_get_egl_image_surface(st, (void *) image_handle, usage);
if (ps) {
st_bind_surface(ctx, target, texObj, texImage, ps);