From: Ben Skeggs Date: Sun, 23 Dec 2007 05:19:25 +0000 (+1100) Subject: nv40: seems we have stencil faces around the wrong way. X-Git-Tag: 062012170305~17580^2~496^2~298^2~16^2~433 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7372a596a9b960b212c839ef4ee1a1358b224047;p=profile%2Fivi%2Fmesa.git nv40: seems we have stencil faces around the wrong way. --- diff --git a/src/mesa/drivers/dri/nouveau_winsys/nouveau_bo.c b/src/mesa/drivers/dri/nouveau_winsys/nouveau_bo.c index 46df588..a86b726 100644 --- a/src/mesa/drivers/dri/nouveau_winsys/nouveau_bo.c +++ b/src/mesa/drivers/dri/nouveau_winsys/nouveau_bo.c @@ -222,6 +222,9 @@ nouveau_bo_map(struct nouveau_bo *bo, uint32_t flags) if (!nvbo) return -EINVAL; + if (nvbo->fence) + nouveau_fence_wait(&nvbo->fence); + if (nvbo->sysmem) bo->map = nvbo->sysmem; else diff --git a/src/mesa/pipe/nv40/nv40_state.c b/src/mesa/pipe/nv40/nv40_state.c index 12b2c2a..8fa40ce 100644 --- a/src/mesa/pipe/nv40/nv40_state.c +++ b/src/mesa/pipe/nv40/nv40_state.c @@ -425,9 +425,10 @@ nv40_depth_stencil_alpha_state_bind(struct pipe_context *pipe, void *hwcso) BEGIN_RING(curie, NV40TCL_DEPTH_FUNC, 3); OUT_RINGp ((uint32_t *)&hw->depth, 3); + /*XXX: fix in nouveau_class.h, faces backwards.. */ BEGIN_RING(curie, NV40TCL_STENCIL_BACK_ENABLE, 16); - OUT_RINGp ((uint32_t *)&hw->stencil.back, 8); OUT_RINGp ((uint32_t *)&hw->stencil.front, 8); + OUT_RINGp ((uint32_t *)&hw->stencil.back, 8); BEGIN_RING(curie, NV40TCL_ALPHA_TEST_ENABLE, 3); OUT_RINGp ((uint32_t *)&hw->alpha.enabled, 3); }