draw_pt_fetch.c revision f088b53769aacbee20135d912c33d688b6002011
1a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell/**************************************************************************
2a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell *
3a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
4a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * All Rights Reserved.
5a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell *
6a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * Permission is hereby granted, free of charge, to any person obtaining a
7a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * copy of this software and associated documentation files (the
8a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * "Software"), to deal in the Software without restriction, including
9a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * without limitation the rights to use, copy, modify, merge, publish,
10a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * distribute, sub license, and/or sell copies of the Software, and to
11a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * permit persons to whom the Software is furnished to do so, subject to
12a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * the following conditions:
13a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell *
14a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * The above copyright notice and this permission notice (including the
15a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * next paragraph) shall be included in all copies or substantial portions
16a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * of the Software.
17a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell *
18a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell *
26a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell **************************************************************************/
27a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
28a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell#include "pipe/p_util.h"
29a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell#include "draw/draw_context.h"
30a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell#include "draw/draw_private.h"
31a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell#include "draw/draw_vbuf.h"
32a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell#include "draw/draw_vertex.h"
33a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell#include "draw/draw_pt.h"
34a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell#include "translate/translate.h"
35a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
36f088b53769aacbee20135d912c33d688b6002011Zack Rusin#include "cso_cache/cso_cache.h"
37f088b53769aacbee20135d912c33d688b6002011Zack Rusin#include "cso_cache/cso_hash.h"
38a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
39a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwellstruct pt_fetch {
40a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   struct draw_context *draw;
41a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
42a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   struct translate *translate;
43f088b53769aacbee20135d912c33d688b6002011Zack Rusin
44a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   unsigned vertex_size;
45f088b53769aacbee20135d912c33d688b6002011Zack Rusin
46f088b53769aacbee20135d912c33d688b6002011Zack Rusin   struct cso_hash *hash;
47a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell};
48a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
49f088b53769aacbee20135d912c33d688b6002011Zack Rusinstatic INLINE unsigned translate_hash_key_size(struct translate_key *key)
50f088b53769aacbee20135d912c33d688b6002011Zack Rusin{
51f088b53769aacbee20135d912c33d688b6002011Zack Rusin   unsigned size = sizeof(struct translate_key) -
52f088b53769aacbee20135d912c33d688b6002011Zack Rusin                   sizeof(struct translate_element) * (PIPE_MAX_ATTRIBS - key->nr_elements);
53f088b53769aacbee20135d912c33d688b6002011Zack Rusin   return size;
54f088b53769aacbee20135d912c33d688b6002011Zack Rusin}
55f088b53769aacbee20135d912c33d688b6002011Zack Rusin
56f088b53769aacbee20135d912c33d688b6002011Zack Rusinstatic INLINE unsigned create_key(struct translate_key *key)
57f088b53769aacbee20135d912c33d688b6002011Zack Rusin{
58f088b53769aacbee20135d912c33d688b6002011Zack Rusin   unsigned hash_key;
59f088b53769aacbee20135d912c33d688b6002011Zack Rusin   unsigned size = translate_hash_key_size(key);
60f088b53769aacbee20135d912c33d688b6002011Zack Rusin   /*debug_printf("key size = %d, (els = %d)\n",
61f088b53769aacbee20135d912c33d688b6002011Zack Rusin     size, key->nr_elements);*/
62f088b53769aacbee20135d912c33d688b6002011Zack Rusin   hash_key = cso_construct_key(key, size);
63f088b53769aacbee20135d912c33d688b6002011Zack Rusin   return hash_key;
64f088b53769aacbee20135d912c33d688b6002011Zack Rusin}
65f088b53769aacbee20135d912c33d688b6002011Zack Rusin
66f088b53769aacbee20135d912c33d688b6002011Zack Rusinstatic struct translate *cached_translate(struct pt_fetch *fetch,
67f088b53769aacbee20135d912c33d688b6002011Zack Rusin                                          struct translate_key *key)
68f088b53769aacbee20135d912c33d688b6002011Zack Rusin{
69f088b53769aacbee20135d912c33d688b6002011Zack Rusin   unsigned hash_key = create_key(key);
70f088b53769aacbee20135d912c33d688b6002011Zack Rusin   struct cso_hash_iter iter = cso_hash_find(fetch->hash, hash_key);
71f088b53769aacbee20135d912c33d688b6002011Zack Rusin   struct translate *translate = 0;
72f088b53769aacbee20135d912c33d688b6002011Zack Rusin
73f088b53769aacbee20135d912c33d688b6002011Zack Rusin   if (cso_hash_iter_is_null(iter)) {
74f088b53769aacbee20135d912c33d688b6002011Zack Rusin      translate = translate_create(key);
75f088b53769aacbee20135d912c33d688b6002011Zack Rusin      cso_hash_insert(fetch->hash, hash_key, translate);
76f088b53769aacbee20135d912c33d688b6002011Zack Rusin      /*debug_printf("\tCREATED with %d\n", hash_key);*/
77f088b53769aacbee20135d912c33d688b6002011Zack Rusin   } else {
78f088b53769aacbee20135d912c33d688b6002011Zack Rusin      translate = cso_hash_iter_data(iter);
79f088b53769aacbee20135d912c33d688b6002011Zack Rusin      /*debug_printf("\tOK with %d\n", hash_key);*/
80f088b53769aacbee20135d912c33d688b6002011Zack Rusin   }
81f088b53769aacbee20135d912c33d688b6002011Zack Rusin
82f088b53769aacbee20135d912c33d688b6002011Zack Rusin   return translate;
83f088b53769aacbee20135d912c33d688b6002011Zack Rusin}
84a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
85f088b53769aacbee20135d912c33d688b6002011Zack Rusinstatic INLINE void delete_translates(struct pt_fetch *fetch)
86f088b53769aacbee20135d912c33d688b6002011Zack Rusin{
87f088b53769aacbee20135d912c33d688b6002011Zack Rusin   struct cso_hash *hash = fetch->hash;
88f088b53769aacbee20135d912c33d688b6002011Zack Rusin   struct cso_hash_iter iter = cso_hash_first_node(hash);
89f088b53769aacbee20135d912c33d688b6002011Zack Rusin   while (!cso_hash_iter_is_null(iter)) {
90f088b53769aacbee20135d912c33d688b6002011Zack Rusin      struct translate *state = (struct translate*)cso_hash_iter_data(iter);
91f088b53769aacbee20135d912c33d688b6002011Zack Rusin      iter = cso_hash_iter_next(iter);
92f088b53769aacbee20135d912c33d688b6002011Zack Rusin      if (state) {
93f088b53769aacbee20135d912c33d688b6002011Zack Rusin         state->release(state);
94f088b53769aacbee20135d912c33d688b6002011Zack Rusin      }
95f088b53769aacbee20135d912c33d688b6002011Zack Rusin   }
96f088b53769aacbee20135d912c33d688b6002011Zack Rusin}
97a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
98a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell/* Perform the fetch from API vertex elements & vertex buffers, to a
99a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * contiguous set of float[4] attributes as required for the
100a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * vertex_shader->run_linear() method.
101a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell *
102a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * This is used in all cases except pure passthrough
103a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * (draw_pt_fetch_emit.c) which has its own version to translate
104a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell * directly to hw vertices.
105a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell *
106a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell */
107a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwellvoid draw_pt_fetch_prepare( struct pt_fetch *fetch,
108a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell			    unsigned vertex_size )
109a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell{
110a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   struct draw_context *draw = fetch->draw;
111a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   unsigned i, nr = 0;
112a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   unsigned dst_offset = 0;
113a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   struct translate_key key;
114a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
115a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   fetch->vertex_size = vertex_size;
116a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
117a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   memset(&key, 0, sizeof(key));
118a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
119c898eae27221bd23b11327553c215a94369eeb99Keith Whitwell   /* Always emit/leave space for a vertex header.
120a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell    *
121a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell    * It's worth considering whether the vertex headers should contain
122a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell    * a pointer to the 'data', rather than having it inline.
123a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell    * Something to look at after we've fully switched over to the pt
124a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell    * paths.
125a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell    */
126a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   {
127a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      /* Need to set header->vertex_id = 0xffff somehow.
128a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell       */
129a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      key.element[nr].input_format = PIPE_FORMAT_R32_FLOAT;
1307d72607e142c0412b88183b849fd701e698b8f79Keith Whitwell      key.element[nr].input_buffer = draw->pt.nr_vertex_buffers;
131a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      key.element[nr].input_offset = 0;
132a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      key.element[nr].output_format = PIPE_FORMAT_R32_FLOAT;
133a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      key.element[nr].output_offset = dst_offset;
134a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      dst_offset += 1 * sizeof(float);
135a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      nr++;
136a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
137a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
138a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      /* Just leave the clip[] array untouched.
139a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell       */
140a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      dst_offset += 4 * sizeof(float);
141a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   }
142a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
143a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
1447d72607e142c0412b88183b849fd701e698b8f79Keith Whitwell   for (i = 0; i < draw->pt.nr_vertex_elements; i++) {
1457d72607e142c0412b88183b849fd701e698b8f79Keith Whitwell      key.element[nr].input_format = draw->pt.vertex_element[i].src_format;
1467d72607e142c0412b88183b849fd701e698b8f79Keith Whitwell      key.element[nr].input_buffer = draw->pt.vertex_element[i].vertex_buffer_index;
1477d72607e142c0412b88183b849fd701e698b8f79Keith Whitwell      key.element[nr].input_offset = draw->pt.vertex_element[i].src_offset;
148a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      key.element[nr].output_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
149a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      key.element[nr].output_offset = dst_offset;
150a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
151a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      dst_offset += 4 * sizeof(float);
152a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      nr++;
153a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   }
154a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
155a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   assert(dst_offset <= vertex_size);
156a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
157a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   key.nr_elements = nr;
158a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   key.output_stride = vertex_size;
159a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
160a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
161a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   /* Don't bother with caching at this stage:
162a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell    */
163a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   if (!fetch->translate ||
164a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell       memcmp(&fetch->translate->key, &key, sizeof(key)) != 0)
165a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   {
166f088b53769aacbee20135d912c33d688b6002011Zack Rusin      fetch->translate = cached_translate(fetch, &key);
167a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
168c898eae27221bd23b11327553c215a94369eeb99Keith Whitwell      {
169a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell	 static struct vertex_header vh = { 0, 0, 0, 0xffff };
170a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell	 fetch->translate->set_buffer(fetch->translate,
1717d72607e142c0412b88183b849fd701e698b8f79Keith Whitwell				      draw->pt.nr_vertex_buffers,
172a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell				      &vh,
173a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell				      0);
174a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      }
175a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   }
176a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell}
177a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
178a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
179a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
180a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
181a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwellvoid draw_pt_fetch_run( struct pt_fetch *fetch,
182a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell			const unsigned *elts,
183a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell			unsigned count,
184a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell			char *verts )
185a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell{
186a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   struct draw_context *draw = fetch->draw;
187a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   struct translate *translate = fetch->translate;
188a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   unsigned i;
189a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
1907d72607e142c0412b88183b849fd701e698b8f79Keith Whitwell   for (i = 0; i < draw->pt.nr_vertex_buffers; i++) {
191a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      translate->set_buffer(translate,
192a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell			    i,
1937d72607e142c0412b88183b849fd701e698b8f79Keith Whitwell			    ((char *)draw->pt.user.vbuffer[i] +
1947d72607e142c0412b88183b849fd701e698b8f79Keith Whitwell			     draw->pt.vertex_buffer[i].buffer_offset),
1957d72607e142c0412b88183b849fd701e698b8f79Keith Whitwell			    draw->pt.vertex_buffer[i].pitch );
196a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   }
197a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
198a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   translate->run_elts( translate,
199a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell			elts,
200a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell			count,
201a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell			verts );
202a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell}
203a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
204a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
205a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwellstruct pt_fetch *draw_pt_fetch_create( struct draw_context *draw )
206a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell{
207a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   struct pt_fetch *fetch = CALLOC_STRUCT(pt_fetch);
208a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   if (!fetch)
209a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell      return NULL;
210f088b53769aacbee20135d912c33d688b6002011Zack Rusin
211a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   fetch->draw = draw;
212f088b53769aacbee20135d912c33d688b6002011Zack Rusin   fetch->hash = cso_hash_create();
213a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   return fetch;
214a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell}
215a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
216a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwellvoid draw_pt_fetch_destroy( struct pt_fetch *fetch )
217a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell{
218f088b53769aacbee20135d912c33d688b6002011Zack Rusin   delete_translates(fetch);
219f088b53769aacbee20135d912c33d688b6002011Zack Rusin   cso_hash_delete(fetch->hash);
220e406ad5912985920a0d796f1ada58b40316590edKeith Whitwell
221a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell   FREE(fetch);
222a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell}
223a773f06e969a3992451dd7fe6fd55ea96b2774faKeith Whitwell
224