#include "swrast_setup/swrast_setup.h"
#include "main/renderbuffer.h"
#include "main/framebuffer.h"
+#include "main/fbobject.h"
#define FILE_DEBUG_FLAG DEBUG_STATE
/* Get the intel_renderbuffer for the single colorbuffer we're drawing
* into.
*/
- if (fb->Name == 0) {
+ if (_mesa_is_winsys_fbo(fb)) {
/* drawing to window system buffer */
if (fb->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT)
colorRegions[0] = intel_get_rb_region(fb, BUFFER_FRONT_LEFT);
#include "main/texobj.h"
#include "main/state.h"
#include "main/dd.h"
+#include "main/fbobject.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
fragcoord[0] = vertex_position[0];
- if (fb->Name)
+ if (_mesa_is_user_fbo(fb))
fragcoord[1] = vertex_position[1];
else
fragcoord[1] = fb->Height - vertex_position[1];
*/
#include "main/teximage.h"
+#include "main/fbobject.h"
#include "glsl/ralloc.h"
/* Account for the fact that in the system framebuffer, the origin is at
* the lower left.
*/
- if (read_fb->Name == 0) {
+ if (_mesa_is_winsys_fbo(read_fb)) {
GLint tmp = read_fb->Height - srcY0;
srcY0 = read_fb->Height - srcY1;
srcY1 = tmp;
mirror_y = !mirror_y;
}
- if (draw_fb->Name == 0) {
+ if (_mesa_is_winsys_fbo(draw_fb)) {
GLint tmp = draw_fb->Height - dstY0;
dstY0 = draw_fb->Height - dstY1;
dstY1 = tmp;
#include "main/context.h"
#include "main/enums.h"
#include "main/colormac.h"
+#include "main/fbobject.h"
#include "intel_blit.h"
#include "intel_buffers.h"
}
cx = fb->_Xmin;
- if (fb->Name == 0)
+ if (_mesa_is_winsys_fbo(fb))
cy = ctx->DrawBuffer->Height - fb->_Ymax;
else
cy = fb->_Ymin;
intel_check_front_buffer_rendering(struct intel_context *intel)
{
const struct gl_framebuffer *fb = intel->ctx.DrawBuffer;
- if (fb->Name == 0) {
+ if (_mesa_is_winsys_fbo(fb)) {
/* drawing to window system buffer */
if (fb->_NumColorDrawBuffers > 0) {
if (fb->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT) {
fb->Initialized = true; /* XXX remove someday */
- if (fb->Name != 0) {
+ if (_mesa_is_user_fbo(fb)) {
return;
}
#include "main/state.h"
#include "main/texobj.h"
#include "main/context.h"
+#include "main/fbobject.h"
#include "swrast/swrast.h"
#include "drivers/common/meta.h"
static INLINE int
y_flip(struct gl_framebuffer *fb, int y, int height)
{
- if (fb->Name != 0)
+ if (_mesa_is_user_fbo(fb))
return y;
else
return fb->Height - y - height;
w, h,
(GLubyte *)stipple,
8,
- fb->Name == 0 ? true : false) == 0)
+ _mesa_is_winsys_fbo(fb)) == 0)
continue;
if (!intelEmitImmediateColorExpandBlit(intel,
#include "main/state.h"
#include "main/mtypes.h"
#include "main/condrender.h"
+#include "main/fbobject.h"
#include "drivers/common/meta.h"
#include "intel_context.h"
dsty += srcy - orig_srcy;
/* Flip dest Y if it's a window system framebuffer. */
- if (fb->Name == 0) {
+ if (_mesa_is_winsys_fbo(fb)) {
/* copypixels to a window system framebuffer */
dsty = fb->Height - dsty - height;
flip = !flip;
}
/* Flip source Y if it's a window system framebuffer. */
- if (read_fb->Name == 0) {
+ if (_mesa_is_winsys_fbo(read_fb)) {
srcy = read_fb->Height - srcy - height;
flip = !flip;
}
#include "main/image.h"
#include "main/teximage.h"
#include "main/texstate.h"
+#include "main/fbobject.h"
#include "drivers/common/meta.h"
return false;
}
- if (ctx->ReadBuffer->Name == 0) {
+ if (_mesa_is_winsys_fbo(ctx->ReadBuffer)) {
/* Flip vertical orientation for system framebuffers */
y = ctx->ReadBuffer->Height - (y + height);
src_pitch = -region->pitch;