I spent some time this weekend trying to further clean-up the buffer 
resize code.

We can get rid of the Driver.ResizeBuffers() and 
Driver.GetBufferSize() functions once the following is done:

1. In _mesa_make_current(), remove the following lines:

          if (!drawBuffer->Initialized) {
             initialize_framebuffer_size(newCtx, drawBuffer);
          }
          if (readBuffer != drawBuffer && !readBuffer->Initialized) {
             initialize_framebuffer_size(newCtx, readBuffer);
          }

         _mesa_resizebuffers(newCtx);

2. Remove _mesa_resizebuffers() in buffers.c



In order to do 1, each driver must be updated.  Basically, before a 
GLframebuffer is bound for the first time, it must be initialized. 
Specifically, the GLframebuffer's Width and Height fields need to be 
set correctly and _mesa_resize_framebuffer() should be called in order 
to make sure the software buffers (accum, stencil, etc) are allocated 
to the proper size).

In the intel drivers, it looks like the preceeding call to 
intelWindowMoved() will do this.


I've added #ifdef/#else/#endif in _mesa_make_current() to show what 
code should be removed, and to check that the caller does what's expected.

I'm looking for a maintainer of each DRI driver to change the #if 1 to 
#if 0 and update the driver code to do the needed initializations. 
I'll try to do this for the i915 driver once I get my DRI environment 
up to date.

-Brian


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to