diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/intel_winsys/intel_buffers.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel_winsys/intel_context.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel_winsys/intel_fbo.c | 58 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel_winsys/intel_fbo.h | 41 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel_winsys/intel_screen.c | 15 |
5 files changed, 6 insertions, 120 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_buffers.c b/src/mesa/drivers/dri/intel_winsys/intel_buffers.c index c4db4467881..9266fb62aff 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_buffers.c +++ b/src/mesa/drivers/dri/intel_winsys/intel_buffers.c @@ -242,9 +242,7 @@ intelWindowMoved(struct intel_context *intel) } for (i = 0; i < intel_fb->pf_num_pages; i++) { - if (!intel_fb->color_rb[i] || - (intel_fb->vbl_waited - intel_fb->vbl_pending[i]) <= - (1<<23)) + if ((intel_fb->vbl_waited - intel_fb->vbl_pending[i]) <= (1<<23)) continue; vbl.request.sequence = intel_fb->vbl_pending[i]; @@ -256,8 +254,7 @@ intelWindowMoved(struct intel_context *intel) intel_fb->vbl_waited = intel_fb->vbl_seq; for (i = 0; i < intel_fb->pf_num_pages; i++) { - if (intel_fb->color_rb[i]) - intel_fb->vbl_pending[i] = intel_fb->vbl_waited; + intel_fb->vbl_pending[i] = intel_fb->vbl_waited; } } } diff --git a/src/mesa/drivers/dri/intel_winsys/intel_context.c b/src/mesa/drivers/dri/intel_winsys/intel_context.c index 5c184d5c8d7..9defcc1aaec 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_context.c +++ b/src/mesa/drivers/dri/intel_winsys/intel_context.c @@ -574,12 +574,7 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv, intel_fb->vbl_waited = intel_fb->vbl_seq; for (i = 0; i < 2; i++) { -#if 1 intel_fb->vbl_pending[i] = intel_fb->vbl_seq; -#else - if (intel_fb->color_rb[i]) - intel_fb->color_rb[i]->vbl_pending = intel_fb->vbl_seq; -#endif } } } diff --git a/src/mesa/drivers/dri/intel_winsys/intel_fbo.c b/src/mesa/drivers/dri/intel_winsys/intel_fbo.c index 5382ab342c7..3dd99747da9 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_fbo.c +++ b/src/mesa/drivers/dri/intel_winsys/intel_fbo.c @@ -68,64 +68,6 @@ intel_renderbuffer(struct gl_renderbuffer *rb) } -struct intel_renderbuffer * -intel_get_renderbuffer(struct gl_framebuffer *fb, GLuint attIndex) -{ - return intel_renderbuffer(fb->Attachment[attIndex].Renderbuffer); -} - -#if 0 -void -intel_flip_renderbuffers(struct intel_framebuffer *intel_fb) -{ - int current_page = intel_fb->pf_current_page; - int next_page = (current_page + 1) % intel_fb->pf_num_pages; - struct gl_renderbuffer *tmp_rb; - - /* Exchange renderbuffers if necessary but make sure their reference counts - * are preserved. - */ - if (intel_fb->color_rb[current_page] && - intel_fb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer != - &intel_fb->color_rb[current_page]->Base) { - tmp_rb = NULL; - _mesa_reference_renderbuffer(&tmp_rb, - intel_fb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer); - tmp_rb = &intel_fb->color_rb[current_page]->Base; - _mesa_reference_renderbuffer( - &intel_fb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer, tmp_rb); - _mesa_reference_renderbuffer(&tmp_rb, NULL); - } - - if (intel_fb->color_rb[next_page] && - intel_fb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer != - &intel_fb->color_rb[next_page]->Base) { - tmp_rb = NULL; - _mesa_reference_renderbuffer(&tmp_rb, - intel_fb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer); - tmp_rb = &intel_fb->color_rb[next_page]->Base; - _mesa_reference_renderbuffer( - &intel_fb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer, tmp_rb); - _mesa_reference_renderbuffer(&tmp_rb, NULL); - } -} -#endif - - -#if 0 -struct pipe_region * -intel_get_rb_region(struct gl_framebuffer *fb, GLuint attIndex) -{ - struct intel_renderbuffer *irb = intel_get_renderbuffer(fb, attIndex); - - if (irb) - return irb->Base.surface->region; - else - return NULL; -} -#endif - - /** * Create a new framebuffer object. */ diff --git a/src/mesa/drivers/dri/intel_winsys/intel_fbo.h b/src/mesa/drivers/dri/intel_winsys/intel_fbo.h index 63d8e839c51..578e1013c2d 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_fbo.h +++ b/src/mesa/drivers/dri/intel_winsys/intel_fbo.h @@ -44,8 +44,6 @@ struct intel_framebuffer { struct gl_framebuffer Base; - struct intel_renderbuffer *color_rb[3]; - /* Drawable page flipping state */ GLboolean pf_active; GLuint pf_seq; @@ -78,53 +76,14 @@ struct intel_framebuffer struct intel_renderbuffer { struct gl_renderbuffer Base; -#if 0 - struct pipe_region *region; - - void *pfMap; /* possibly paged flipped map pointer */ - GLuint pfPitch; /* possibly paged flipped pitch */ - GLboolean RenderToTexture; /* RTT? */ - - 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 */ - - struct intel_surface *surface; -#endif }; -#if 0 -extern struct intel_renderbuffer *intel_create_renderbuffer(GLenum intFormat, - GLsizei width, - GLsizei height, - int offset, - int pitch, - int cpp, - void *map); -#endif extern struct intel_renderbuffer *intel_new_renderbuffer_fb(GLuint intFormat); extern void intel_fbo_init(struct intel_context *intel); -/* XXX make inline or macro */ -extern struct intel_renderbuffer *intel_get_renderbuffer(struct gl_framebuffer - *fb, - GLuint attIndex); - -extern void intel_flip_renderbuffers(struct intel_framebuffer *intel_fb); - - -/* XXX make inline or macro */ -extern struct pipe_region *intel_get_rb_region(struct gl_framebuffer *fb, - GLuint attIndex); - - - extern struct pipe_surface * intel_new_surface(GLuint intFormat); diff --git a/src/mesa/drivers/dri/intel_winsys/intel_screen.c b/src/mesa/drivers/dri/intel_winsys/intel_screen.c index fba0c47e598..74cd714cf34 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_screen.c +++ b/src/mesa/drivers/dri/intel_winsys/intel_screen.c @@ -302,24 +302,17 @@ intelCreateBuffer(__DRIscreenPrivate * driScrnPriv, /* fake frontbuffer */ /* XXX allocation should only happen in the unusual case it's actually needed */ - intel_fb->color_rb[0] + struct intel_renderbuffer *irb = intel_new_renderbuffer_fb(rgbFormat); _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_FRONT_LEFT, - &intel_fb->color_rb[0]->Base); + &irb->Base); } if (mesaVis->doubleBufferMode) { -#if 01 - intel_fb->color_rb[1] + struct intel_renderbuffer *irb = intel_new_renderbuffer_fb(rgbFormat); _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_BACK_LEFT, - &intel_fb->color_rb[1]->Base); -#else - intel_fb->color_rb[1] - = st_new_renderbuffer_fb(rgbFormat); - _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_BACK_LEFT, - &intel_fb->color_rb[1]->Base); -#endif + &irb->Base); } if (mesaVis->depthBits == 24 && mesaVis->stencilBits == 8) { |