diff options
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h index 9d15582d78c..c57a01c759b 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.h +++ b/src/mesa/drivers/dri/intel/intel_fbo.h @@ -111,5 +111,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 */ |