summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv50/nv50_miptree.c7
-rw-r--r--src/gallium/drivers/nv50/nv50_state.c4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c
index cdd98844f94..6ee09fc4dd4 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -10,7 +10,7 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
{
struct pipe_winsys *ws = pscreen->winsys;
struct nv50_miptree *mt = CALLOC_STRUCT(nv50_miptree);
- unsigned usage;
+ unsigned usage, pitch;
NOUVEAU_ERR("unimplemented\n");
@@ -28,8 +28,9 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
break;
}
- mt->buffer = ws->buffer_create(ws, 256, usage,
- pt->width[0] * pt->cpp * pt->height[0]);
+ pitch = ((pt->width[0] + 63) & ~63) * pt->cpp;
+
+ mt->buffer = ws->buffer_create(ws, 256, usage, pitch * pt->height[0]);
if (!mt->buffer) {
FREE(mt);
return NULL;
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
index f36299db4d2..1b765cb5c7d 100644
--- a/src/gallium/drivers/nv50/nv50_state.c
+++ b/src/gallium/drivers/nv50/nv50_state.c
@@ -272,10 +272,10 @@ nv50_depth_stencil_alpha_state_create(struct pipe_context *pipe,
struct nouveau_stateobj *so = so_new(64, 0);
so_method(so, tesla, NV50TCL_DEPTH_WRITE_ENABLE, 1);
- so_data (so, 0); //cso->depth.writemask ? 1 : 0);
+ so_data (so, cso->depth.writemask ? 1 : 0);
if (cso->depth.enabled) {
so_method(so, tesla, NV50TCL_DEPTH_TEST_ENABLE, 1);
- so_data (so, 0); //1);
+ so_data (so, 1);
so_method(so, tesla, NV50TCL_DEPTH_TEST_FUNC, 1);
so_data (so, nvgl_comparison_op(cso->depth.func));
} else {