mesa/formats: add more MESA_FORMAT_LAYOUTs
[mesa.git] / src / mesa / state_tracker / st_cb_eglimage.c
index b871cdd1917086d50550d2e1dd6125c2518c0012..8531afb29a741b3bfbe27aa446bbdbe842be75ce 100644 (file)
@@ -96,10 +96,11 @@ st_bind_surface(struct gl_context *ctx, GLenum target,
                 struct gl_texture_image *texImage,
                 struct pipe_surface *ps)
 {
+   struct st_context *st = st_context(ctx);
    struct st_texture_object *stObj;
    struct st_texture_image *stImage;
    GLenum internalFormat;
-   gl_format texFormat;
+   mesa_format texFormat;
 
    /* map pipe format to base format */
    if (util_format_get_component_bits(ps->format, UTIL_FORMAT_COLORSPACE_RGB, 3) > 0)
@@ -124,7 +125,7 @@ st_bind_surface(struct gl_context *ctx, GLenum target,
 
    /* FIXME create a non-default sampler view from the pipe_surface? */
    pipe_resource_reference(&stObj->pt, ps->texture);
-   pipe_sampler_view_reference(&stObj->sampler_view, NULL);
+   st_texture_release_all_sampler_views(st, stObj);
    pipe_resource_reference(&stImage->pt, stObj->pt);
 
    stObj->width0 = ps->width;
@@ -132,7 +133,7 @@ st_bind_surface(struct gl_context *ctx, GLenum target,
    stObj->depth0 = 1;
    stObj->surface_format = ps->format;
 
-   _mesa_dirty_texobj(ctx, texObj, GL_TRUE);
+   _mesa_dirty_texobj(ctx, texObj);
 }
 
 static void