summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_context.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-04-09 18:39:51 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-04-09 18:39:51 -0600
commit311e40268414649f047ee177ba22a17a2d437843 (patch)
tree41aa5d3e308e25c1753eb882eb25d1bc80918316 /src/mesa/state_tracker/st_context.h
parent54d7c399a888283711bdc00f93cb54a3ce0b30eb (diff)
gallium: more elaborate tracking of front color buffer state
This fixes the case where the app calls SwapBuffers then calls glReadPixels to read the front color buffer. We now keep track of when the front buffer is a _logically_ copy of the back buffer (after SwapBuffers) and read from the back color buffer instead of the front.
Diffstat (limited to 'src/mesa/state_tracker/st_context.h')
-rw-r--r--src/mesa/state_tracker/st_context.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 212687cf4a..d89e54c43c 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -45,6 +45,11 @@ struct blit_state;
struct bitmap_cache;
+#define FRONT_STATUS_UNDEFINED 0
+#define FRONT_STATUS_DIRTY 1
+#define FRONT_STATUS_COPY_OF_BACK 2
+
+
#define ST_NEW_MESA 0x1 /* Mesa state has changed */
#define ST_NEW_FRAGMENT_PROGRAM 0x2
#define ST_NEW_VERTEX_PROGRAM 0x4
@@ -104,9 +109,7 @@ struct st_context
struct gl_fragment_program *fragment_program;
} cb;
- struct {
- GLuint frontbuffer_dirty:1;
- } flags;
+ GLuint frontbuffer_status; /**< one of FRONT_STATUS_ */
char vendor[100];
char renderer[100];