mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 21:30:23 +01:00
nv50: Fix tiling mode for lower mipmap levels.
This commit is contained in:
parent
36dd53a3cd
commit
18882f4d30
3 changed files with 8 additions and 5 deletions
|
|
@ -148,6 +148,7 @@ nv50_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
|
|||
mt->image_nr = 1;
|
||||
mt->level[0].pitch = *stride;
|
||||
mt->level[0].image_offset = CALLOC(1, sizeof(unsigned));
|
||||
mt->level[0].tile_mode = bo->tile_mode;
|
||||
|
||||
nouveau_bo_ref(bo, &mt->base.bo);
|
||||
return &mt->base.base;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@ nv50_state_validate_fb(struct nv50_context *nv50)
|
|||
so_data(so, NV50TCL_RT_FORMAT_X8R8G8B8_UNORM);
|
||||
break;
|
||||
}
|
||||
so_data(so, bo->tile_mode << 4);
|
||||
so_data(so, nv50_miptree(pt)->
|
||||
level[fb->cbufs[i]->level].tile_mode << 4);
|
||||
so_data(so, 0x00000000);
|
||||
|
||||
so_method(so, tesla, 0x1224, 1);
|
||||
|
|
@ -110,7 +111,8 @@ nv50_state_validate_fb(struct nv50_context *nv50)
|
|||
so_data(so, NV50TCL_ZETA_FORMAT_S8Z24_UNORM);
|
||||
break;
|
||||
}
|
||||
so_data(so, bo->tile_mode << 4);
|
||||
so_data(so, nv50_miptree(pt)->
|
||||
level[fb->zsbuf->level].tile_mode << 4);
|
||||
so_data(so, 0x00000000);
|
||||
|
||||
so_method(so, tesla, 0x1538, 1);
|
||||
|
|
|
|||
|
|
@ -60,13 +60,13 @@ nv50_surface_set(struct nv50_screen *screen, struct pipe_surface *ps, int dst)
|
|||
format = nv50_format(ps->format);
|
||||
if (format < 0)
|
||||
return 1;
|
||||
|
||||
|
||||
if (!bo->tile_flags) {
|
||||
BEGIN_RING(chan, eng2d, mthd, 2);
|
||||
OUT_RING (chan, format);
|
||||
OUT_RING (chan, 1);
|
||||
BEGIN_RING(chan, eng2d, mthd + 0x14, 5);
|
||||
OUT_RING (chan, mt->level[0].pitch);
|
||||
OUT_RING (chan, mt->level[ps->level].pitch);
|
||||
OUT_RING (chan, ps->width);
|
||||
OUT_RING (chan, ps->height);
|
||||
OUT_RELOCh(chan, bo, ps->offset, flags);
|
||||
|
|
@ -75,7 +75,7 @@ nv50_surface_set(struct nv50_screen *screen, struct pipe_surface *ps, int dst)
|
|||
BEGIN_RING(chan, eng2d, mthd, 5);
|
||||
OUT_RING (chan, format);
|
||||
OUT_RING (chan, 0);
|
||||
OUT_RING (chan, bo->tile_mode << 4);
|
||||
OUT_RING (chan, mt->level[ps->level].tile_mode << 4);
|
||||
OUT_RING (chan, 1);
|
||||
OUT_RING (chan, 0);
|
||||
BEGIN_RING(chan, eng2d, mthd + 0x18, 4);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue