st/mesa: call is_format_supported() for compressed formats
[mesa.git] / src / mesa / state_tracker / st_cb_eglimage.c
index 3c4fe32090ba65738a0a6d1e7555443a6410995b..0fa1848e23233026b5696a9c3a4b282b0ac9b145 100644 (file)
@@ -74,7 +74,7 @@ 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;
@@ -126,7 +126,6 @@ st_bind_surface(GLcontext *ctx, GLenum target,
    texImage->TexFormat = st_pipe_format_to_mesa_format(ps->format);
    _mesa_set_fetch_functions(texImage, 2);
 
-   stObj->pipe = ctx->st->pipe;
    /* FIXME create a non-default sampler view from the pipe_surface? */
    pipe_resource_reference(&stImage->pt, ps->texture);
 
@@ -139,7 +138,7 @@ 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;