From b8030c6561e019e079b5be2fe64ec804df4bfa03 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Fri, 12 Mar 2010 14:37:36 +0100 Subject: st/mesa: Associate a sampler view with an st texture object. Lazily create a sampler view when the texture is being bound for the first time. --- src/mesa/state_tracker/st_atom_pixeltransfer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/state_tracker/st_atom_pixeltransfer.c') diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c index 0b2e3f53812..e766b3a9038 100644 --- a/src/mesa/state_tracker/st_atom_pixeltransfer.c +++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c @@ -257,6 +257,8 @@ get_pixel_transfer_program(GLcontext *ctx, const struct state_key *key) /* create the colormap/texture now if not already done */ if (!st->pixel_xfer.pixelmap_texture) { st->pixel_xfer.pixelmap_texture = create_color_map_texture(ctx); + st->pixel_xfer.pixelmap_sampler_view = st_sampler_view_from_texture(ctx->st->pipe, + st->pixel_xfer.pixelmap_texture); } /* with a little effort, we can do four pixel map look-ups with -- cgit v1.2.3