diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2005-09-04 22:13:42 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2005-09-04 22:13:42 +0000 |
commit | 61ba6b5a74625a01e07ae267c6e4ebf192434e40 (patch) | |
tree | a2d72f7ed22881262b8e508b1dc0cefd8f0ca039 /src/mesa/drivers/dri/fb | |
parent | 6e0e6eff05727ac8833c2b2dffc51c6619427e77 (diff) |
Add new void *addr and __DRIdrawablePrivate parameters to
driNewRenderbuffer().
Diffstat (limited to 'src/mesa/drivers/dri/fb')
-rw-r--r-- | src/mesa/drivers/dri/fb/fb_dri.c | 22 | ||||
-rw-r--r-- | src/mesa/drivers/dri/fb/fb_egl.c | 13 |
2 files changed, 21 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/fb/fb_dri.c b/src/mesa/drivers/dri/fb/fb_dri.c index 1ef043e199..c1fab2d586 100644 --- a/src/mesa/drivers/dri/fb/fb_dri.c +++ b/src/mesa/drivers/dri/fb/fb_dri.c @@ -426,21 +426,27 @@ fbCreateBuffer( __DRIscreenPrivate *driScrnPriv, /* XXX double-check these parameters (bpp vs cpp, etc) */ { - driRenderbuffer *drb = driNewRenderbuffer(GL_RGBA, driScrnPriv->fbBPP / 8, - driScrnPriv->fbOrigin, - driScrnPriv->fbStride); + driRenderbuffer *drb = driNewRenderbuffer(GL_RGBA, + driScrnPriv->pFB, + driScrnPriv->fbBPP / 8, + driScrnPriv->fbOrigin, + driScrnPriv->fbStride, + driDrawPriv); fbSetSpanFunctions(drb, mesaVis); - drb->Base.Data = driScrnPriv->pFB; _mesa_add_renderbuffer(mesa_framebuffer, BUFFER_FRONT_LEFT, &drb->Base); } if (mesaVis->doubleBufferMode) { /* XXX what are the correct origin/stride values? */ - driRenderbuffer *drb = driNewRenderbuffer(GL_RGBA, driScrnPriv->fbBPP /8, - driScrnPriv->fbOrigin, - driScrnPriv->fbStride); + GLvoid *backBuf = _mesa_malloc(driScrnPriv->fbStride + * driScrnPriv->fbHeight); + driRenderbuffer *drb = driNewRenderbuffer(GL_RGBA, + backBuf, + driScrnPriv->fbBPP /8, + driScrnPriv->fbOrigin, + driScrnPriv->fbStride, + driDrawPriv); fbSetSpanFunctions(drb, mesaVis); - drb->Base.Data = _mesa_malloc(driScrnPriv->fbStride * driScrnPriv->fbHeight); _mesa_add_renderbuffer(mesa_framebuffer, BUFFER_BACK_LEFT, &drb->Base); } diff --git a/src/mesa/drivers/dri/fb/fb_egl.c b/src/mesa/drivers/dri/fb/fb_egl.c index 1b91919ec9..94ff9cbb62 100644 --- a/src/mesa/drivers/dri/fb/fb_egl.c +++ b/src/mesa/drivers/dri/fb/fb_egl.c @@ -682,20 +682,21 @@ fbCreateScreenSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLConfig cfg, /* front color renderbuffer */ { - driRenderbuffer *drb = driNewRenderbuffer(GL_RGBA, bytesPerPixel, - origin, stride); + driRenderbuffer *drb = driNewRenderbuffer(GL_RGBA, display->pFB, + bytesPerPixel, + origin, stride, NULL); fbSetSpanFunctions(drb, &vis); - drb->Base.Data = display->pFB; _mesa_add_renderbuffer(surface->mesa_framebuffer, BUFFER_FRONT_LEFT, &drb->Base); } /* back color renderbuffer */ if (vis.doubleBufferMode) { - driRenderbuffer *drb = driNewRenderbuffer(GL_RGBA, bytesPerPixel, - origin, stride); + GLubyte *backBuf = _mesa_malloc(stride * height); + driRenderbuffer *drb = driNewRenderbuffer(GL_RGBA, backBuf, + bytesPerPixel, + origin, stride, NULL); fbSetSpanFunctions(drb, &vis); - drb->Base.Data = _mesa_malloc(stride * height); _mesa_add_renderbuffer(surface->mesa_framebuffer, BUFFER_BACK_LEFT, &drb->Base); } |