diff options
author | Brian <brian@i915.localnet.net> | 2007-08-07 15:12:22 -0600 |
---|---|---|
committer | Brian <brian@i915.localnet.net> | 2007-08-07 15:12:22 -0600 |
commit | d78dab126724e6e9d475289a086fb6f85adc3985 (patch) | |
tree | 9524da035fa30e415e28bae08d8fade891b0ab92 /src/mesa/state_tracker/st_atom_sampler.c | |
parent | 28d64d398bb3e04d20a9c03c9a0b92c0a7b9d6d4 (diff) |
plug in texture/sampler state update
Diffstat (limited to 'src/mesa/state_tracker/st_atom_sampler.c')
-rw-r--r-- | src/mesa/state_tracker/st_atom_sampler.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index 1aa9da8484..a49698cda4 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -103,14 +103,16 @@ update_samplers(struct st_context *st) memset(&sampler, 0, sizeof(sampler)); - sampler.wrap_s = gl_wrap_to_sp(texobj->WrapS); - sampler.wrap_t = gl_wrap_to_sp(texobj->WrapT); - sampler.wrap_r = gl_wrap_to_sp(texobj->WrapR); + if (texobj) { + sampler.wrap_s = gl_wrap_to_sp(texobj->WrapS); + sampler.wrap_t = gl_wrap_to_sp(texobj->WrapT); + sampler.wrap_r = gl_wrap_to_sp(texobj->WrapR); - sampler.min_filter = gl_filter_to_sp(texobj->MinFilter); - sampler.mag_filter = gl_filter_to_sp(texobj->MagFilter); + sampler.min_filter = gl_filter_to_sp(texobj->MinFilter); + sampler.mag_filter = gl_filter_to_sp(texobj->MagFilter); - /* XXX more sampler state here */ + /* XXX more sampler state here */ + } if (memcmp(&sampler, &st->state.sampler[u], sizeof(sampler)) != 0) { /* state has changed */ |