Am Dienstag, 18. Januar 2005 11:33 schrieb Keith Whitwell: > Jacek Rosik wrote: > > Hi, > > > > In radeonUpdateWindow and radeonUpdateViewportOffset functions in > > radeon_state.c `tx' and `ty' values are calculated differently. In > > UpdateWindow SUBPIXEL_X|Y values are added and in UpdateViewportOffset > > it's not and compared to values which might have been calculated in > > former function. The same goes for r200 driver. > > > > BTW: What is SUBPIXEL_X|Y exactly used for? > > Adjusting pixel centers to match the GL spec. They should be added in > both places.
Will someone check this in, then: --- src/mesa/drivers/dri/r200/r200_state.c 2005-02-08 20:51:47.615514221 +0100 +++ src/mesa/drivers/dri/r200/r200_state.c.Dieter 2005-02-08 18:39:58.000000000 +0100 @@ -1656,8 +1656,8 @@ GLfloat yoffset = (GLfloat)dPriv->y + dPriv->h; const GLfloat *v = ctx->Viewport._WindowMap.m; - GLfloat tx = v[MAT_TX] + xoffset; - GLfloat ty = (- v[MAT_TY]) + yoffset; + GLfloat tx = v[MAT_TX] + xoffset + SUBPIXEL_X; + GLfloat ty = (- v[MAT_TY]) + yoffset + SUBPIXEL_Y; if ( rmesa->hw.vpt.cmd[VPT_SE_VPORT_XOFFSET] != *(GLuint *)&tx || rmesa->hw.vpt.cmd[VPT_SE_VPORT_YOFFSET] != *(GLuint *)&ty ) --- src/mesa/drivers/dri/radeon/radeon_state.c 2005-02-08 21:43:59.808223366 +0100 +++ src/mesa/drivers/dri/radeon/radeon_state.c.Dieter 2005-01-28 19:24:00.000000000 +0100 @@ -1522,8 +1522,8 @@ GLfloat yoffset = (GLfloat)dPriv->y + dPriv->h; const GLfloat *v = ctx->Viewport._WindowMap.m; - GLfloat tx = v[MAT_TX] + xoffset; - GLfloat ty = (- v[MAT_TY]) + yoffset; + GLfloat tx = v[MAT_TX] + xoffset + SUBPIXEL_X; + GLfloat ty = (- v[MAT_TY]) + yoffset + SUBPIXEL_Y; if ( rmesa->hw.vpt.cmd[VPT_SE_VPORT_XOFFSET] != *(GLuint *)&tx || rmesa->hw.vpt.cmd[VPT_SE_VPORT_YOFFSET] != *(GLuint *)&ty ) Thanks, Dieter ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel