diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv10_state.c | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index 9c63bd118a4..bdfc75b8750 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -43,20 +43,17 @@ static void nv10ViewportScale(nouveauContextPtr nmesa) GLfloat projection[16]; int i; - if (!ctx->DrawBuffer) { - return; - } - if (!ctx->DrawBuffer->_DepthBuffer) { - return; - } - - switch (ctx->DrawBuffer->_DepthBuffer->DepthBits) { - case 16: - max_depth *= 32767.0; - break; - case 24: - max_depth *= 16777215.0; - break; + if (ctx->DrawBuffer) { + if (ctx->DrawBuffer->_DepthBuffer) { + switch (ctx->DrawBuffer->_DepthBuffer->DepthBits) { + case 16: + max_depth *= 32767.0; + break; + case 24: + max_depth *= 16777215.0; + break; + } + } } BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_X, 4); @@ -64,17 +61,6 @@ static void nv10ViewportScale(nouveauContextPtr nmesa) OUT_RINGf (h - 2048.0); OUT_RINGf (max_depth); OUT_RINGf (0.0); - - /* FIXME: should multiply by gl projection and modelview ? */ - memset(projection, 0, sizeof(projection)); - projection[0*4+0] = w; - projection[1*4+1] = -h; - projection[2*4+2] = max_depth; - projection[3*4+3] = 1.0; - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_PROJECTION_MATRIX(0), 16); - for (i=0; i<16; i++) { - OUT_RINGf (projection[i]); - } } static void nv10AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) @@ -786,11 +772,6 @@ static void nv10UpdateModelProjMatrix(nouveauContextPtr nmesa) projection[i+12] = nmesa->model_proj.m[i+12]; } - for (i=0; i<16; i++) { - printf("%d\t%.3f\t%.3f\n", i, - nmesa->model_proj.m[i], projection[i]); - } - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_PROJECTION_MATRIX(0), 16); OUT_RINGp(projection, 16); } |