From afae0891949b72a2ede2a3b6a01d4d6bcf4ceae0 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 19 Mar 2010 01:13:57 +0100 Subject: r300g: fix breakage after the gallium-sampler-view merge --- src/gallium/drivers/r300/r300_emit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/r300/r300_emit.c') diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 5522fb306db..c897df628d2 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -1050,9 +1050,11 @@ validate: } /* ...textures... */ for (i = 0; i < texstate->count; i++) { - tex = (struct r300_texture*)texstate->fragment_sampler_views[i]->texture; - if (!tex || !texstate->sampler_states[i]) + if (!(texstate->tx_enable & (1 << i))) { continue; + } + + tex = (struct r300_texture*)texstate->fragment_sampler_views[i]->texture; if (!r300_add_texture(r300->rws, tex, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0)) { r300->context.flush(&r300->context, 0, NULL); -- cgit v1.2.3