r200: remove subpixel offset from viewport

Fixes bug fdo 20340 for r200.
This commit is contained in:
Frederic Crozat 2009-10-04 17:46:40 -04:00 committed by Alex Deucher
parent bbe384c86a
commit 3856c3cc46

View file

@ -1578,13 +1578,6 @@ static void r200ClearStencil( GLcontext *ctx, GLint s )
* Window position and viewport transformation
*/
/*
* To correctly position primitives:
*/
#define SUBPIXEL_X 0.125
#define SUBPIXEL_Y 0.125
/**
* Called when window size or position changes or viewport or depth range
* state is changed. We update the hardware viewport state here.
@ -1609,9 +1602,9 @@ void r200UpdateWindow( GLcontext *ctx )
}
float_ui32_type sx = { v[MAT_SX] };
float_ui32_type tx = { v[MAT_TX] + xoffset + SUBPIXEL_X };
float_ui32_type tx = { v[MAT_TX] + xoffset };
float_ui32_type sy = { v[MAT_SY] * y_scale };
float_ui32_type ty = { (v[MAT_TY] * y_scale) + y_bias + SUBPIXEL_Y };
float_ui32_type ty = { (v[MAT_TY] * y_scale) + y_bias };
float_ui32_type sz = { v[MAT_SZ] * depthScale };
float_ui32_type tz = { v[MAT_TZ] * depthScale };
@ -1680,8 +1673,8 @@ void r200UpdateViewportOffset( GLcontext *ctx )
float_ui32_type tx;
float_ui32_type ty;
tx.f = v[MAT_TX] + xoffset + SUBPIXEL_X;
ty.f = (- v[MAT_TY]) + yoffset + SUBPIXEL_Y;
tx.f = v[MAT_TX] + xoffset;
ty.f = (- v[MAT_TY]) + yoffset;
if ( rmesa->hw.vpt.cmd[VPT_SE_VPORT_XOFFSET] != tx.ui32 ||
rmesa->hw.vpt.cmd[VPT_SE_VPORT_YOFFSET] != ty.ui32 )