blob: 3ee785194ef50c0f029629b3fef7dc8d6fa47d69 [file] [log] [blame]
Chia-I Wu82f50aa2014-08-05 10:43:03 +08001/*
2 * XGL
3 *
4 * Copyright (C) 2014 LunarG, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
Chia-I Wu44e42362014-09-02 08:32:09 +080023 *
24 * Authors:
25 * Chia-I Wu <olv@lunarg.com>
Chia-I Wu82f50aa2014-08-05 10:43:03 +080026 */
27
Courtney Goeltzenleuchterfb4fb532014-08-14 09:35:21 -060028#include "dev.h"
Chia-I Wu9e61c0d2014-09-15 15:12:06 +080029#include "gpu.h"
30#include "mem.h"
Chia-I Wu82f50aa2014-08-05 10:43:03 +080031#include "obj.h"
32
Chia-I Wu4c120782015-01-18 11:32:18 +080033static const uint32_t intel_base_magic = 0x494e544c;
Chia-I Wu778a80c2015-01-03 22:45:10 +080034
Chia-I Wu82f50aa2014-08-05 10:43:03 +080035/**
36 * Return true if an (not so) arbitrary pointer casted to intel_base points to
Chia-I Wu778a80c2015-01-03 22:45:10 +080037 * a valid intel_base. This assumes at least the first
38 * sizeof(void*)+sizeof(uint32_t) bytes of the address are accessible, and
39 * they does not happen to be our magic values.
Chia-I Wu82f50aa2014-08-05 10:43:03 +080040 */
Chia-I Wu778a80c2015-01-03 22:45:10 +080041bool intel_base_is_valid(const struct intel_base *base,
42 XGL_DBG_OBJECT_TYPE type)
Chia-I Wu82f50aa2014-08-05 10:43:03 +080043{
Chia-I Wu778a80c2015-01-03 22:45:10 +080044 return (base->magic == intel_base_magic + type);
Chia-I Wu82f50aa2014-08-05 10:43:03 +080045}
46
Chia-I Wu26f0bd02014-08-07 10:38:40 +080047XGL_RESULT intel_base_get_info(struct intel_base *base, int type,
48 XGL_SIZE *size, XGL_VOID *data)
49{
50 XGL_RESULT ret = XGL_SUCCESS;
51 XGL_SIZE s;
52
53 switch (type) {
54 case XGL_INFO_TYPE_MEMORY_REQUIREMENTS:
55 s = sizeof(XGL_MEMORY_REQUIREMENTS);
Chia-I Wu26f0bd02014-08-07 10:38:40 +080056 *size = s;
Jon Ashburn408daec2014-12-05 09:23:52 -070057 if (data == NULL)
58 return ret;
59 memset(data, 0, s);
60
Chia-I Wu26f0bd02014-08-07 10:38:40 +080061 break;
62 default:
63 ret = XGL_ERROR_INVALID_VALUE;
64 break;
65 }
66
67 return ret;
68}
69
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +080070static bool base_dbg_copy_create_info(struct intel_base_dbg *dbg,
71 const void *create_info)
72{
73 const union {
74 const void *ptr;
75 const struct {
76 XGL_STRUCTURE_TYPE struct_type;
77 XGL_VOID *next;
78 } *header;
79 } info = { .ptr = create_info };
80 XGL_SIZE shallow_copy = 0;
81
82 if (!create_info)
83 return true;
84
Chia-I Wub1076d72014-08-18 16:10:20 +080085 switch (dbg->type) {
86 case XGL_DBG_OBJECT_DEVICE:
87 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_DEVICE_CREATE_INFO);
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +080088 break;
Chia-I Wub1076d72014-08-18 16:10:20 +080089 case XGL_DBG_OBJECT_GPU_MEMORY:
90 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO);
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +080091 shallow_copy = sizeof(XGL_MEMORY_ALLOC_INFO);
92 break;
Chia-I Wub1076d72014-08-18 16:10:20 +080093 case XGL_DBG_OBJECT_EVENT:
94 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_EVENT_CREATE_INFO);
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +080095 shallow_copy = sizeof(XGL_EVENT_CREATE_INFO);
96 break;
Chia-I Wub1076d72014-08-18 16:10:20 +080097 case XGL_DBG_OBJECT_FENCE:
98 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_FENCE_CREATE_INFO);
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +080099 shallow_copy = sizeof(XGL_FENCE_CREATE_INFO);
100 break;
Chia-I Wub1076d72014-08-18 16:10:20 +0800101 case XGL_DBG_OBJECT_QUERY_POOL:
102 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO);
Courtney Goeltzenleuchter850d12c2014-08-07 18:13:10 -0600103 shallow_copy = sizeof(XGL_QUERY_POOL_CREATE_INFO);
104 break;
Chia-I Wub1076d72014-08-18 16:10:20 +0800105 case XGL_DBG_OBJECT_IMAGE:
106 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_IMAGE_CREATE_INFO);
Chia-I Wufeb441f2014-08-08 21:27:38 +0800107 shallow_copy = sizeof(XGL_IMAGE_CREATE_INFO);
108 break;
Chia-I Wub1076d72014-08-18 16:10:20 +0800109 case XGL_DBG_OBJECT_IMAGE_VIEW:
110 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO);
Chia-I Wu5a323262014-08-11 10:31:53 +0800111 shallow_copy = sizeof(XGL_IMAGE_VIEW_CREATE_INFO);
112 break;
Chia-I Wub1076d72014-08-18 16:10:20 +0800113 case XGL_DBG_OBJECT_COLOR_TARGET_VIEW:
114 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO);
Chia-I Wu5a323262014-08-11 10:31:53 +0800115 shallow_copy = sizeof(XGL_COLOR_ATTACHMENT_VIEW_CREATE_INFO);
116 break;
Chia-I Wub1076d72014-08-18 16:10:20 +0800117 case XGL_DBG_OBJECT_DEPTH_STENCIL_VIEW:
118 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO);
Chia-I Wu5a323262014-08-11 10:31:53 +0800119 shallow_copy = sizeof(XGL_DEPTH_STENCIL_VIEW_CREATE_INFO);
120 break;
Chia-I Wub1076d72014-08-18 16:10:20 +0800121 case XGL_DBG_OBJECT_SAMPLER:
122 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_SAMPLER_CREATE_INFO);
Chia-I Wu28b89962014-08-18 14:40:49 +0800123 shallow_copy = sizeof(XGL_SAMPLER_CREATE_INFO);
124 break;
Chia-I Wub1076d72014-08-18 16:10:20 +0800125 case XGL_DBG_OBJECT_DESCRIPTOR_SET:
126 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_DESCRIPTOR_SET_CREATE_INFO);
Chia-I Wub8d04c82014-08-18 15:51:10 +0800127 shallow_copy = sizeof(XGL_DESCRIPTOR_SET_CREATE_INFO);
128 break;
Chia-I Wua5714e82014-08-11 15:33:42 +0800129 case XGL_DBG_OBJECT_VIEWPORT_STATE:
130 /* no struct header! */
131 shallow_copy = sizeof(XGL_VIEWPORT_STATE_CREATE_INFO);
132 break;
133 case XGL_DBG_OBJECT_RASTER_STATE:
134 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_RASTER_STATE_CREATE_INFO);
135 shallow_copy = sizeof(XGL_RASTER_STATE_CREATE_INFO);
136 break;
137 case XGL_DBG_OBJECT_MSAA_STATE:
138 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_MSAA_STATE_CREATE_INFO);
139 shallow_copy = sizeof(XGL_MSAA_STATE_CREATE_INFO);
140 break;
141 case XGL_DBG_OBJECT_COLOR_BLEND_STATE:
142 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_COLOR_BLEND_STATE_CREATE_INFO);
143 shallow_copy = sizeof(XGL_COLOR_BLEND_STATE_CREATE_INFO);
144 break;
145 case XGL_DBG_OBJECT_DEPTH_STENCIL_STATE:
146 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_DEPTH_STENCIL_STATE_CREATE_INFO);
147 shallow_copy = sizeof(XGL_DEPTH_STENCIL_STATE_CREATE_INFO);
148 break;
Chia-I Wu730e5362014-08-19 12:15:09 +0800149 case XGL_DBG_OBJECT_CMD_BUFFER:
150 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO);
151 shallow_copy = sizeof(XGL_CMD_BUFFER_CREATE_INFO);
152 break;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600153 case XGL_DBG_OBJECT_GRAPHICS_PIPELINE:
154 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO);
155 break;
Courtney Goeltzenleuchter52ec3362014-08-19 11:52:02 -0600156 case XGL_DBG_OBJECT_SHADER:
Courtney Goeltzenleuchteref5b1162014-10-10 16:29:46 -0600157 assert(info.header->struct_type == XGL_STRUCTURE_TYPE_SHADER_CREATE_INFO);
Courtney Goeltzenleuchter52ec3362014-08-19 11:52:02 -0600158 shallow_copy = sizeof(XGL_SHADER_CREATE_INFO);
159 break;
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +0800160 default:
Courtney Goeltzenleuchterfb4fb532014-08-14 09:35:21 -0600161 // log debug message regarding invalid struct_type?
162 intel_dev_log(dbg->dev, XGL_DBG_MSG_ERROR,
163 XGL_VALIDATION_LEVEL_0, XGL_NULL_HANDLE, 0, 0,
164 "Invalid Create Info type: 0x%x", info.header->struct_type);
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +0800165 return false;
166 break;
167 }
168
169 if (shallow_copy) {
Chia-I Wu73523682014-10-23 01:38:26 +0800170 /* XGL_VIEWPORT_STATE_CREATE_INFO has no header */
171 if (dbg->type != XGL_DBG_OBJECT_VIEWPORT_STATE)
172 assert(!info.header->next);
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +0800173
174 dbg->create_info = icd_alloc(shallow_copy, 0, XGL_SYSTEM_ALLOC_DEBUG);
175 if (!dbg->create_info)
176 return false;
177
178 memcpy(dbg->create_info, create_info, shallow_copy);
Chia-I Wue2934f92014-08-16 13:17:22 +0800179 dbg->create_info_size = shallow_copy;
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +0800180 } else if (info.header->struct_type ==
181 XGL_STRUCTURE_TYPE_DEVICE_CREATE_INFO) {
182 const XGL_DEVICE_CREATE_INFO *src = info.ptr;
183 XGL_DEVICE_CREATE_INFO *dst;
184 uint8_t *d;
185 XGL_SIZE size;
186 XGL_UINT i;
187
188 size = sizeof(*src);
Chia-I Wue2934f92014-08-16 13:17:22 +0800189 dbg->create_info_size = size;
190
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +0800191 size += sizeof(src->pRequestedQueues[0]) * src->queueRecordCount;
192 size += sizeof(src->ppEnabledExtensionNames[0]) * src->extensionCount;
193 for (i = 0; i < src->extensionCount; i++) {
Chia-I Wu7461fcf2014-12-27 15:16:07 +0800194 size += 1 + strlen(src->ppEnabledExtensionNames[i]);
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +0800195 }
196
Chia-I Wu98dcfab2014-08-07 12:07:52 +0800197 dst = icd_alloc(size, 0, XGL_SYSTEM_ALLOC_DEBUG);
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +0800198 if (!dst)
199 return false;
200
201 memcpy(dst, src, sizeof(*src));
202
203 d = (uint8_t *) dst;
204 d += sizeof(*src);
205
206 size = sizeof(src->pRequestedQueues[0]) * src->queueRecordCount;
207 memcpy(d, src->pRequestedQueues, size);
208 dst->pRequestedQueues = (const XGL_DEVICE_QUEUE_CREATE_INFO *) d;
209 d += size;
210
211 size = sizeof(src->ppEnabledExtensionNames[0]) * src->extensionCount;
212 dst->ppEnabledExtensionNames = (const XGL_CHAR * const *) d;
213
214 for (i = 0; i < src->extensionCount; i++) {
Chia-I Wu7461fcf2014-12-27 15:16:07 +0800215 const XGL_SIZE len = strlen(src->ppEnabledExtensionNames[i]);
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +0800216
217 memcpy(d + size, src->ppEnabledExtensionNames[i], len + 1);
218 ((const XGL_CHAR **) d)[i] = (const XGL_CHAR *) (d + size);
219
220 size += len + 1;
221 }
Courtney Goeltzenleuchter191b06c2014-10-17 16:21:35 -0600222 dbg->create_info = dst;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600223 } else if (info.header->struct_type == XGL_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO) {
224 // TODO: What do we want to copy here?
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +0800225 }
226
227 return true;
228}
229
Chia-I Wu82f50aa2014-08-05 10:43:03 +0800230/**
Chia-I Wubbf2c932014-08-07 12:20:08 +0800231 * Create an intel_base_dbg. When dbg_size is non-zero, a buffer of that
Chia-I Wu660caf82014-08-07 10:54:26 +0800232 * size is allocated and zeroed.
Chia-I Wu82f50aa2014-08-05 10:43:03 +0800233 */
Courtney Goeltzenleuchterfb4fb532014-08-14 09:35:21 -0600234struct intel_base_dbg *intel_base_dbg_create(struct intel_dev *dev,
235 XGL_DBG_OBJECT_TYPE type,
Chia-I Wu660caf82014-08-07 10:54:26 +0800236 const void *create_info,
Chia-I Wubbf2c932014-08-07 12:20:08 +0800237 XGL_SIZE dbg_size)
Chia-I Wu82f50aa2014-08-05 10:43:03 +0800238{
Chia-I Wu660caf82014-08-07 10:54:26 +0800239 struct intel_base_dbg *dbg;
240
Chia-I Wubbf2c932014-08-07 12:20:08 +0800241 if (!dbg_size)
242 dbg_size = sizeof(*dbg);
Chia-I Wu660caf82014-08-07 10:54:26 +0800243
Chia-I Wubbf2c932014-08-07 12:20:08 +0800244 assert(dbg_size >= sizeof(*dbg));
Chia-I Wu660caf82014-08-07 10:54:26 +0800245
Chia-I Wubbf2c932014-08-07 12:20:08 +0800246 dbg = icd_alloc(dbg_size, 0, XGL_SYSTEM_ALLOC_DEBUG);
Chia-I Wu660caf82014-08-07 10:54:26 +0800247 if (!dbg)
248 return NULL;
249
Chia-I Wubbf2c932014-08-07 12:20:08 +0800250 memset(dbg, 0, dbg_size);
Chia-I Wu660caf82014-08-07 10:54:26 +0800251
Chia-I Wu900364b2015-01-03 13:55:22 +0800252 dbg->alloc_id = icd_allocator_get_id();
Chia-I Wu82f50aa2014-08-05 10:43:03 +0800253 dbg->type = type;
Courtney Goeltzenleuchterfb4fb532014-08-14 09:35:21 -0600254 dbg->dev = dev;
Chia-I Wu82f50aa2014-08-05 10:43:03 +0800255
Chia-I Wu1f8fc7c2014-08-07 11:09:11 +0800256 if (!base_dbg_copy_create_info(dbg, create_info)) {
257 icd_free(dbg);
258 return NULL;
Chia-I Wu82f50aa2014-08-05 10:43:03 +0800259 }
260
Chia-I Wu82f50aa2014-08-05 10:43:03 +0800261 return dbg;
262}
263
264void intel_base_dbg_destroy(struct intel_base_dbg *dbg)
265{
Chia-I Wu660caf82014-08-07 10:54:26 +0800266 if (dbg->tag)
267 icd_free(dbg->tag);
268
269 if (dbg->create_info)
270 icd_free(dbg->create_info);
271
Chia-I Wu82f50aa2014-08-05 10:43:03 +0800272 icd_free(dbg);
273}
Chia-I Wu53fc6aa2014-08-06 14:22:51 +0800274
Chia-I Wubbf2c932014-08-07 12:20:08 +0800275/**
276 * Create an intel_base. obj_size and dbg_size specify the real sizes of the
277 * object and the debug metadata. Memories are zeroed.
278 */
Courtney Goeltzenleuchterfb4fb532014-08-14 09:35:21 -0600279struct intel_base *intel_base_create(struct intel_dev *dev,
280 XGL_SIZE obj_size, bool debug,
Chia-I Wubbf2c932014-08-07 12:20:08 +0800281 XGL_DBG_OBJECT_TYPE type,
282 const void *create_info,
283 XGL_SIZE dbg_size)
284{
285 struct intel_base *base;
286
287 if (!obj_size)
288 obj_size = sizeof(*base);
289
290 assert(obj_size >= sizeof(*base));
291
292 base = icd_alloc(obj_size, 0, XGL_SYSTEM_ALLOC_API_OBJECT);
293 if (!base)
294 return NULL;
295
Chia-I Wu778a80c2015-01-03 22:45:10 +0800296 memset(base, 0, obj_size);
297 base->magic = intel_base_magic + type;
298
Courtney Goeltzenleuchterfb4fb532014-08-14 09:35:21 -0600299 if (dev == NULL) {
300 /*
301 * dev is NULL when we are creating the base device object
302 * Set dev now so that debug setup happens correctly
303 */
304 dev = (struct intel_dev *) base;
305 }
306
Chia-I Wubbf2c932014-08-07 12:20:08 +0800307 if (debug) {
Courtney Goeltzenleuchterfb4fb532014-08-14 09:35:21 -0600308 base->dbg = intel_base_dbg_create(dev, type, create_info, dbg_size);
Chia-I Wubbf2c932014-08-07 12:20:08 +0800309 if (!base->dbg) {
310 icd_free(base);
311 return NULL;
312 }
313 }
Chia-I Wu6a42c2a2014-08-19 14:36:47 +0800314
Chia-I Wubbf2c932014-08-07 12:20:08 +0800315 base->get_info = intel_base_get_info;
316
317 return base;
318}
319
320void intel_base_destroy(struct intel_base *base)
321{
322 if (base->dbg)
323 intel_base_dbg_destroy(base->dbg);
324 icd_free(base);
325}
326
Chia-I Wu96177272015-01-03 15:27:41 +0800327ICD_EXPORT XGL_RESULT XGLAPI xglDestroyObject(
Chia-I Wu53fc6aa2014-08-06 14:22:51 +0800328 XGL_OBJECT object)
329{
330 struct intel_obj *obj = intel_obj(object);
331
332 obj->destroy(obj);
333
334 return XGL_SUCCESS;
335}
336
Chia-I Wu96177272015-01-03 15:27:41 +0800337ICD_EXPORT XGL_RESULT XGLAPI xglGetObjectInfo(
Chia-I Wu53fc6aa2014-08-06 14:22:51 +0800338 XGL_BASE_OBJECT object,
339 XGL_OBJECT_INFO_TYPE infoType,
340 XGL_SIZE* pDataSize,
341 XGL_VOID* pData)
342{
343 struct intel_base *base = intel_base(object);
Chia-I Wu53fc6aa2014-08-06 14:22:51 +0800344
Chia-I Wu26f0bd02014-08-07 10:38:40 +0800345 return base->get_info(base, infoType, pDataSize, pData);
Chia-I Wu53fc6aa2014-08-06 14:22:51 +0800346}
347
Chia-I Wu96177272015-01-03 15:27:41 +0800348ICD_EXPORT XGL_RESULT XGLAPI xglBindObjectMemory(
Chia-I Wu53fc6aa2014-08-06 14:22:51 +0800349 XGL_OBJECT object,
Chia-I Wu9e61c0d2014-09-15 15:12:06 +0800350 XGL_GPU_MEMORY mem_,
Chia-I Wu53fc6aa2014-08-06 14:22:51 +0800351 XGL_GPU_SIZE offset)
352{
353 struct intel_obj *obj = intel_obj(object);
Chia-I Wu9e61c0d2014-09-15 15:12:06 +0800354 struct intel_mem *mem = intel_mem(mem_);
Chia-I Wu53fc6aa2014-08-06 14:22:51 +0800355
Chia-I Wu9e61c0d2014-09-15 15:12:06 +0800356 intel_obj_bind_mem(obj, mem, offset);
Chia-I Wu53fc6aa2014-08-06 14:22:51 +0800357
358 return XGL_SUCCESS;
359}
Chia-I Wu7ec9f342014-08-19 10:47:53 +0800360
Chia-I Wu96177272015-01-03 15:27:41 +0800361ICD_EXPORT XGL_RESULT XGLAPI xglDbgSetObjectTag(
Chia-I Wu7ec9f342014-08-19 10:47:53 +0800362 XGL_BASE_OBJECT object,
363 XGL_SIZE tagSize,
364 const XGL_VOID* pTag)
365{
366 struct intel_base *base = intel_base(object);
367 struct intel_base_dbg *dbg = base->dbg;
368 void *tag;
369
370 if (!dbg)
371 return XGL_SUCCESS;
372
373 tag = icd_alloc(tagSize, 0, XGL_SYSTEM_ALLOC_DEBUG);
374 if (!tag)
375 return XGL_ERROR_OUT_OF_MEMORY;
376
377 memcpy(tag, pTag, tagSize);
378
379 if (dbg->tag)
380 icd_free(dbg->tag);
381
382 dbg->tag = tag;
383 dbg->tag_size = tagSize;
384
385 return XGL_SUCCESS;
386}