diff options
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_surface.c')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_surface.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c index 57339f89a36..b0a8497c1e7 100644 --- a/src/gallium/drivers/nv50/nv50_surface.c +++ b/src/gallium/drivers/nv50/nv50_surface.c @@ -290,11 +290,19 @@ nv50_clear_render_target(struct pipe_context *pipe, OUT_RING (chan, mt->level[sf->base.u.tex.level].tile_mode << 4); OUT_RING (chan, 0); BEGIN_RING(chan, RING_3D(RT_HORIZ(0)), 2); - OUT_RING (chan, sf->width); + if (nouveau_bo_tile_layout(bo)) + OUT_RING(chan, sf->width); + else + OUT_RING(chan, NV50_3D_RT_HORIZ_LINEAR | mt->level[0].pitch); OUT_RING (chan, sf->height); BEGIN_RING(chan, RING_3D(RT_ARRAY_MODE), 1); OUT_RING (chan, 1); + if (!nouveau_bo_tile_layout(bo)) { + BEGIN_RING(chan, RING_3D(ZETA_ENABLE), 1); + OUT_RING (chan, 0); + } + /* NOTE: only works with D3D clear flag (5097/0x143c bit 4) */ BEGIN_RING(chan, RING_3D(VIEWPORT_HORIZ(0)), 2); @@ -324,6 +332,8 @@ nv50_clear_depth_stencil(struct pipe_context *pipe, struct nouveau_bo *bo = mt->base.bo; uint32_t mode = 0; + assert(nouveau_bo_tile_layout(bo)); /* ZETA cannot be linear */ + if (clear_flags & PIPE_CLEAR_DEPTH) { BEGIN_RING(chan, RING_3D(CLEAR_DEPTH), 1); OUT_RINGf (chan, depth); |