On Mon, 2009-05-11 at 21:33 +0200, Jerome Glisse wrote:
> On Mon, 2009-05-11 at 19:20 +0200, Jerome Glisse wrote:
> > On Mon, 2009-05-11 at 16:09 +0200, Jerome Glisse wrote:
> > > Hi Kristian, Ian
> > > 
> > > I am getting drawable size missmatch with new dri2 with format interface
> > > in ddx i get a size of screenx*(screeny-gnomebarsize) (from CreateBuffer
> > > callback in ddx) while in mesa i get screenx*screeny did you ever see
> > > that ? It happens with blender of course bad things happens pretty
> > > quickly when rendering start as ddx allocate a buffer smaller than what
> > > mesa thinks it's.
> > > 
> > > Cheers,
> > > Jerome
> > 
> > Okay so in xserver/hw/xfree86/dri2/dri2.c in do_get_buffers 
> > we use dri drawable width & height to return to mesa but for
> > get buffer we use the xdrawable and in my case the xdrawable
> > is smaller than the dri drawable don't know why.
> > 
> > Cheers,
> > Jerome
> 
> Ian before the introduction of getBuffersWithFormat, dri2
> private drawable width & height of x drawable where updated
> with lastest drawable width & height it seems it's not the
> case anymore, isn't this a bug ? Does resizing any gl app
> work for you on intel ? What should happen is that mesa
> believe nothings get resized while ddx will allocate buffer
> of new size.
> 
> Cheers,
> Jerome
> 

Forgot to attach proposed patch.

Cheers,
Jerome
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 1d49d7c..385c5e8 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -257,6 +257,8 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
 
     pPriv->buffers = buffers;
     pPriv->bufferCount = *out_count;
+    pPriv->width = pDraw->width;
+    pPriv->height = pDraw->height;
     *width = pPriv->width;
     *height = pPriv->height;
 
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to