summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-02-23 23:16:36 +0100
committerLuca Barbieri <[email protected]>2010-04-12 12:13:15 +0200
commitd75f99ab0c98b36028d7e80b8cf6906b672e571f (patch)
tree9a4b75ab939530d3e0eaebb418fc510b0afc3e25 /src/gallium/drivers/nouveau
parente0af5c9b5457d560ab075118881de01e0277ed14 (diff)
nouveau: don't autobind in state objects relocations
Autobinding creates additional pushbuffer usage which may not be accounted in callers, and is also slow. The next relocations patch depends on this for correctness. Assert instead if the objects are not bound, which should happen at screen creation time.
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_stateobj.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h
index 5357e981de3..f5c1c5ca2c3 100644
--- a/src/gallium/drivers/nouveau/nouveau_stateobj.h
+++ b/src/gallium/drivers/nouveau/nouveau_stateobj.h
@@ -271,7 +271,6 @@ so_emit(struct nouveau_channel *chan, struct nouveau_stateobj *so)
static INLINE void
so_emit_reloc_markers(struct nouveau_channel *chan, struct nouveau_stateobj *so)
{
- struct nouveau_grobj *gr = NULL;
unsigned i;
int ret = 0;
@@ -289,14 +288,11 @@ so_emit_reloc_markers(struct nouveau_channel *chan, struct nouveau_stateobj *so)
}
#endif /* DEBUG_NOUVEAU_STATEOBJ */
- /* The object needs to be bound and the system must know the
- * subchannel is being used. Otherwise it will discard it.
+ /* We don't need to autobind, since there are enough subchannels
+ * for all objects we use. If this is changed, account for the extra
+ * space in callers of this function.
*/
- if (gr != r->gr) {
- BEGIN_RING(chan, r->gr, 0x100, 1);
- OUT_RING(chan, 0);
- gr = r->gr;
- }
+ assert(r->gr->bound != NOUVEAU_GROBJ_UNBOUND);
/* Some relocs really don't like to be hammered,
* NOUVEAU_BO_DUMMY makes sure it only