diff options
author | Dave Airlie <airlied@redhat.com> | 2010-04-15 14:56:20 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-04-15 14:56:20 +1000 |
commit | 7d93f2bf8462948836491c004823feb7a1ce1445 (patch) | |
tree | 1032233f3a5cc198cfc88e1454b117cf57ddf0a5 /src/gallium/drivers/r300/r300_fs.c | |
parent | c8efed89ba740fe06a8207ae17520a4db38c96a7 (diff) | |
download | external_mesa3d-7d93f2bf8462948836491c004823feb7a1ce1445.zip external_mesa3d-7d93f2bf8462948836491c004823feb7a1ce1445.tar.gz external_mesa3d-7d93f2bf8462948836491c004823feb7a1ce1445.tar.bz2 |
r300g: fix regression in texdepth.
texdepth stopped working when npot went in, this brings it back
to life.
< MostAwesomeDude> That looks like what I was going to do.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/drivers/r300/r300_fs.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_fs.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c index 3cddf98..dab57fd 100644 --- a/src/gallium/drivers/r300/r300_fs.c +++ b/src/gallium/drivers/r300/r300_fs.c @@ -140,14 +140,11 @@ static void get_external_state( for (i = 0; i < texstate->sampler_state_count; i++) { struct r300_sampler_state* s = texstate->sampler_states[i]; - struct r300_texture *t; - if (!s || !texstate->sampler_views[i]) { + if (!s) { continue; } - t = (struct r300_texture*)texstate->sampler_views[i]->base.texture; - if (s->state.compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) { /* XXX Gallium doesn't provide us with any information regarding * this mode, so we are screwed. I'm setting 0 = LUMINANCE. */ @@ -157,7 +154,12 @@ static void get_external_state( state->unit[i].texture_compare_func = s->state.compare_func; } - state->unit[i].fake_npot = t->uses_pitch; + if (texstate->sampler_views[i]) { + struct r300_texture *t; + t = (struct r300_texture*)texstate->sampler_views[i]->base.texture; + + state->unit[i].fake_npot = t->uses_pitch; + } state->unit[i].non_normalized_coords = !s->state.normalized_coords; /* XXX this should probably take into account STR, not just S. */ |