summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_fbo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_fbo.h')
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h
index 9d15582d78..b7e9280e8c 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.h
+++ b/src/mesa/drivers/dri/intel/intel_fbo.h
@@ -39,14 +39,7 @@ struct intel_framebuffer
{
struct gl_framebuffer Base;
- struct intel_renderbuffer *color_rb[3];
-
- /* Drawable page flipping state */
- GLboolean pf_active;
- GLuint pf_seq;
- GLint pf_planes;
- GLint pf_current_page;
- GLint pf_num_pages;
+ struct intel_renderbuffer *color_rb[2];
/* VBI
*/
@@ -76,8 +69,6 @@ struct intel_renderbuffer
GLuint PairedDepth; /**< only used if this is a depth renderbuffer */
GLuint PairedStencil; /**< only used if this is a stencil renderbuffer */
- GLuint pf_pending; /**< sequence number of pending flip */
-
GLuint vbl_pending; /**< vblank sequence number of pending flip */
uint8_t *span_cache;
@@ -111,5 +102,22 @@ extern struct intel_region *intel_get_rb_region(struct gl_framebuffer *fb,
+/**
+ * Are we currently rendering into a texture?
+ */
+static INLINE GLboolean
+intel_rendering_to_texture(const GLcontext *ctx)
+{
+ if (ctx->DrawBuffer->Name) {
+ /* User-created FBO */
+ const struct intel_renderbuffer *irb =
+ intel_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]);
+ return irb && irb->RenderToTexture;
+ }
+ else {
+ return GL_FALSE;
+ }
+}
+
#endif /* INTEL_FBO_H */