{
struct pipe_winsys *ws = pscreen->winsys;
struct nv50_miptree *mt = CALLOC_STRUCT(nv50_miptree);
- unsigned usage;
+ unsigned usage, pitch;
NOUVEAU_ERR("unimplemented\n");
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;
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 {