summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorPatrice Mandin <[email protected]>2007-08-25 11:39:04 +0200
committerPatrice Mandin <[email protected]>2007-08-25 11:39:04 +0200
commit1a911aad0a31b2d043a524e5d6f766fbb38142d7 (patch)
tree62fe8c75eb0e98f86d695198585e014a29106e35 /src/mesa
parentf8e4cf716a3656faa08086ee80d04b36a5266d65 (diff)
nouveau: nv10: properly set viewport and projection
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c
index 5d512b13c41..6d9ddd55d45 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state.c
@@ -37,8 +37,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
static void nv10ViewportScale(nouveauContextPtr nmesa)
{
GLcontext *ctx = nmesa->glCtx;
- GLuint w = ((GLfloat) ctx->Viewport.Width) * 0.5;
- GLuint h = ((GLfloat) ctx->Viewport.Height) * 0.5;
+ GLfloat w = ((GLfloat) ctx->Viewport.Width) * 0.5;
+ GLfloat h = ((GLfloat) ctx->Viewport.Height) * 0.5;
GLfloat max_depth = (ctx->Viewport.Near + ctx->Viewport.Far) * 0.5;
GLfloat projection[16];
int i;
@@ -67,7 +67,7 @@ static void nv10ViewportScale(nouveauContextPtr nmesa)
memset(projection, 0, sizeof(projection));
projection[0*4+0] = w;
- projection[1*4+1] = h;
+ projection[1*4+1] = -h;
projection[2*4+2] = max_depth;
projection[3*4+3] = 1.0;
BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_PROJECTION_MATRIX(0), 16);