X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fstate_tracker%2Fst_cb_eglimage.c;h=4aaf91d5a19dd6188a7ed5524f98a0b10c130696;hb=ea1744a66438b5863a8576087b07ad6ffdcd04c5;hp=a924f8722327921c5867a6b12270cf571235cd3b;hpb=ff20543c815a14fddad1efaaef1610454a1924d4;p=mesa.git diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c index a924f872232..4aaf91d5a19 100644 --- a/src/mesa/state_tracker/st_cb_eglimage.c +++ b/src/mesa/state_tracker/st_cb_eglimage.c @@ -74,12 +74,12 @@ st_egl_image_target_renderbuffer_storage(GLcontext *ctx, 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; @@ -129,6 +129,10 @@ st_bind_surface(GLcontext *ctx, GLenum target, /* 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); } @@ -138,11 +142,11 @@ st_egl_image_target_texture_2d(GLcontext *ctx, GLenum target, 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);