summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_tex.c
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2009-10-06 13:55:48 +1000
committerBen Skeggs <[email protected]>2009-10-06 13:57:51 +1000
commit340436d8d2f5f6360c2920de3a7547af95deb8f6 (patch)
treed92a9c63591fd245bf86a6885e532579e6f804fa /src/gallium/drivers/nv50/nv50_tex.c
parent4911443d364e38bf93915cf9587f5cf8791cb30d (diff)
nv50: fix segfault when there's gaps in enabled texture units
Tested with progs/demos/multiarb.
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_tex.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_tex.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_tex.c b/src/gallium/drivers/nv50/nv50_tex.c
index 21825a0411c..72d33150af1 100644
--- a/src/gallium/drivers/nv50/nv50_tex.c
+++ b/src/gallium/drivers/nv50/nv50_tex.c
@@ -157,6 +157,9 @@ nv50_tex_validate(struct nv50_context *nv50)
for (unit = 0; unit < nv50->miptree_nr; unit++) {
struct nv50_miptree *mt = nv50->miptree[unit];
+ if (!mt)
+ continue;
+
so_method(so, tesla, NV50TCL_CB_DATA(0) | 0x40000000, 8);
if (nv50_tex_construct(nv50, so, mt, unit)) {
NOUVEAU_ERR("failed tex validate\n");