st/mesa: call is_format_supported() for compressed formats
[mesa.git] / src / mesa / state_tracker / st_cb_flush.c
index 30e7afcf2a317e3ff32043eaca82560cb4d7b38e..8c9959f954457d7b4d3cc632d1e7b8012db11cc0 100644 (file)
@@ -39,7 +39,6 @@
 #include "st_cb_flush.h"
 #include "st_cb_clear.h"
 #include "st_cb_fbo.h"
-#include "st_public.h"
 #include "st_manager.h"
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
 static INLINE GLboolean
 is_front_buffer_dirty(struct st_context *st)
 {
-   if (st->frontbuffer_status == FRONT_STATUS_DIRTY) {
-      return GL_TRUE;
-   }
-   else {
-      GLframebuffer *fb = st->ctx->DrawBuffer;
-      struct st_renderbuffer *strb
-         = st_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
-      return strb && strb->defined;
-   }
+   GLframebuffer *fb = st->ctx->DrawBuffer;
+   struct st_renderbuffer *strb
+      = st_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
+   return strb && strb->defined;
 }
 
 
@@ -78,10 +72,6 @@ display_front_buffer(struct st_context *st)
       /* Hook for copying "fake" frontbuffer if necessary:
        */
       st_manager_flush_frontbuffer(st);
-
-      /*
-        st->frontbuffer_status = FRONT_STATUS_UNDEFINED;
-      */
    }
 }
 
@@ -125,7 +115,7 @@ void st_finish( struct st_context *st )
  */
 static void st_glFlush(GLcontext *ctx)
 {
-   struct st_context *st = ctx->st;
+   struct st_context *st = st_context(ctx);
 
    /* Don't call st_finish() here.  It is not the state tracker's
     * responsibilty to inject sleeps in the hope of avoiding buffer
@@ -145,7 +135,7 @@ static void st_glFlush(GLcontext *ctx)
  */
 static void st_glFinish(GLcontext *ctx)
 {
-   struct st_context *st = ctx->st;
+   struct st_context *st = st_context(ctx);
 
    st_finish(st);