X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fdrivers%2Fdri%2Fsis%2Fsis_dd.c;h=bddc4a9285ce829a0be8705738ec3a0dfc103806;hb=33fa5e4bfad8005f09ad3c9fc92c40fa863935d1;hp=e144a936f2689e56a511673a0e782e61137fd4fa;hpb=deadd47aab68d4914d70b19fa08f834623f2e0a7;p=mesa.git diff --git a/src/mesa/drivers/dri/sis/sis_dd.c b/src/mesa/drivers/dri/sis/sis_dd.c index e144a936f26..bddc4a9285c 100644 --- a/src/mesa/drivers/dri/sis/sis_dd.c +++ b/src/mesa/drivers/dri/sis/sis_dd.c @@ -24,7 +24,6 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_ctx.c,v 1.3 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: @@ -42,12 +41,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "sis_tris.h" #include "swrast/swrast.h" -#include "framebuffer.h" -#include "renderbuffer.h" +#include "main/framebuffer.h" +#include "main/renderbuffer.h" #include "utils.h" -#define DRIVER_DATE "20041008" +#define DRIVER_DATE "20060710" /* Return the width and height of the given buffer. */ @@ -160,7 +159,7 @@ sisInitRenderbuffer(struct gl_renderbuffer *rb, GLenum format) } else { /* Stencil */ - ASSERT(format == GL_STENCIL_INDEX8); + ASSERT(format == GL_STENCIL_INDEX8_EXT); rb->_BaseFormat = GL_STENCIL_INDEX; rb->DataType = GL_UNSIGNED_BYTE; } @@ -215,6 +214,11 @@ sisUpdateBufferSize(sisContextPtr smesa) assert(smesa->depth.Base.AllocStorage); } + /* XXX Should get the base offset of the frontbuffer from the X Server */ + smesa->front.offset = smesa->driDrawable->x * smesa->bytesPerPixel + + smesa->driDrawable->y * smesa->front.pitch; + smesa->front.map = (char *) smesa->driScreen->pFB + smesa->front.offset; + if ( smesa->width == smesa->driDrawable->w && smesa->height == smesa->driDrawable->h ) { @@ -224,10 +228,6 @@ sisUpdateBufferSize(sisContextPtr smesa) smesa->front.bpp = smesa->bytesPerPixel * 8; /* Front pitch set on context create */ smesa->front.size = smesa->front.pitch * smesa->driDrawable->h; - /* XXX Should get the base offset of the frontbuffer from the X Server */ - smesa->front.offset = smesa->driDrawable->x * smesa->bytesPerPixel + - smesa->driDrawable->y * smesa->front.pitch; - smesa->front.map = (char *) smesa->driScreen->pFB; smesa->width = smesa->driDrawable->w; smesa->height = smesa->driDrawable->h;