diff options
author | michal <michal@transistor.(none)> | 2009-12-10 07:52:45 +0100 |
---|---|---|
committer | michal <michal@transistor.(none)> | 2009-12-10 07:52:45 +0100 |
commit | 1f5285f99771243b636deb9ae0a17c54f818fac6 (patch) | |
tree | f67e41d415bcaa6d4508d47631f564a5db96253c /src/gallium/drivers/i915/i915_state_sampler.c | |
parent | 92b781c2dda9ae5aeec7e32cfc9902057edd0a9d (diff) |
i915: Fix for sampler view changes.
Diffstat (limited to 'src/gallium/drivers/i915/i915_state_sampler.c')
-rw-r--r-- | src/gallium/drivers/i915/i915_state_sampler.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/gallium/drivers/i915/i915_state_sampler.c b/src/gallium/drivers/i915/i915_state_sampler.c index e5c6d87215..483947ece7 100644 --- a/src/gallium/drivers/i915/i915_state_sampler.c +++ b/src/gallium/drivers/i915/i915_state_sampler.c @@ -144,20 +144,22 @@ void i915_update_samplers( struct i915_context *i915 ) i915->current.sampler_enable_nr = 0; i915->current.sampler_enable_flags = 0x0; - for (unit = 0; unit < i915->num_textures && unit < i915->num_samplers; + for (unit = 0; unit < i915->num_fragment_sampler_views && unit < i915->num_samplers; unit++) { /* determine unit enable/disable by looking for a bound texture */ /* could also examine the fragment program? */ - if (i915->texture[unit]) { + if (i915->fragment_sampler_views[unit]) { + struct i915_texture *texture = (struct i915_texture *)i915->fragment_sampler_views[unit]->texture; + update_sampler( i915, unit, i915->sampler[unit], /* sampler state */ - i915->texture[unit], /* texture */ + texture, /* texture */ i915->current.sampler[unit] /* the result */ ); i915_update_texture( i915, unit, - i915->texture[unit], /* texture */ + texture, /* texture */ i915->sampler[unit], /* sampler state */ i915->current.texbuffer[unit] ); @@ -281,14 +283,16 @@ i915_update_textures(struct i915_context *i915) { uint unit; - for (unit = 0; unit < i915->num_textures && unit < i915->num_samplers; + for (unit = 0; unit < i915->num_fragment_sampler_views && unit < i915->num_samplers; unit++) { /* determine unit enable/disable by looking for a bound texture */ /* could also examine the fragment program? */ - if (i915->texture[unit]) { + if (i915->fragment_sampler_views[unit]) { + struct i915_texture *texture = (struct i915_texture *)i915->fragment_sampler_views[unit]->texture; + i915_update_texture( i915, unit, - i915->texture[unit], /* texture */ + texture, /* texture */ i915->sampler[unit], /* sampler state */ i915->current.texbuffer[unit] ); } |