i965: Remove artificial dependency between math instructions.
[mesa.git] / src / mesa / state_tracker / st_cb_eglimage.c
index 8c78e5ef47712ef9bb78a6015f45b2f2ec5ec0ea..34eb809591895ba7c1e65946d424777fbb11ef5e 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Mesa 3-D graphics library
- * Version:  7.9
  *
  * Copyright (C) 2010 LunarG Inc.
  *
@@ -26,7 +25,6 @@
  *    Chia-I Wu <olv@lunarg.com>
  */
 
-#include "main/mfeatures.h"
 #include "main/texobj.h"
 #include "main/teximage.h"
 #include "util/u_inlines.h"
@@ -101,7 +99,7 @@ st_bind_surface(struct gl_context *ctx, GLenum target,
    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)
@@ -126,14 +124,15 @@ 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(stObj);
    pipe_resource_reference(&stImage->pt, stObj->pt);
 
    stObj->width0 = ps->width;
    stObj->height0 = ps->height;
    stObj->depth0 = 1;
+   stObj->surface_format = ps->format;
 
-   _mesa_dirty_texobj(ctx, texObj, GL_TRUE);
+   _mesa_dirty_texobj(ctx, texObj);
 }
 
 static void