~ubuntu-branches/ubuntu/precise/mesa/precise-updates

« back to all changes in this revision

Viewing changes to src/mesa/state_tracker/st_atom_pixeltransfer.c

  • Committer: Package Import Robot
  • Author(s): Robert Hooker
  • Date: 2012-02-02 12:05:48 UTC
  • mfrom: (1.7.1) (3.3.27 sid)
  • Revision ID: package-import@ubuntu.com-20120202120548-nvkma85jq0h4coix
Tags: 8.0~rc2-0ubuntu4
Drop drisearchdir handling, it is no longer needed with multiarch
and dri-alternates being removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
}
85
85
 
86
86
 
87
 
static struct pipe_resource *
88
 
create_color_map_texture(struct gl_context *ctx)
89
 
{
90
 
   struct st_context *st = st_context(ctx);
91
 
   struct pipe_context *pipe = st->pipe;
92
 
   struct pipe_resource *pt;
93
 
   enum pipe_format format;
94
 
   const uint texSize = 256; /* simple, and usually perfect */
95
 
 
96
 
   /* find an RGBA texture format */
97
 
   format = st_choose_format(pipe->screen, GL_RGBA, GL_NONE, GL_NONE,
98
 
                             PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW);
99
 
 
100
 
   /* create texture for color map/table */
101
 
   pt = st_texture_create(st, PIPE_TEXTURE_2D, format, 0,
102
 
                          texSize, texSize, 1, 1, PIPE_BIND_SAMPLER_VIEW);
103
 
   return pt;
104
 
}
105
 
 
106
 
 
107
87
/**
108
88
 * Update the pixelmap texture with the contents of the R/G/B/A pixel maps.
109
89
 */
186
166
   inst[ic].TexSrcUnit = 0;
187
167
   inst[ic].TexSrcTarget = TEXTURE_2D_INDEX;
188
168
   ic++;
189
 
   fp->Base.InputsRead = (1 << FRAG_ATTRIB_TEX0);
 
169
   fp->Base.InputsRead = BITFIELD64_BIT(FRAG_ATTRIB_TEX0);
190
170
   fp->Base.OutputsWritten = BITFIELD64_BIT(FRAG_RESULT_COLOR);
191
171
   fp->Base.SamplersUsed = 0x1;  /* sampler 0 (bit 0) is used */
192
172
 
219
199
 
220
200
      /* create the colormap/texture now if not already done */
221
201
      if (!st->pixel_xfer.pixelmap_texture) {
222
 
         st->pixel_xfer.pixelmap_texture = create_color_map_texture(ctx);
 
202
         st->pixel_xfer.pixelmap_texture = st_create_color_map_texture(ctx);
223
203
         st->pixel_xfer.pixelmap_sampler_view =
224
204
            st_create_texture_sampler_view(st->pipe,
225
205
                                           st->pixel_xfer.pixelmap_texture);
286
266
   if (!fp->Base.Instructions) {
287
267
      _mesa_error(ctx, GL_OUT_OF_MEMORY,
288
268
                  "generating pixel transfer program");
 
269
      _mesa_free_parameter_list(params);
289
270
      return NULL;
290
271
   }
291
272