projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Track separate programs for each stage
[mesa.git]
/
src
/
mesa
/
state_tracker
/
st_cb_flush.c
diff --git
a/src/mesa/state_tracker/st_cb_flush.c
b/src/mesa/state_tracker/st_cb_flush.c
index f7de4e7a4d620beaa5655abedf5ca7a7ff8e4136..5a2343d3aec30991a542c783dff0aebce9200144 100644
(file)
--- a/
src/mesa/state_tracker/st_cb_flush.c
+++ b/
src/mesa/state_tracker/st_cb_flush.c
@@
-39,7
+39,7
@@
#include "st_cb_flush.h"
#include "st_cb_clear.h"
#include "st_cb_fbo.h"
#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"
#include "pipe/p_screen.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
@@
-47,10
+47,14
@@
#include "util/u_blit.h"
#include "util/u_blit.h"
+/** Check if we have a front color buffer and if it's been drawn to. */
static INLINE GLboolean
is_front_buffer_dirty(struct st_context *st)
{
static INLINE GLboolean
is_front_buffer_dirty(struct st_context *st)
{
- return st->frontbuffer_status == FRONT_STATUS_DIRTY;
+ struct gl_framebuffer *fb = st->ctx->DrawBuffer;
+ struct st_renderbuffer *strb
+ = st_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
+ return strb && strb->defined;
}
}
@@
-60,21
+64,14
@@
is_front_buffer_dirty(struct st_context *st)
static void
display_front_buffer(struct st_context *st)
{
static void
display_front_buffer(struct st_context *st)
{
-
GL
framebuffer *fb = st->ctx->DrawBuffer;
+
struct gl_
framebuffer *fb = st->ctx->DrawBuffer;
struct st_renderbuffer *strb
= st_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
if (strb) {
struct st_renderbuffer *strb
= st_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
if (strb) {
- struct pipe_surface *front_surf = strb->surface;
-
/* Hook for copying "fake" frontbuffer if necessary:
*/
/* Hook for copying "fake" frontbuffer if necessary:
*/
- st->pipe->screen->flush_frontbuffer( st->pipe->screen, front_surf,
- st->pipe->priv );
-
- /*
- st->frontbuffer_status = FRONT_STATUS_UNDEFINED;
- */
+ st_manager_flush_frontbuffer(st);
}
}
}
}
@@
-116,9
+113,9
@@
void st_finish( struct st_context *st )
/**
* Called via ctx->Driver.Flush()
*/
/**
* Called via ctx->Driver.Flush()
*/
-static void st_glFlush(
GL
context *ctx)
+static void st_glFlush(
struct gl_
context *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
/* Don't call st_finish() here. It is not the state tracker's
* responsibilty to inject sleeps in the hope of avoiding buffer
@@
-136,9
+133,9
@@
static void st_glFlush(GLcontext *ctx)
/**
* Called via ctx->Driver.Finish()
*/
/**
* Called via ctx->Driver.Finish()
*/
-static void st_glFinish(
GL
context *ctx)
+static void st_glFinish(
struct gl_
context *ctx)
{
{
- struct st_context *st =
ctx->st
;
+ struct st_context *st =
st_context(ctx)
;
st_finish(st);
st_finish(st);