mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 09:10:12 +01:00
nv50: fix multi-texturing
This commit is contained in:
parent
6c1627a51c
commit
f1edfa09ea
3 changed files with 16 additions and 5 deletions
|
|
@ -114,6 +114,7 @@ struct nv50_state {
|
|||
unsigned viewport_bypass;
|
||||
struct nouveau_stateobj *tsc_upload;
|
||||
struct nouveau_stateobj *tic_upload;
|
||||
unsigned miptree_nr;
|
||||
struct nouveau_stateobj *vertprog;
|
||||
struct nouveau_stateobj *fragprog;
|
||||
struct nouveau_stateobj *vtxfmt;
|
||||
|
|
|
|||
|
|
@ -404,8 +404,6 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
|
|||
|
||||
so_method(so, screen->tesla, 0x1234, 1);
|
||||
so_data (so, 1);
|
||||
so_method(so, screen->tesla, 0x1458, 1);
|
||||
so_data (so, 1);
|
||||
|
||||
so_emit(chan, so);
|
||||
so_ref (so, &screen->static_init);
|
||||
|
|
|
|||
|
|
@ -139,23 +139,35 @@ nv50_tex_validate(struct nv50_context *nv50)
|
|||
{
|
||||
struct nouveau_grobj *tesla = nv50->screen->tesla;
|
||||
struct nouveau_stateobj *so;
|
||||
int unit;
|
||||
int unit, push;
|
||||
|
||||
so = so_new(nv50->miptree_nr * 8 + 3, nv50->miptree_nr * 2);
|
||||
push = nv50->miptree_nr * 9 + 2;
|
||||
push += MAX2(nv50->miptree_nr, nv50->state.miptree_nr) * 2;
|
||||
|
||||
so = so_new(push, nv50->miptree_nr * 2);
|
||||
so_method(so, tesla, 0x0f00, 1);
|
||||
so_data (so, NV50_CB_TIC);
|
||||
so_method(so, tesla, 0x40000f04, nv50->miptree_nr * 8);
|
||||
for (unit = 0; unit < nv50->miptree_nr; unit++) {
|
||||
struct nv50_miptree *mt = nv50->miptree[unit];
|
||||
|
||||
so_method(so, tesla, 0x40000f04, 8);
|
||||
if (nv50_tex_construct(nv50, so, mt, unit)) {
|
||||
NOUVEAU_ERR("failed tex validate\n");
|
||||
so_ref(NULL, &so);
|
||||
return;
|
||||
}
|
||||
|
||||
so_method(so, tesla, 0x1458, 1);
|
||||
so_data (so, (unit << 9) | (unit << 1) | 1);
|
||||
}
|
||||
|
||||
for (; unit < nv50->state.miptree_nr; unit++) {
|
||||
so_method(so, tesla, 0x1458, 1);
|
||||
so_data (so, (unit << 1) | 0);
|
||||
}
|
||||
|
||||
so_ref(so, &nv50->state.tic_upload);
|
||||
so_ref(NULL, &so);
|
||||
nv50->state.miptree_nr = nv50->miptree_nr;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue