Signed-off-by: Tilman Sauerbeck <til...@code-monkey.de> --- update_samplers() showed up in a profile of Heroes of Newerth; this patch pushes it down the profile by ~3%.
Does this seem plausible? src/mesa/state_tracker/st_atom_sampler.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index 474cbd5..4374ac1 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -129,12 +129,13 @@ update_samplers(struct st_context *st) st->state.num_samplers = 0; + memset(st->state.samplers, 0, st->ctx->Const.MaxTextureImageUnits * + sizeof(struct pipe_sampler_state)); + /* loop over sampler units (aka tex image units) */ for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) { struct pipe_sampler_state *sampler = st->state.samplers + su; - memset(sampler, 0, sizeof(*sampler)); - if (samplersUsed & (1 << su)) { struct gl_texture_object *texobj; struct gl_texture_image *teximg; -- 1.7.3.5 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev