Mesa (master): drm/nv50: write tic/ tsc setup to correct slots when skipping units
Ben Skeggs
darktama at kemper.freedesktop.org
Sun Oct 18 16:50:30 PDT 2009
Module: Mesa
Branch: master
Commit: 869d3eea37ee060d62cd5b7f6031ef5a93e328a1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=869d3eea37ee060d62cd5b7f6031ef5a93e328a1
Author: Ben Skeggs <bskeggs at redhat.com>
Date: Wed Oct 7 16:07:34 2009 +1000
drm/nv50: write tic/tsc setup to correct slots when skipping units
---
src/gallium/drivers/nv50/nv50_state_validate.c | 7 ++++---
src/gallium/drivers/nv50/nv50_tex.c | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/gallium/drivers/nv50/nv50_state_validate.c b/src/gallium/drivers/nv50/nv50_state_validate.c
index fd27620..9079de9 100644
--- a/src/gallium/drivers/nv50/nv50_state_validate.c
+++ b/src/gallium/drivers/nv50/nv50_state_validate.c
@@ -356,13 +356,14 @@ viewport_uptodate:
if (nv50->dirty & NV50_NEW_SAMPLER) {
int i;
- so = so_new(nv50->sampler_nr * 9 + 2, 0);
- so_method(so, tesla, NV50TCL_CB_ADDR, 1);
- so_data (so, NV50_CB_TSC);
+ so = so_new(nv50->sampler_nr * 11, 0);
for (i = 0; i < nv50->sampler_nr; i++) {
if (!nv50->sampler[i])
continue;
+ so_method(so, tesla, NV50TCL_CB_ADDR, 1);
+ so_data (so, ((i * 8) << NV50TCL_CB_ADDR_ID_SHIFT) |
+ NV50_CB_TSC);
so_method(so, tesla, NV50TCL_CB_DATA(0) | (2<<29), 8);
so_datap (so, nv50->sampler[i]->tsc, 8);
}
diff --git a/src/gallium/drivers/nv50/nv50_tex.c b/src/gallium/drivers/nv50/nv50_tex.c
index 72d3315..ca2b883 100644
--- a/src/gallium/drivers/nv50/nv50_tex.c
+++ b/src/gallium/drivers/nv50/nv50_tex.c
@@ -148,18 +148,19 @@ nv50_tex_validate(struct nv50_context *nv50)
struct nouveau_stateobj *so;
int unit, push;
- push = nv50->miptree_nr * 9 + 2;
+ push = nv50->miptree_nr * 11;
push += MAX2(nv50->miptree_nr, nv50->state.miptree_nr) * 2;
so = so_new(push, nv50->miptree_nr * 2);
- so_method(so, tesla, NV50TCL_CB_ADDR, 1);
- so_data (so, NV50_CB_TIC);
for (unit = 0; unit < nv50->miptree_nr; unit++) {
struct nv50_miptree *mt = nv50->miptree[unit];
if (!mt)
continue;
+ so_method(so, tesla, NV50TCL_CB_ADDR, 1);
+ so_data (so, ((unit * 8) << NV50TCL_CB_ADDR_ID_SHIFT) |
+ NV50_CB_TIC);
so_method(so, tesla, NV50TCL_CB_DATA(0) | 0x40000000, 8);
if (nv50_tex_construct(nv50, so, mt, unit)) {
NOUVEAU_ERR("failed tex validate\n");
More information about the mesa-commit
mailing list