blob: cad209e8fa41260ff78cc69f27a25698bd4e9ad7 [file] [log] [blame]
Tobin Ehlis8726b9f2014-10-24 12:01:45 -06001/* THIS FILE IS GENERATED. DO NOT EDIT. */
2
3/*
4 * XGL
5 *
6 * Copyright (C) 2014 LunarG, Inc.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
25 */
26
27#include <stdio.h>
28#include <stdlib.h>
29#include <string.h>
30#include <assert.h>
31#include <pthread.h>
32#include "xglLayer.h"
33//#include "xgl_struct_wrappers.h"
34
35static XGL_LAYER_DISPATCH_TABLE nextTable;
36static XGL_BASE_LAYER_OBJECT *pCurObj;
37static pthread_once_t tabOnce = PTHREAD_ONCE_INIT;
38
39// Block of code at start here for managing/tracking Pipeline state that this layer cares about
40// Just track 2 shaders for now
41#define VS 0
42#define FS 1
43#define MAX_SLOTS 2048
44typedef struct _SHADER_DS_MAPPING {
45 XGL_UINT slotCount;
46 XGL_DESCRIPTOR_SLOT_INFO* pShaderMappingSlot;
47} SHADER_DS_MAPPING;
48
49typedef struct _PIPELINE_NODE {
50 XGL_PIPELINE pipeline;
51 struct _PIPELINE_NODE* pNext;
52 SHADER_DS_MAPPING dsMapping[2][XGL_MAX_DESCRIPTOR_SETS];
53} PIPELINE_NODE;
54
55typedef struct _PIPELINE_LL_HEADER {
56 XGL_STRUCTURE_TYPE sType;
57 const XGL_VOID* pNext;
58} PIPELINE_LL_HEADER;
59
60static PIPELINE_NODE *pPipelineHead = NULL;
61static XGL_PIPELINE lastBoundPipeline = NULL;
62
63static PIPELINE_NODE *getPipeline(XGL_PIPELINE pipeline)
64{
65 PIPELINE_NODE *pTrav = pPipelineHead;
66 while (pTrav) {
67 if (pTrav->pipeline == pipeline)
68 return pTrav;
69 pTrav = pTrav->pNext;
70 }
71 return NULL;
72}
73
74// Init the pipeline mapping info based on pipeline create info LL tree
75static void initPipeline(PIPELINE_NODE *pPipeline, const XGL_GRAPHICS_PIPELINE_CREATE_INFO* pCreateInfo)
76{
77 PIPELINE_LL_HEADER *pTrav = (PIPELINE_LL_HEADER*)pCreateInfo->pNext;
78 while (pTrav) {
79 if (XGL_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO == pTrav->sType) {
80 XGL_PIPELINE_SHADER_STAGE_CREATE_INFO* pSSCI = (XGL_PIPELINE_SHADER_STAGE_CREATE_INFO*)pTrav;
81 if (XGL_SHADER_STAGE_VERTEX == pSSCI->shader.stage) {
82 for (uint32_t i = 0; i < XGL_MAX_DESCRIPTOR_SETS; i++) {
83 if (pSSCI->shader.descriptorSetMapping[i].descriptorCount > MAX_SLOTS) {
84 printf("DS ERROR: descriptorCount for Vertex Shader exceeds 2048 (%u), is this correct? Changing to 0\n", pSSCI->shader.descriptorSetMapping[i].descriptorCount);
85 pSSCI->shader.descriptorSetMapping[i].descriptorCount = 0;
86 }
87 pPipeline->dsMapping[0][i].slotCount = pSSCI->shader.descriptorSetMapping[i].descriptorCount;
88 // Deep copy DS Slot array
89 pPipeline->dsMapping[0][i].pShaderMappingSlot = (XGL_DESCRIPTOR_SLOT_INFO*)malloc(sizeof(XGL_DESCRIPTOR_SLOT_INFO)*pPipeline->dsMapping[0][i].slotCount);
90 memcpy(&pPipeline->dsMapping[0][i].pShaderMappingSlot, &pSSCI->shader.descriptorSetMapping[i].pDescriptorInfo, sizeof(XGL_DESCRIPTOR_SLOT_INFO)*pPipeline->dsMapping[0][i].slotCount);
91 }
92 }
93 else if (XGL_SHADER_STAGE_FRAGMENT == pSSCI->shader.stage) {
94 for (uint32_t i = 0; i < XGL_MAX_DESCRIPTOR_SETS; i++) {
95 if (pSSCI->shader.descriptorSetMapping[i].descriptorCount > MAX_SLOTS) {
96 printf("DS ERROR: descriptorCount for Frag Shader exceeds 2048 (%u), is this correct? Changing to 0\n", pSSCI->shader.descriptorSetMapping[i].descriptorCount);
97 pSSCI->shader.descriptorSetMapping[i].descriptorCount = 0;
98 }
99 pPipeline->dsMapping[1][i].slotCount = pSSCI->shader.descriptorSetMapping[i].descriptorCount;
100 // Deep copy DS Slot array
101 pPipeline->dsMapping[1][i].pShaderMappingSlot = (XGL_DESCRIPTOR_SLOT_INFO*)malloc(sizeof(XGL_DESCRIPTOR_SLOT_INFO)*pPipeline->dsMapping[1][i].slotCount);
102 memcpy(&pPipeline->dsMapping[1][i].pShaderMappingSlot, &pSSCI->shader.descriptorSetMapping[i].pDescriptorInfo, sizeof(XGL_DESCRIPTOR_SLOT_INFO)*pPipeline->dsMapping[1][i].slotCount);
103 }
104 }
105 }
106 pTrav = pTrav->pNext;
107 }
108}
109
110// Block of code at start here specifically for managing/tracking DSs
111#define MAPPING_MEMORY 0x00000001
112#define MAPPING_IMAGE 0x00000002
113#define MAPPING_SAMPLER 0x00000004
114#define MAPPING_DS 0x00000008
115
116typedef struct _DS_SLOT {
117 XGL_UINT slot;
118 XGL_DESCRIPTOR_SLOT_INFO shaderSlotInfo[2];
119 // Only 1 of 4 possible slot mappings active
120 XGL_UINT activeMapping;
121 XGL_UINT mappingMask; // store record of different mappings used
122 XGL_MEMORY_VIEW_ATTACH_INFO memView;
123 XGL_IMAGE_VIEW_ATTACH_INFO imageView;
124 XGL_SAMPLER sampler;
125} DS_SLOT;
126
127// Top-level node that points to start of DS
128typedef struct _DS_LL_HEAD {
129 XGL_DESCRIPTOR_SET dsID;
130 XGL_UINT numSlots;
131 struct _DS_LL_HEAD *pNextDS;
132 DS_SLOT *dsSlot; // Dynamically allocated array of DS_SLOTs
133 XGL_BOOL updateActive; // Track if DS is in an update block
134} DS_LL_HEAD;
135
136// ptr to HEAD of LL of DSs
137static DS_LL_HEAD *pDSHead = NULL;
138// Last DS that was bound
139static XGL_DESCRIPTOR_SET lastBoundDS[XGL_MAX_DESCRIPTOR_SETS] = {NULL, NULL};
140
141// Return DS Head ptr for specified ds or else NULL
142static DS_LL_HEAD* getDS(XGL_DESCRIPTOR_SET ds)
143{
144 DS_LL_HEAD *pTrav = pDSHead;
145 while (pTrav) {
146 if (pTrav->dsID == ds)
147 return pTrav;
148 pTrav = pTrav->pNextDS;
149 }
150 return NULL;
151}
152
153// Initialize a DS where all slots are UNUSED for all shaders
154static void initDS(DS_LL_HEAD *pDS)
155{
156 for (uint32_t i = 0; i < pDS->numSlots; i++) {
157 memset((void*)&pDS->dsSlot[i], 0, sizeof(DS_SLOT));
158 pDS->dsSlot[i].slot = i;
159 }
160}
161
162// Return XGL_TRUE if DS Exists and is within an xglBeginDescriptorSetUpdate() call sequence, otherwise XGL_FALSE
163static XGL_BOOL dsUpdate(XGL_DESCRIPTOR_SET ds)
164{
165 DS_LL_HEAD *pTrav = getDS(ds);
166 if (pTrav)
167 return pTrav->updateActive;
168 return XGL_FALSE;
169}
170
171// Clear specified slotCount DS Slots starting at startSlot
172// Return XGL_TRUE if DS is within a xglBeginDescriptorSetUpdate() call sequence, otherwise XGL_FALSE
173static XGL_BOOL clearDS(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount)
174{
175 DS_LL_HEAD *pTrav = getDS(descriptorSet);
176 if (!pTrav || ((startSlot + slotCount) > pTrav->numSlots)) {
177 // TODO : Log more meaningful error here
178 return XGL_FALSE;
179 }
180 for (uint32_t i = startSlot; i < slotCount; i++) {
181 memset((void*)&pTrav->dsSlot[i], 0, sizeof(DS_SLOT));
182 }
183 return XGL_TRUE;
184}
185
186static void dsSetMapping(DS_SLOT* pSlot, XGL_UINT mapping)
187{
188 pSlot->mappingMask |= mapping;
189 pSlot->activeMapping &= mapping;
190}
191
192static void noteSlotMapping(XGL_UINT32 mapping)
193{
194 if (MAPPING_MEMORY & mapping)
195 printf("\tMemory View previously mapped\n");
196 if (MAPPING_IMAGE & mapping)
197 printf("\tImage View previously mapped\n");
198 if (MAPPING_SAMPLER & mapping)
199 printf("\tSampler previously mapped\n");
200 if (MAPPING_DS & mapping)
201 printf("\tDESCRIPTOR SET ptr previously mapped\n");
202}
203
204static void dsSetMemMapping(DS_SLOT* pSlot, const XGL_MEMORY_VIEW_ATTACH_INFO* pMemView)
205{
206 if (pSlot->mappingMask) {
207 printf("DS INFO : While mapping Memory View to slot %u previous Mapping(s) identified:\n", pSlot->slot);
208 noteSlotMapping(pSlot->mappingMask);
209 }
210 memcpy(&pSlot->memView, pMemView, sizeof(XGL_MEMORY_VIEW_ATTACH_INFO));
211 dsSetMapping(pSlot, MAPPING_MEMORY);
212}
213
214static XGL_BOOL dsMemMapping(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_MEMORY_VIEW_ATTACH_INFO* pMemViews)
215{
216 DS_LL_HEAD *pTrav = getDS(descriptorSet);
217 if (pTrav) {
218 if (pTrav->numSlots < (startSlot + slotCount)) {
219 return XGL_FALSE;
220 }
221 for (uint32_t i = 0; i < slotCount; i++) {
222 dsSetMemMapping(&pTrav->dsSlot[i+startSlot], &pMemViews[i]);
223 }
224 }
225 return XGL_FALSE;
226}
227
228static void dsSetImageMapping(DS_SLOT* pSlot, const XGL_IMAGE_VIEW_ATTACH_INFO* pImageViews)
229{
230 if (pSlot->mappingMask) {
231 printf("DS INFO : While mapping Image View to slot %u previous Mapping(s) identified:\n", pSlot->slot);
232 noteSlotMapping(pSlot->mappingMask);
233 }
234 memcpy(&pSlot->imageView, pImageViews, sizeof(XGL_IMAGE_VIEW_ATTACH_INFO));
235 dsSetMapping(pSlot, MAPPING_IMAGE);
236}
237
238static XGL_BOOL dsImageMapping(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_IMAGE_VIEW_ATTACH_INFO* pImageViews)
239{
240 DS_LL_HEAD *pTrav = getDS(descriptorSet);
241 if (pTrav) {
242 if (pTrav->numSlots < (startSlot + slotCount)) {
243 return XGL_FALSE;
244 }
245 for (uint32_t i = 0; i < slotCount; i++) {
246 dsSetImageMapping(&pTrav->dsSlot[i+startSlot], &pImageViews[i]);
247 }
248 }
249 return XGL_FALSE;
250}
251
252static void dsSetSamplerMapping(DS_SLOT* pSlot, const XGL_SAMPLER sampler)
253{
254 if (pSlot->mappingMask) {
255 printf("DS INFO : While mapping Sampler to slot %u previous Mapping(s) identified:\n", pSlot->slot);
256 noteSlotMapping(pSlot->mappingMask);
257 }
258 pSlot->sampler = sampler;
259 dsSetMapping(pSlot, MAPPING_SAMPLER);
260}
261
262static XGL_BOOL dsSamplerMapping(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_SAMPLER* pSamplers)
263{
264 DS_LL_HEAD *pTrav = getDS(descriptorSet);
265 if (pTrav) {
266 if (pTrav->numSlots < (startSlot + slotCount)) {
267 return XGL_FALSE;
268 }
269 for (uint32_t i = 0; i < slotCount; i++) {
270 dsSetImageMapping(&pTrav->dsSlot[i+startSlot], pSamplers[i]);
271 }
272 }
273 return XGL_FALSE;
274}
275
276// Synch up currently bound pipeline settings with DS mappings
277static void synchDSMapping()
278{
279 // First verify that we have a bound pipeline
280 PIPELINE_NODE *pPipeTrav = getPipeline(lastBoundPipeline);
281 if (!pPipeTrav) {
282 printf("DS ERROR : Can't find last bound Pipeline %p!\n", (void*)lastBoundPipeline);
283 }
284 else {
285 for (uint32_t i = 0; i < XGL_MAX_DESCRIPTOR_SETS; i++) {
286 DS_LL_HEAD *pDS = getDS(lastBoundDS[i]);
287 if (!pDS) {
288 printf("DS ERROR : Can't find last bound DS %p. Did you need to bind DS to index %u?\n", (void*)lastBoundDS[i], i);
289 }
290 else { // We have a good DS & Pipeline, store pipeline mappings in DS
291 for (uint32_t j = 0; j < 2; j++) { // j is shader selector
292 for (uint32_t k = 0; k < XGL_MAX_DESCRIPTOR_SETS; k++) {
293 if (pPipeTrav->dsMapping[j][k].slotCount > pDS->numSlots) {
294 printf("DS ERROR : DS Mapping for shader %u has more slots (%u) than DS %p (%u)!\n", j, pPipeTrav->dsMapping[j][k].slotCount, (void*)pDS->dsID, pDS->numSlots);
295 }
296 else {
297 for (uint32_t r = 0; r < pPipeTrav->dsMapping[j][k].slotCount; r++) {
298 pDS->dsSlot[r].shaderSlotInfo[j] = pPipeTrav->dsMapping[j][k].pShaderMappingSlot[j];
299 }
300 }
301 }
302 }
303 }
304 }
305 }
306}
307
308// Print details of DS config to stdout
309static void printDSConfig()
310{
311 for (uint32_t i = 0; i < XGL_MAX_DESCRIPTOR_SETS; i++) {
312 DS_LL_HEAD *pDS = getDS(lastBoundDS[i]);
313 if (pDS) {
314 printf("DS INFO : Bindings for DS %p:\n", (void*)pDS->dsID);
315 for (uint32_t j = 0; j < pDS->numSlots; j++) {
316 printf("\tSlot %u\n", j);
317 switch (pDS->dsSlot[j].activeMapping)
318 {
319 case MAPPING_MEMORY:
320 printf("\tMapped to Memory View %p (CAN PRINT DETAILS HERE)\n", (void*)&pDS->dsSlot[j].memView);
321 break;
322 case MAPPING_IMAGE:
323 printf("\tMapped to Image View %p (CAN PRINT DETAILS HERE)\n", (void*)&pDS->dsSlot[j].imageView);
324 break;
325 case MAPPING_SAMPLER:
326 printf("\tMapped to Sampler View %p (CAN PRINT DETAILS HERE)\n", (void*)pDS->dsSlot[j].sampler);
327 break;
328 default:
329 printf("\tNO VIEW MAPPED TO THIS DS SLOT\n");
330 break;
331 }
332 for (uint32_t k = 0; k < 2; k++) {
333 if (XGL_SLOT_UNUSED != pDS->dsSlot[j].shaderSlotInfo[k].slotObjectType) {
334 printf("\tShader type %u has %u slot type mapping to shaderEntityIndex %u\n", k, pDS->dsSlot[j].shaderSlotInfo[k].slotObjectType, pDS->dsSlot[j].shaderSlotInfo[k].shaderEntityIndex);
335 }
336 }
337 }
338 }
339 else {
340 printf("DS ERROR : Can't find last bound DS %p!\n", (void*)lastBoundDS[i]);
341 }
342 }
343}
344
345static void synchAndPrintDSConfig()
346{
347 synchDSMapping();
348 printDSConfig();
349}
350
351static void initLayerTable()
352{
353 GetProcAddrType fpNextGPA;
354 fpNextGPA = pCurObj->pGPA;
355 assert(fpNextGPA);
356
357 GetProcAddrType fpGetProcAddr = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetProcAddr");
358 nextTable.GetProcAddr = fpGetProcAddr;
359 InitAndEnumerateGpusType fpInitAndEnumerateGpus = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglInitAndEnumerateGpus");
360 nextTable.InitAndEnumerateGpus = fpInitAndEnumerateGpus;
361 GetGpuInfoType fpGetGpuInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetGpuInfo");
362 nextTable.GetGpuInfo = fpGetGpuInfo;
363 CreateDeviceType fpCreateDevice = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDevice");
364 nextTable.CreateDevice = fpCreateDevice;
365 DestroyDeviceType fpDestroyDevice = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDestroyDevice");
366 nextTable.DestroyDevice = fpDestroyDevice;
367 GetExtensionSupportType fpGetExtensionSupport = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetExtensionSupport");
368 nextTable.GetExtensionSupport = fpGetExtensionSupport;
369 EnumerateLayersType fpEnumerateLayers = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglEnumerateLayers");
370 nextTable.EnumerateLayers = fpEnumerateLayers;
371 GetDeviceQueueType fpGetDeviceQueue = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetDeviceQueue");
372 nextTable.GetDeviceQueue = fpGetDeviceQueue;
373 QueueSubmitType fpQueueSubmit = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglQueueSubmit");
374 nextTable.QueueSubmit = fpQueueSubmit;
375 QueueSetGlobalMemReferencesType fpQueueSetGlobalMemReferences = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglQueueSetGlobalMemReferences");
376 nextTable.QueueSetGlobalMemReferences = fpQueueSetGlobalMemReferences;
377 QueueWaitIdleType fpQueueWaitIdle = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglQueueWaitIdle");
378 nextTable.QueueWaitIdle = fpQueueWaitIdle;
379 DeviceWaitIdleType fpDeviceWaitIdle = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDeviceWaitIdle");
380 nextTable.DeviceWaitIdle = fpDeviceWaitIdle;
381 GetMemoryHeapCountType fpGetMemoryHeapCount = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetMemoryHeapCount");
382 nextTable.GetMemoryHeapCount = fpGetMemoryHeapCount;
383 GetMemoryHeapInfoType fpGetMemoryHeapInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetMemoryHeapInfo");
384 nextTable.GetMemoryHeapInfo = fpGetMemoryHeapInfo;
385 AllocMemoryType fpAllocMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAllocMemory");
386 nextTable.AllocMemory = fpAllocMemory;
387 FreeMemoryType fpFreeMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglFreeMemory");
388 nextTable.FreeMemory = fpFreeMemory;
389 SetMemoryPriorityType fpSetMemoryPriority = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglSetMemoryPriority");
390 nextTable.SetMemoryPriority = fpSetMemoryPriority;
391 MapMemoryType fpMapMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglMapMemory");
392 nextTable.MapMemory = fpMapMemory;
393 UnmapMemoryType fpUnmapMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglUnmapMemory");
394 nextTable.UnmapMemory = fpUnmapMemory;
395 PinSystemMemoryType fpPinSystemMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglPinSystemMemory");
396 nextTable.PinSystemMemory = fpPinSystemMemory;
397 RemapVirtualMemoryPagesType fpRemapVirtualMemoryPages = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglRemapVirtualMemoryPages");
398 nextTable.RemapVirtualMemoryPages = fpRemapVirtualMemoryPages;
399 GetMultiGpuCompatibilityType fpGetMultiGpuCompatibility = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetMultiGpuCompatibility");
400 nextTable.GetMultiGpuCompatibility = fpGetMultiGpuCompatibility;
401 OpenSharedMemoryType fpOpenSharedMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenSharedMemory");
402 nextTable.OpenSharedMemory = fpOpenSharedMemory;
403 OpenSharedQueueSemaphoreType fpOpenSharedQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenSharedQueueSemaphore");
404 nextTable.OpenSharedQueueSemaphore = fpOpenSharedQueueSemaphore;
405 OpenPeerMemoryType fpOpenPeerMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenPeerMemory");
406 nextTable.OpenPeerMemory = fpOpenPeerMemory;
407 OpenPeerImageType fpOpenPeerImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenPeerImage");
408 nextTable.OpenPeerImage = fpOpenPeerImage;
409 DestroyObjectType fpDestroyObject = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDestroyObject");
410 nextTable.DestroyObject = fpDestroyObject;
411 GetObjectInfoType fpGetObjectInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetObjectInfo");
412 nextTable.GetObjectInfo = fpGetObjectInfo;
413 BindObjectMemoryType fpBindObjectMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglBindObjectMemory");
414 nextTable.BindObjectMemory = fpBindObjectMemory;
415 CreateFenceType fpCreateFence = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateFence");
416 nextTable.CreateFence = fpCreateFence;
417 GetFenceStatusType fpGetFenceStatus = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetFenceStatus");
418 nextTable.GetFenceStatus = fpGetFenceStatus;
419 WaitForFencesType fpWaitForFences = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWaitForFences");
420 nextTable.WaitForFences = fpWaitForFences;
421 CreateQueueSemaphoreType fpCreateQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateQueueSemaphore");
422 nextTable.CreateQueueSemaphore = fpCreateQueueSemaphore;
423 SignalQueueSemaphoreType fpSignalQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglSignalQueueSemaphore");
424 nextTable.SignalQueueSemaphore = fpSignalQueueSemaphore;
425 WaitQueueSemaphoreType fpWaitQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWaitQueueSemaphore");
426 nextTable.WaitQueueSemaphore = fpWaitQueueSemaphore;
427 CreateEventType fpCreateEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateEvent");
428 nextTable.CreateEvent = fpCreateEvent;
429 GetEventStatusType fpGetEventStatus = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetEventStatus");
430 nextTable.GetEventStatus = fpGetEventStatus;
431 SetEventType fpSetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglSetEvent");
432 nextTable.SetEvent = fpSetEvent;
433 ResetEventType fpResetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglResetEvent");
434 nextTable.ResetEvent = fpResetEvent;
435 CreateQueryPoolType fpCreateQueryPool = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateQueryPool");
436 nextTable.CreateQueryPool = fpCreateQueryPool;
437 GetQueryPoolResultsType fpGetQueryPoolResults = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetQueryPoolResults");
438 nextTable.GetQueryPoolResults = fpGetQueryPoolResults;
439 GetFormatInfoType fpGetFormatInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetFormatInfo");
440 nextTable.GetFormatInfo = fpGetFormatInfo;
441 CreateImageType fpCreateImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateImage");
442 nextTable.CreateImage = fpCreateImage;
443 GetImageSubresourceInfoType fpGetImageSubresourceInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetImageSubresourceInfo");
444 nextTable.GetImageSubresourceInfo = fpGetImageSubresourceInfo;
445 CreateImageViewType fpCreateImageView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateImageView");
446 nextTable.CreateImageView = fpCreateImageView;
447 CreateColorAttachmentViewType fpCreateColorAttachmentView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateColorAttachmentView");
448 nextTable.CreateColorAttachmentView = fpCreateColorAttachmentView;
449 CreateDepthStencilViewType fpCreateDepthStencilView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDepthStencilView");
450 nextTable.CreateDepthStencilView = fpCreateDepthStencilView;
451 CreateShaderType fpCreateShader = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateShader");
452 nextTable.CreateShader = fpCreateShader;
453 CreateGraphicsPipelineType fpCreateGraphicsPipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateGraphicsPipeline");
454 nextTable.CreateGraphicsPipeline = fpCreateGraphicsPipeline;
455 CreateComputePipelineType fpCreateComputePipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateComputePipeline");
456 nextTable.CreateComputePipeline = fpCreateComputePipeline;
457 StorePipelineType fpStorePipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglStorePipeline");
458 nextTable.StorePipeline = fpStorePipeline;
459 LoadPipelineType fpLoadPipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglLoadPipeline");
460 nextTable.LoadPipeline = fpLoadPipeline;
461 CreatePipelineDeltaType fpCreatePipelineDelta = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreatePipelineDelta");
462 nextTable.CreatePipelineDelta = fpCreatePipelineDelta;
463 CreateSamplerType fpCreateSampler = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateSampler");
464 nextTable.CreateSampler = fpCreateSampler;
465 CreateDescriptorSetType fpCreateDescriptorSet = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDescriptorSet");
466 nextTable.CreateDescriptorSet = fpCreateDescriptorSet;
467 BeginDescriptorSetUpdateType fpBeginDescriptorSetUpdate = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglBeginDescriptorSetUpdate");
468 nextTable.BeginDescriptorSetUpdate = fpBeginDescriptorSetUpdate;
469 EndDescriptorSetUpdateType fpEndDescriptorSetUpdate = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglEndDescriptorSetUpdate");
470 nextTable.EndDescriptorSetUpdate = fpEndDescriptorSetUpdate;
471 AttachSamplerDescriptorsType fpAttachSamplerDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachSamplerDescriptors");
472 nextTable.AttachSamplerDescriptors = fpAttachSamplerDescriptors;
473 AttachImageViewDescriptorsType fpAttachImageViewDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachImageViewDescriptors");
474 nextTable.AttachImageViewDescriptors = fpAttachImageViewDescriptors;
475 AttachMemoryViewDescriptorsType fpAttachMemoryViewDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachMemoryViewDescriptors");
476 nextTable.AttachMemoryViewDescriptors = fpAttachMemoryViewDescriptors;
477 AttachNestedDescriptorsType fpAttachNestedDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachNestedDescriptors");
478 nextTable.AttachNestedDescriptors = fpAttachNestedDescriptors;
479 ClearDescriptorSetSlotsType fpClearDescriptorSetSlots = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglClearDescriptorSetSlots");
480 nextTable.ClearDescriptorSetSlots = fpClearDescriptorSetSlots;
481 CreateViewportStateType fpCreateViewportState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateViewportState");
482 nextTable.CreateViewportState = fpCreateViewportState;
483 CreateRasterStateType fpCreateRasterState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateRasterState");
484 nextTable.CreateRasterState = fpCreateRasterState;
485 CreateMsaaStateType fpCreateMsaaState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateMsaaState");
486 nextTable.CreateMsaaState = fpCreateMsaaState;
487 CreateColorBlendStateType fpCreateColorBlendState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateColorBlendState");
488 nextTable.CreateColorBlendState = fpCreateColorBlendState;
489 CreateDepthStencilStateType fpCreateDepthStencilState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDepthStencilState");
490 nextTable.CreateDepthStencilState = fpCreateDepthStencilState;
491 CreateCommandBufferType fpCreateCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateCommandBuffer");
492 nextTable.CreateCommandBuffer = fpCreateCommandBuffer;
493 BeginCommandBufferType fpBeginCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglBeginCommandBuffer");
494 nextTable.BeginCommandBuffer = fpBeginCommandBuffer;
495 EndCommandBufferType fpEndCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglEndCommandBuffer");
496 nextTable.EndCommandBuffer = fpEndCommandBuffer;
497 ResetCommandBufferType fpResetCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglResetCommandBuffer");
498 nextTable.ResetCommandBuffer = fpResetCommandBuffer;
499 CmdBindPipelineType fpCmdBindPipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindPipeline");
500 nextTable.CmdBindPipeline = fpCmdBindPipeline;
501 CmdBindPipelineDeltaType fpCmdBindPipelineDelta = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindPipelineDelta");
502 nextTable.CmdBindPipelineDelta = fpCmdBindPipelineDelta;
503 CmdBindStateObjectType fpCmdBindStateObject = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindStateObject");
504 nextTable.CmdBindStateObject = fpCmdBindStateObject;
505 CmdBindDescriptorSetType fpCmdBindDescriptorSet = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindDescriptorSet");
506 nextTable.CmdBindDescriptorSet = fpCmdBindDescriptorSet;
507 CmdBindDynamicMemoryViewType fpCmdBindDynamicMemoryView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindDynamicMemoryView");
508 nextTable.CmdBindDynamicMemoryView = fpCmdBindDynamicMemoryView;
509 CmdBindIndexDataType fpCmdBindIndexData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindIndexData");
510 nextTable.CmdBindIndexData = fpCmdBindIndexData;
511 CmdBindAttachmentsType fpCmdBindAttachments = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindAttachments");
512 nextTable.CmdBindAttachments = fpCmdBindAttachments;
513 CmdPrepareMemoryRegionsType fpCmdPrepareMemoryRegions = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdPrepareMemoryRegions");
514 nextTable.CmdPrepareMemoryRegions = fpCmdPrepareMemoryRegions;
515 CmdPrepareImagesType fpCmdPrepareImages = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdPrepareImages");
516 nextTable.CmdPrepareImages = fpCmdPrepareImages;
517 CmdDrawType fpCmdDraw = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDraw");
518 nextTable.CmdDraw = fpCmdDraw;
519 CmdDrawIndexedType fpCmdDrawIndexed = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDrawIndexed");
520 nextTable.CmdDrawIndexed = fpCmdDrawIndexed;
521 CmdDrawIndirectType fpCmdDrawIndirect = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDrawIndirect");
522 nextTable.CmdDrawIndirect = fpCmdDrawIndirect;
523 CmdDrawIndexedIndirectType fpCmdDrawIndexedIndirect = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDrawIndexedIndirect");
524 nextTable.CmdDrawIndexedIndirect = fpCmdDrawIndexedIndirect;
525 CmdDispatchType fpCmdDispatch = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDispatch");
526 nextTable.CmdDispatch = fpCmdDispatch;
527 CmdDispatchIndirectType fpCmdDispatchIndirect = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDispatchIndirect");
528 nextTable.CmdDispatchIndirect = fpCmdDispatchIndirect;
529 CmdCopyMemoryType fpCmdCopyMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyMemory");
530 nextTable.CmdCopyMemory = fpCmdCopyMemory;
531 CmdCopyImageType fpCmdCopyImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyImage");
532 nextTable.CmdCopyImage = fpCmdCopyImage;
533 CmdCopyMemoryToImageType fpCmdCopyMemoryToImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyMemoryToImage");
534 nextTable.CmdCopyMemoryToImage = fpCmdCopyMemoryToImage;
535 CmdCopyImageToMemoryType fpCmdCopyImageToMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyImageToMemory");
536 nextTable.CmdCopyImageToMemory = fpCmdCopyImageToMemory;
537 CmdCloneImageDataType fpCmdCloneImageData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCloneImageData");
538 nextTable.CmdCloneImageData = fpCmdCloneImageData;
539 CmdUpdateMemoryType fpCmdUpdateMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdUpdateMemory");
540 nextTable.CmdUpdateMemory = fpCmdUpdateMemory;
541 CmdFillMemoryType fpCmdFillMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdFillMemory");
542 nextTable.CmdFillMemory = fpCmdFillMemory;
543 CmdClearColorImageType fpCmdClearColorImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdClearColorImage");
544 nextTable.CmdClearColorImage = fpCmdClearColorImage;
545 CmdClearColorImageRawType fpCmdClearColorImageRaw = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdClearColorImageRaw");
546 nextTable.CmdClearColorImageRaw = fpCmdClearColorImageRaw;
547 CmdClearDepthStencilType fpCmdClearDepthStencil = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdClearDepthStencil");
548 nextTable.CmdClearDepthStencil = fpCmdClearDepthStencil;
549 CmdResolveImageType fpCmdResolveImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdResolveImage");
550 nextTable.CmdResolveImage = fpCmdResolveImage;
551 CmdSetEventType fpCmdSetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdSetEvent");
552 nextTable.CmdSetEvent = fpCmdSetEvent;
553 CmdResetEventType fpCmdResetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdResetEvent");
554 nextTable.CmdResetEvent = fpCmdResetEvent;
555 CmdMemoryAtomicType fpCmdMemoryAtomic = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdMemoryAtomic");
556 nextTable.CmdMemoryAtomic = fpCmdMemoryAtomic;
557 CmdBeginQueryType fpCmdBeginQuery = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBeginQuery");
558 nextTable.CmdBeginQuery = fpCmdBeginQuery;
559 CmdEndQueryType fpCmdEndQuery = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdEndQuery");
560 nextTable.CmdEndQuery = fpCmdEndQuery;
561 CmdResetQueryPoolType fpCmdResetQueryPool = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdResetQueryPool");
562 nextTable.CmdResetQueryPool = fpCmdResetQueryPool;
563 CmdWriteTimestampType fpCmdWriteTimestamp = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdWriteTimestamp");
564 nextTable.CmdWriteTimestamp = fpCmdWriteTimestamp;
565 CmdInitAtomicCountersType fpCmdInitAtomicCounters = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdInitAtomicCounters");
566 nextTable.CmdInitAtomicCounters = fpCmdInitAtomicCounters;
567 CmdLoadAtomicCountersType fpCmdLoadAtomicCounters = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdLoadAtomicCounters");
568 nextTable.CmdLoadAtomicCounters = fpCmdLoadAtomicCounters;
569 CmdSaveAtomicCountersType fpCmdSaveAtomicCounters = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdSaveAtomicCounters");
570 nextTable.CmdSaveAtomicCounters = fpCmdSaveAtomicCounters;
571 DbgSetValidationLevelType fpDbgSetValidationLevel = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetValidationLevel");
572 nextTable.DbgSetValidationLevel = fpDbgSetValidationLevel;
573 DbgRegisterMsgCallbackType fpDbgRegisterMsgCallback = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgRegisterMsgCallback");
574 nextTable.DbgRegisterMsgCallback = fpDbgRegisterMsgCallback;
575 DbgUnregisterMsgCallbackType fpDbgUnregisterMsgCallback = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgUnregisterMsgCallback");
576 nextTable.DbgUnregisterMsgCallback = fpDbgUnregisterMsgCallback;
577 DbgSetMessageFilterType fpDbgSetMessageFilter = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetMessageFilter");
578 nextTable.DbgSetMessageFilter = fpDbgSetMessageFilter;
579 DbgSetObjectTagType fpDbgSetObjectTag = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetObjectTag");
580 nextTable.DbgSetObjectTag = fpDbgSetObjectTag;
581 DbgSetGlobalOptionType fpDbgSetGlobalOption = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetGlobalOption");
582 nextTable.DbgSetGlobalOption = fpDbgSetGlobalOption;
583 DbgSetDeviceOptionType fpDbgSetDeviceOption = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetDeviceOption");
584 nextTable.DbgSetDeviceOption = fpDbgSetDeviceOption;
585 CmdDbgMarkerBeginType fpCmdDbgMarkerBegin = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDbgMarkerBegin");
586 nextTable.CmdDbgMarkerBegin = fpCmdDbgMarkerBegin;
587 CmdDbgMarkerEndType fpCmdDbgMarkerEnd = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDbgMarkerEnd");
588 nextTable.CmdDbgMarkerEnd = fpCmdDbgMarkerEnd;
589 WsiX11AssociateConnectionType fpWsiX11AssociateConnection = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11AssociateConnection");
590 nextTable.WsiX11AssociateConnection = fpWsiX11AssociateConnection;
591 WsiX11GetMSCType fpWsiX11GetMSC = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11GetMSC");
592 nextTable.WsiX11GetMSC = fpWsiX11GetMSC;
593 WsiX11CreatePresentableImageType fpWsiX11CreatePresentableImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11CreatePresentableImage");
594 nextTable.WsiX11CreatePresentableImage = fpWsiX11CreatePresentableImage;
595 WsiX11QueuePresentType fpWsiX11QueuePresent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11QueuePresent");
596 nextTable.WsiX11QueuePresent = fpWsiX11QueuePresent;
597}
598
599
600XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetGpuInfo(XGL_PHYSICAL_GPU gpu, XGL_PHYSICAL_GPU_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
601{
602 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
603 printf("At start of layered GetGpuInfo\n");
604 pCurObj = gpuw;
605 pthread_once(&tabOnce, initLayerTable);
606 XGL_RESULT result = nextTable.GetGpuInfo((XGL_PHYSICAL_GPU)gpuw->nextObject, infoType, pDataSize, pData);
607 printf("Completed layered GetGpuInfo\n");
608 return result;
609}
610
611XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDevice(XGL_PHYSICAL_GPU gpu, const XGL_DEVICE_CREATE_INFO* pCreateInfo, XGL_DEVICE* pDevice)
612{
613 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
614 printf("At start of layered CreateDevice\n");
615 pCurObj = gpuw;
616 pthread_once(&tabOnce, initLayerTable);
617 XGL_RESULT result = nextTable.CreateDevice((XGL_PHYSICAL_GPU)gpuw->nextObject, pCreateInfo, pDevice);
618 printf("Completed layered CreateDevice\n");
619 return result;
620}
621
622XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDestroyDevice(XGL_DEVICE device)
623{
624 XGL_RESULT result = nextTable.DestroyDevice(device);
625 return result;
626}
627
628XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetExtensionSupport(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* pExtName)
629{
630 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
631 printf("At start of layered GetExtensionSupport\n");
632 pCurObj = gpuw;
633 pthread_once(&tabOnce, initLayerTable);
634 XGL_RESULT result = nextTable.GetExtensionSupport((XGL_PHYSICAL_GPU)gpuw->nextObject, pExtName);
635 printf("Completed layered GetExtensionSupport\n");
636 return result;
637}
638
639XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglEnumerateLayers(XGL_PHYSICAL_GPU gpu, XGL_SIZE maxLayerCount, XGL_SIZE maxStringSize, XGL_CHAR* const* pOutLayers, XGL_SIZE * pOutLayerCount)
640{
641 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
642 printf("At start of layered EnumerateLayers\n");
643 pCurObj = gpuw;
644 pthread_once(&tabOnce, initLayerTable);
645 XGL_RESULT result = nextTable.EnumerateLayers((XGL_PHYSICAL_GPU)gpuw->nextObject, maxLayerCount, maxStringSize, pOutLayers, pOutLayerCount);
646 printf("Completed layered EnumerateLayers\n");
647 return result;
648}
649
650XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetDeviceQueue(XGL_DEVICE device, XGL_QUEUE_TYPE queueType, XGL_UINT queueIndex, XGL_QUEUE* pQueue)
651{
652 XGL_RESULT result = nextTable.GetDeviceQueue(device, queueType, queueIndex, pQueue);
653 return result;
654}
655
656XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglQueueSubmit(XGL_QUEUE queue, XGL_UINT cmdBufferCount, const XGL_CMD_BUFFER* pCmdBuffers, XGL_UINT memRefCount, const XGL_MEMORY_REF* pMemRefs, XGL_FENCE fence)
657{
658 XGL_RESULT result = nextTable.QueueSubmit(queue, cmdBufferCount, pCmdBuffers, memRefCount, pMemRefs, fence);
659 return result;
660}
661
662XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglQueueSetGlobalMemReferences(XGL_QUEUE queue, XGL_UINT memRefCount, const XGL_MEMORY_REF* pMemRefs)
663{
664 XGL_RESULT result = nextTable.QueueSetGlobalMemReferences(queue, memRefCount, pMemRefs);
665 return result;
666}
667
668XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglQueueWaitIdle(XGL_QUEUE queue)
669{
670 XGL_RESULT result = nextTable.QueueWaitIdle(queue);
671 return result;
672}
673
674XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDeviceWaitIdle(XGL_DEVICE device)
675{
676 XGL_RESULT result = nextTable.DeviceWaitIdle(device);
677 return result;
678}
679
680XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetMemoryHeapCount(XGL_DEVICE device, XGL_UINT* pCount)
681{
682 XGL_RESULT result = nextTable.GetMemoryHeapCount(device, pCount);
683 return result;
684}
685
686XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetMemoryHeapInfo(XGL_DEVICE device, XGL_UINT heapId, XGL_MEMORY_HEAP_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
687{
688 XGL_RESULT result = nextTable.GetMemoryHeapInfo(device, heapId, infoType, pDataSize, pData);
689 return result;
690}
691
692XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglAllocMemory(XGL_DEVICE device, const XGL_MEMORY_ALLOC_INFO* pAllocInfo, XGL_GPU_MEMORY* pMem)
693{
694 XGL_RESULT result = nextTable.AllocMemory(device, pAllocInfo, pMem);
695 return result;
696}
697
698XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglFreeMemory(XGL_GPU_MEMORY mem)
699{
700 XGL_RESULT result = nextTable.FreeMemory(mem);
701 return result;
702}
703
704XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglSetMemoryPriority(XGL_GPU_MEMORY mem, XGL_MEMORY_PRIORITY priority)
705{
706 XGL_RESULT result = nextTable.SetMemoryPriority(mem, priority);
707 return result;
708}
709
710XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglMapMemory(XGL_GPU_MEMORY mem, XGL_FLAGS flags, XGL_VOID** ppData)
711{
712 XGL_RESULT result = nextTable.MapMemory(mem, flags, ppData);
713 return result;
714}
715
716XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglUnmapMemory(XGL_GPU_MEMORY mem)
717{
718 XGL_RESULT result = nextTable.UnmapMemory(mem);
719 return result;
720}
721
722XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglPinSystemMemory(XGL_DEVICE device, const XGL_VOID* pSysMem, XGL_SIZE memSize, XGL_GPU_MEMORY* pMem)
723{
724 XGL_RESULT result = nextTable.PinSystemMemory(device, pSysMem, memSize, pMem);
725 return result;
726}
727
728XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglRemapVirtualMemoryPages(XGL_DEVICE device, XGL_UINT rangeCount, const XGL_VIRTUAL_MEMORY_REMAP_RANGE* pRanges, XGL_UINT preWaitSemaphoreCount, const XGL_QUEUE_SEMAPHORE* pPreWaitSemaphores, XGL_UINT postSignalSemaphoreCount, const XGL_QUEUE_SEMAPHORE* pPostSignalSemaphores)
729{
730 XGL_RESULT result = nextTable.RemapVirtualMemoryPages(device, rangeCount, pRanges, preWaitSemaphoreCount, pPreWaitSemaphores, postSignalSemaphoreCount, pPostSignalSemaphores);
731 return result;
732}
733
734XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetMultiGpuCompatibility(XGL_PHYSICAL_GPU gpu0, XGL_PHYSICAL_GPU gpu1, XGL_GPU_COMPATIBILITY_INFO* pInfo)
735{
736 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu0;
737 printf("At start of layered GetMultiGpuCompatibility\n");
738 pCurObj = gpuw;
739 pthread_once(&tabOnce, initLayerTable);
740 XGL_RESULT result = nextTable.GetMultiGpuCompatibility((XGL_PHYSICAL_GPU)gpuw->nextObject, gpu1, pInfo);
741 printf("Completed layered GetMultiGpuCompatibility\n");
742 return result;
743}
744
745XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenSharedMemory(XGL_DEVICE device, const XGL_MEMORY_OPEN_INFO* pOpenInfo, XGL_GPU_MEMORY* pMem)
746{
747 XGL_RESULT result = nextTable.OpenSharedMemory(device, pOpenInfo, pMem);
748 return result;
749}
750
751XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenSharedQueueSemaphore(XGL_DEVICE device, const XGL_QUEUE_SEMAPHORE_OPEN_INFO* pOpenInfo, XGL_QUEUE_SEMAPHORE* pSemaphore)
752{
753 XGL_RESULT result = nextTable.OpenSharedQueueSemaphore(device, pOpenInfo, pSemaphore);
754 return result;
755}
756
757XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenPeerMemory(XGL_DEVICE device, const XGL_PEER_MEMORY_OPEN_INFO* pOpenInfo, XGL_GPU_MEMORY* pMem)
758{
759 XGL_RESULT result = nextTable.OpenPeerMemory(device, pOpenInfo, pMem);
760 return result;
761}
762
763XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenPeerImage(XGL_DEVICE device, const XGL_PEER_IMAGE_OPEN_INFO* pOpenInfo, XGL_IMAGE* pImage, XGL_GPU_MEMORY* pMem)
764{
765 XGL_RESULT result = nextTable.OpenPeerImage(device, pOpenInfo, pImage, pMem);
766 return result;
767}
768
769XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDestroyObject(XGL_OBJECT object)
770{
771 XGL_RESULT result = nextTable.DestroyObject(object);
772 return result;
773}
774
775XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetObjectInfo(XGL_BASE_OBJECT object, XGL_OBJECT_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
776{
777 XGL_RESULT result = nextTable.GetObjectInfo(object, infoType, pDataSize, pData);
778 return result;
779}
780
781XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglBindObjectMemory(XGL_OBJECT object, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset)
782{
783 XGL_RESULT result = nextTable.BindObjectMemory(object, mem, offset);
784 return result;
785}
786
787XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateFence(XGL_DEVICE device, const XGL_FENCE_CREATE_INFO* pCreateInfo, XGL_FENCE* pFence)
788{
789 XGL_RESULT result = nextTable.CreateFence(device, pCreateInfo, pFence);
790 return result;
791}
792
793XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetFenceStatus(XGL_FENCE fence)
794{
795 XGL_RESULT result = nextTable.GetFenceStatus(fence);
796 return result;
797}
798
799XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWaitForFences(XGL_DEVICE device, XGL_UINT fenceCount, const XGL_FENCE* pFences, XGL_BOOL waitAll, XGL_UINT64 timeout)
800{
801 XGL_RESULT result = nextTable.WaitForFences(device, fenceCount, pFences, waitAll, timeout);
802 return result;
803}
804
805XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateQueueSemaphore(XGL_DEVICE device, const XGL_QUEUE_SEMAPHORE_CREATE_INFO* pCreateInfo, XGL_QUEUE_SEMAPHORE* pSemaphore)
806{
807 XGL_RESULT result = nextTable.CreateQueueSemaphore(device, pCreateInfo, pSemaphore);
808 return result;
809}
810
811XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglSignalQueueSemaphore(XGL_QUEUE queue, XGL_QUEUE_SEMAPHORE semaphore)
812{
813 XGL_RESULT result = nextTable.SignalQueueSemaphore(queue, semaphore);
814 return result;
815}
816
817XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWaitQueueSemaphore(XGL_QUEUE queue, XGL_QUEUE_SEMAPHORE semaphore)
818{
819 XGL_RESULT result = nextTable.WaitQueueSemaphore(queue, semaphore);
820 return result;
821}
822
823XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateEvent(XGL_DEVICE device, const XGL_EVENT_CREATE_INFO* pCreateInfo, XGL_EVENT* pEvent)
824{
825 XGL_RESULT result = nextTable.CreateEvent(device, pCreateInfo, pEvent);
826 return result;
827}
828
829XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetEventStatus(XGL_EVENT event)
830{
831 XGL_RESULT result = nextTable.GetEventStatus(event);
832 return result;
833}
834
835XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglSetEvent(XGL_EVENT event)
836{
837 XGL_RESULT result = nextTable.SetEvent(event);
838 return result;
839}
840
841XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglResetEvent(XGL_EVENT event)
842{
843 XGL_RESULT result = nextTable.ResetEvent(event);
844 return result;
845}
846
847XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateQueryPool(XGL_DEVICE device, const XGL_QUERY_POOL_CREATE_INFO* pCreateInfo, XGL_QUERY_POOL* pQueryPool)
848{
849 XGL_RESULT result = nextTable.CreateQueryPool(device, pCreateInfo, pQueryPool);
850 return result;
851}
852
853XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetQueryPoolResults(XGL_QUERY_POOL queryPool, XGL_UINT startQuery, XGL_UINT queryCount, XGL_SIZE* pDataSize, XGL_VOID* pData)
854{
855 XGL_RESULT result = nextTable.GetQueryPoolResults(queryPool, startQuery, queryCount, pDataSize, pData);
856 return result;
857}
858
859XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetFormatInfo(XGL_DEVICE device, XGL_FORMAT format, XGL_FORMAT_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
860{
861 XGL_RESULT result = nextTable.GetFormatInfo(device, format, infoType, pDataSize, pData);
862 return result;
863}
864
865XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateImage(XGL_DEVICE device, const XGL_IMAGE_CREATE_INFO* pCreateInfo, XGL_IMAGE* pImage)
866{
867 XGL_RESULT result = nextTable.CreateImage(device, pCreateInfo, pImage);
868 return result;
869}
870
871XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetImageSubresourceInfo(XGL_IMAGE image, const XGL_IMAGE_SUBRESOURCE* pSubresource, XGL_SUBRESOURCE_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
872{
873 XGL_RESULT result = nextTable.GetImageSubresourceInfo(image, pSubresource, infoType, pDataSize, pData);
874 return result;
875}
876
877XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateImageView(XGL_DEVICE device, const XGL_IMAGE_VIEW_CREATE_INFO* pCreateInfo, XGL_IMAGE_VIEW* pView)
878{
879 XGL_RESULT result = nextTable.CreateImageView(device, pCreateInfo, pView);
880 return result;
881}
882
883XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateColorAttachmentView(XGL_DEVICE device, const XGL_COLOR_ATTACHMENT_VIEW_CREATE_INFO* pCreateInfo, XGL_COLOR_ATTACHMENT_VIEW* pView)
884{
885 XGL_RESULT result = nextTable.CreateColorAttachmentView(device, pCreateInfo, pView);
886 return result;
887}
888
889XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDepthStencilView(XGL_DEVICE device, const XGL_DEPTH_STENCIL_VIEW_CREATE_INFO* pCreateInfo, XGL_DEPTH_STENCIL_VIEW* pView)
890{
891 XGL_RESULT result = nextTable.CreateDepthStencilView(device, pCreateInfo, pView);
892 return result;
893}
894
895XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateShader(XGL_DEVICE device, const XGL_SHADER_CREATE_INFO* pCreateInfo, XGL_SHADER* pShader)
896{
897 XGL_RESULT result = nextTable.CreateShader(device, pCreateInfo, pShader);
898 return result;
899}
900
901XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateGraphicsPipeline(XGL_DEVICE device, const XGL_GRAPHICS_PIPELINE_CREATE_INFO* pCreateInfo, XGL_PIPELINE* pPipeline)
902{
903 XGL_RESULT result = nextTable.CreateGraphicsPipeline(device, pCreateInfo, pPipeline);
904 // Create LL HEAD for this Pipeline
905 printf("INFO: Created Gfx Pipelines %p\n", (void*)*pPipeline);
906 PIPELINE_NODE *pTrav = pPipelineHead;
907 if (pTrav) {
908 while (pTrav->pNext)
909 pTrav = pTrav->pNext;
910 pTrav->pNext = (PIPELINE_NODE*)malloc(sizeof(PIPELINE_NODE));
911 pTrav = pTrav->pNext;
912 }
913 else {
914 pTrav = (PIPELINE_NODE*)malloc(sizeof(PIPELINE_NODE));
915 pPipelineHead = pTrav;
916 }
917 memset((void*)pTrav, 0, sizeof(PIPELINE_NODE));
918 pTrav->pipeline = *pPipeline;
919 initPipeline(pTrav, pCreateInfo);
920 return result;
921}
922
923XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateComputePipeline(XGL_DEVICE device, const XGL_COMPUTE_PIPELINE_CREATE_INFO* pCreateInfo, XGL_PIPELINE* pPipeline)
924{
925 XGL_RESULT result = nextTable.CreateComputePipeline(device, pCreateInfo, pPipeline);
926 return result;
927}
928
929XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglStorePipeline(XGL_PIPELINE pipeline, XGL_SIZE* pDataSize, XGL_VOID* pData)
930{
931 XGL_RESULT result = nextTable.StorePipeline(pipeline, pDataSize, pData);
932 return result;
933}
934
935XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglLoadPipeline(XGL_DEVICE device, XGL_SIZE dataSize, const XGL_VOID* pData, XGL_PIPELINE* pPipeline)
936{
937 XGL_RESULT result = nextTable.LoadPipeline(device, dataSize, pData, pPipeline);
938 return result;
939}
940
941XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreatePipelineDelta(XGL_DEVICE device, XGL_PIPELINE p1, XGL_PIPELINE p2, XGL_PIPELINE_DELTA* delta)
942{
943 XGL_RESULT result = nextTable.CreatePipelineDelta(device, p1, p2, delta);
944 return result;
945}
946
947XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateSampler(XGL_DEVICE device, const XGL_SAMPLER_CREATE_INFO* pCreateInfo, XGL_SAMPLER* pSampler)
948{
949 XGL_RESULT result = nextTable.CreateSampler(device, pCreateInfo, pSampler);
950 return result;
951}
952
953XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDescriptorSet(XGL_DEVICE device, const XGL_DESCRIPTOR_SET_CREATE_INFO* pCreateInfo, XGL_DESCRIPTOR_SET* pDescriptorSet)
954{
955 XGL_RESULT result = nextTable.CreateDescriptorSet(device, pCreateInfo, pDescriptorSet);
956 // Create LL chain
957 DS_LL_HEAD *pTrav = pDSHead;
958 if (pTrav) {
959 // Grow existing list
960 while (pTrav->pNextDS)
961 pTrav = pTrav->pNextDS;
962 pTrav->pNextDS = (DS_LL_HEAD*)malloc(sizeof(DS_LL_HEAD));
963 pTrav = pTrav->pNextDS;
964 }
965 else { // Create new list
966 pTrav = (DS_LL_HEAD*)malloc(sizeof(DS_LL_HEAD));
967 pDSHead = pTrav;
968 }
969 pTrav->dsSlot = (DS_SLOT*)malloc(sizeof(DS_SLOT) * pCreateInfo->slots);
970 pTrav->dsID = *pDescriptorSet;
971 pTrav->numSlots = pCreateInfo->slots;
972 pTrav->pNextDS = NULL;
973 pTrav->updateActive = XGL_FALSE;
974 initDS(pTrav);
975 return result;
976}
977
978XGL_LAYER_EXPORT XGL_VOID XGLAPI xglBeginDescriptorSetUpdate(XGL_DESCRIPTOR_SET descriptorSet)
979{
980 if (!getDS(descriptorSet)) {
981 // TODO : This is where we should flag a REAL error
982 printf("DS ERROR : Specified Descriptor Set %p does not exist!\n", (void*)descriptorSet);
983 }
984 nextTable.BeginDescriptorSetUpdate(descriptorSet);
985}
986
987XGL_LAYER_EXPORT XGL_VOID XGLAPI xglEndDescriptorSetUpdate(XGL_DESCRIPTOR_SET descriptorSet)
988{
989 if (!dsUpdate(descriptorSet)) {
990 // TODO : This is where we should flag a REAL error
991 printf("DS ERROR : You must call xglBeginDescriptorSetUpdate(%p) before this call to xglEndDescriptorSetUpdate()!\n", (void*)descriptorSet);
992 }
993 nextTable.EndDescriptorSetUpdate(descriptorSet);
994}
995
996XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachSamplerDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_SAMPLER* pSamplers)
997{
998 if (!dsUpdate(descriptorSet)) {
999 // TODO : This is where we should flag a REAL error
1000 printf("DS ERROR : You must call xglBeginDescriptorSetUpdate(%p) before this call to xglAttachSamplerDescriptors()!\n", (void*)descriptorSet);
1001 }
1002 else {
1003 if (!dsSamplerMapping(descriptorSet, startSlot, slotCount, pSamplers))
1004 printf("DS ERROR : Unable to attach sampler descriptors to DS %p!\n", (void*)descriptorSet);
1005 }
1006 nextTable.AttachSamplerDescriptors(descriptorSet, startSlot, slotCount, pSamplers);
1007}
1008
1009XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachImageViewDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_IMAGE_VIEW_ATTACH_INFO* pImageViews)
1010{
1011 if (!dsUpdate(descriptorSet)) {
1012 // TODO : This is where we should flag a REAL error
1013 printf("DS ERROR : You must call xglBeginDescriptorSetUpdate(%p) before this call to xglAttachSamplerDescriptors()!\n", (void*)descriptorSet);
1014 }
1015 else {
1016 if (!dsImageMapping(descriptorSet, startSlot, slotCount, pImageViews))
1017 printf("DS ERROR : Unable to attach image view descriptors to DS %p!\n", (void*)descriptorSet);
1018 }
1019 nextTable.AttachImageViewDescriptors(descriptorSet, startSlot, slotCount, pImageViews);
1020}
1021
1022XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachMemoryViewDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_MEMORY_VIEW_ATTACH_INFO* pMemViews)
1023{
1024 if (!dsUpdate(descriptorSet)) {
1025 // TODO : This is where we should flag a REAL error
1026 printf("DS ERROR : You must call xglBeginDescriptorSetUpdate(%p) before this call to xglAttachSamplerDescriptors()!\n", (void*)descriptorSet);
1027 }
1028 else {
1029 if (!dsMemMapping(descriptorSet, startSlot, slotCount, pMemViews))
1030 printf("DS ERROR : Unable to attach memory view descriptors to DS %p!\n", (void*)descriptorSet);
1031 }
1032 nextTable.AttachMemoryViewDescriptors(descriptorSet, startSlot, slotCount, pMemViews);
1033}
1034
1035XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachNestedDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_DESCRIPTOR_SET_ATTACH_INFO* pNestedDescriptorSets)
1036{
1037 if (!dsUpdate(descriptorSet)) {
1038 // TODO : This is where we should flag a REAL error
1039 printf("DS ERROR : You must call xglBeginDescriptorSetUpdate(%p) before this call to xglAttachSamplerDescriptors()!\n", (void*)descriptorSet);
1040 }
1041 nextTable.AttachNestedDescriptors(descriptorSet, startSlot, slotCount, pNestedDescriptorSets);
1042}
1043
1044// TODO : Does xglBeginDescriptorSetUpdate() have to be called before this function?
1045XGL_LAYER_EXPORT XGL_VOID XGLAPI xglClearDescriptorSetSlots(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount)
1046{
1047 if (!dsUpdate(descriptorSet)) {
1048 // TODO : This is where we should flag a REAL error
1049 printf("DS ERROR : You must call xglBeginDescriptorSetUpdate(%p) before this call to xglClearDescriptorSetSlots()!\n", (void*)descriptorSet);
1050 }
1051 if (!clearDS(descriptorSet, startSlot, slotCount)) {
1052 // TODO : This is where we should flag a REAL error
1053 printf("DS ERROR : Unable to perform xglClearDescriptorSetSlots(%p, %u, %u) call!\n", descriptorSet, startSlot, slotCount);
1054 }
1055 nextTable.ClearDescriptorSetSlots(descriptorSet, startSlot, slotCount);
1056}
1057
1058XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateViewportState(XGL_DEVICE device, const XGL_VIEWPORT_STATE_CREATE_INFO* pCreateInfo, XGL_VIEWPORT_STATE_OBJECT* pState)
1059{
1060 XGL_RESULT result = nextTable.CreateViewportState(device, pCreateInfo, pState);
1061 return result;
1062}
1063
1064XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateRasterState(XGL_DEVICE device, const XGL_RASTER_STATE_CREATE_INFO* pCreateInfo, XGL_RASTER_STATE_OBJECT* pState)
1065{
1066 XGL_RESULT result = nextTable.CreateRasterState(device, pCreateInfo, pState);
1067 return result;
1068}
1069
1070XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateMsaaState(XGL_DEVICE device, const XGL_MSAA_STATE_CREATE_INFO* pCreateInfo, XGL_MSAA_STATE_OBJECT* pState)
1071{
1072 XGL_RESULT result = nextTable.CreateMsaaState(device, pCreateInfo, pState);
1073 return result;
1074}
1075
1076XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateColorBlendState(XGL_DEVICE device, const XGL_COLOR_BLEND_STATE_CREATE_INFO* pCreateInfo, XGL_COLOR_BLEND_STATE_OBJECT* pState)
1077{
1078 XGL_RESULT result = nextTable.CreateColorBlendState(device, pCreateInfo, pState);
1079 return result;
1080}
1081
1082XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDepthStencilState(XGL_DEVICE device, const XGL_DEPTH_STENCIL_STATE_CREATE_INFO* pCreateInfo, XGL_DEPTH_STENCIL_STATE_OBJECT* pState)
1083{
1084 XGL_RESULT result = nextTable.CreateDepthStencilState(device, pCreateInfo, pState);
1085 return result;
1086}
1087
1088XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateCommandBuffer(XGL_DEVICE device, const XGL_CMD_BUFFER_CREATE_INFO* pCreateInfo, XGL_CMD_BUFFER* pCmdBuffer)
1089{
1090 XGL_RESULT result = nextTable.CreateCommandBuffer(device, pCreateInfo, pCmdBuffer);
1091 return result;
1092}
1093
1094XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglBeginCommandBuffer(XGL_CMD_BUFFER cmdBuffer, XGL_FLAGS flags)
1095{
1096 XGL_RESULT result = nextTable.BeginCommandBuffer(cmdBuffer, flags);
1097 return result;
1098}
1099
1100XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglEndCommandBuffer(XGL_CMD_BUFFER cmdBuffer)
1101{
1102 XGL_RESULT result = nextTable.EndCommandBuffer(cmdBuffer);
1103 return result;
1104}
1105
1106XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglResetCommandBuffer(XGL_CMD_BUFFER cmdBuffer)
1107{
1108 XGL_RESULT result = nextTable.ResetCommandBuffer(cmdBuffer);
1109 return result;
1110}
1111
1112XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindPipeline(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_PIPELINE pipeline)
1113{
1114 if (getPipeline(pipeline)) {
1115 lastBoundPipeline = pipeline;
1116 }
1117 else {
1118 printf("DS ERROR : Attempt to bind Pipeline %p that doesn't exist!\n", (void*)pipeline);
1119 }
1120 nextTable.CmdBindPipeline(cmdBuffer, pipelineBindPoint, pipeline);
1121}
1122
1123XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindPipelineDelta(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_PIPELINE_DELTA delta)
1124{
1125 nextTable.CmdBindPipelineDelta(cmdBuffer, pipelineBindPoint, delta);
1126}
1127
1128XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindStateObject(XGL_CMD_BUFFER cmdBuffer, XGL_STATE_BIND_POINT stateBindPoint, XGL_STATE_OBJECT state)
1129{
1130 nextTable.CmdBindStateObject(cmdBuffer, stateBindPoint, state);
1131}
1132
1133XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindDescriptorSet(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_UINT index, XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT slotOffset)
1134{
1135 if (getDS(descriptorSet)) {
1136 // TODO : Validate index
1137 lastBoundDS[index] = descriptorSet;
1138 }
1139 else {
1140 printf("DS ERROR : Attempt to bind DS %p that doesn't exist!\n", (void*)descriptorSet);
1141 }
1142 nextTable.CmdBindDescriptorSet(cmdBuffer, pipelineBindPoint, index, descriptorSet, slotOffset);
1143}
1144
1145XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindDynamicMemoryView(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, const XGL_MEMORY_VIEW_ATTACH_INFO* pMemView)
1146{
1147 nextTable.CmdBindDynamicMemoryView(cmdBuffer, pipelineBindPoint, pMemView);
1148}
1149
1150XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindIndexData(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_INDEX_TYPE indexType)
1151{
1152 nextTable.CmdBindIndexData(cmdBuffer, mem, offset, indexType);
1153}
1154
1155XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindAttachments(XGL_CMD_BUFFER cmdBuffer, XGL_UINT colorAttachmentCount, const XGL_COLOR_ATTACHMENT_BIND_INFO* pColorAttachments, const XGL_DEPTH_STENCIL_BIND_INFO* pDepthStencilAttachment)
1156{
1157 nextTable.CmdBindAttachments(cmdBuffer, colorAttachmentCount, pColorAttachments, pDepthStencilAttachment);
1158}
1159
1160XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdPrepareMemoryRegions(XGL_CMD_BUFFER cmdBuffer, XGL_UINT transitionCount, const XGL_MEMORY_STATE_TRANSITION* pStateTransitions)
1161{
1162 nextTable.CmdPrepareMemoryRegions(cmdBuffer, transitionCount, pStateTransitions);
1163}
1164
1165XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdPrepareImages(XGL_CMD_BUFFER cmdBuffer, XGL_UINT transitionCount, const XGL_IMAGE_STATE_TRANSITION* pStateTransitions)
1166{
1167 nextTable.CmdPrepareImages(cmdBuffer, transitionCount, pStateTransitions);
1168}
1169
1170XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDraw(XGL_CMD_BUFFER cmdBuffer, XGL_UINT firstVertex, XGL_UINT vertexCount, XGL_UINT firstInstance, XGL_UINT instanceCount)
1171{
1172 synchAndPrintDSConfig();
1173 nextTable.CmdDraw(cmdBuffer, firstVertex, vertexCount, firstInstance, instanceCount);
1174}
1175
1176XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDrawIndexed(XGL_CMD_BUFFER cmdBuffer, XGL_UINT firstIndex, XGL_UINT indexCount, XGL_INT vertexOffset, XGL_UINT firstInstance, XGL_UINT instanceCount)
1177{
1178 nextTable.CmdDrawIndexed(cmdBuffer, firstIndex, indexCount, vertexOffset, firstInstance, instanceCount);
1179}
1180
1181XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDrawIndirect(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT32 count, XGL_UINT32 stride)
1182{
1183 nextTable.CmdDrawIndirect(cmdBuffer, mem, offset, count, stride);
1184}
1185
1186XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDrawIndexedIndirect(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT32 count, XGL_UINT32 stride)
1187{
1188 nextTable.CmdDrawIndexedIndirect(cmdBuffer, mem, offset, count, stride);
1189}
1190
1191XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDispatch(XGL_CMD_BUFFER cmdBuffer, XGL_UINT x, XGL_UINT y, XGL_UINT z)
1192{
1193 nextTable.CmdDispatch(cmdBuffer, x, y, z);
1194}
1195
1196XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDispatchIndirect(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset)
1197{
1198 nextTable.CmdDispatchIndirect(cmdBuffer, mem, offset);
1199}
1200
1201XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdCopyMemory(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY srcMem, XGL_GPU_MEMORY destMem, XGL_UINT regionCount, const XGL_MEMORY_COPY* pRegions)
1202{
1203 nextTable.CmdCopyMemory(cmdBuffer, srcMem, destMem, regionCount, pRegions);
1204}
1205
1206XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdCopyImage(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE destImage, XGL_UINT regionCount, const XGL_IMAGE_COPY* pRegions)
1207{
1208 nextTable.CmdCopyImage(cmdBuffer, srcImage, destImage, regionCount, pRegions);
1209}
1210
1211XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdCopyMemoryToImage(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY srcMem, XGL_IMAGE destImage, XGL_UINT regionCount, const XGL_MEMORY_IMAGE_COPY* pRegions)
1212{
1213 nextTable.CmdCopyMemoryToImage(cmdBuffer, srcMem, destImage, regionCount, pRegions);
1214}
1215
1216XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdCopyImageToMemory(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_GPU_MEMORY destMem, XGL_UINT regionCount, const XGL_MEMORY_IMAGE_COPY* pRegions)
1217{
1218 nextTable.CmdCopyImageToMemory(cmdBuffer, srcImage, destMem, regionCount, pRegions);
1219}
1220
1221XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdCloneImageData(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE_STATE srcImageState, XGL_IMAGE destImage, XGL_IMAGE_STATE destImageState)
1222{
1223 nextTable.CmdCloneImageData(cmdBuffer, srcImage, srcImageState, destImage, destImageState);
1224}
1225
1226XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdUpdateMemory(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY destMem, XGL_GPU_SIZE destOffset, XGL_GPU_SIZE dataSize, const XGL_UINT32* pData)
1227{
1228 nextTable.CmdUpdateMemory(cmdBuffer, destMem, destOffset, dataSize, pData);
1229}
1230
1231XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdFillMemory(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY destMem, XGL_GPU_SIZE destOffset, XGL_GPU_SIZE fillSize, XGL_UINT32 data)
1232{
1233 nextTable.CmdFillMemory(cmdBuffer, destMem, destOffset, fillSize, data);
1234}
1235
1236XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdClearColorImage(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE image, const XGL_FLOAT color[4], XGL_UINT rangeCount, const XGL_IMAGE_SUBRESOURCE_RANGE* pRanges)
1237{
1238 nextTable.CmdClearColorImage(cmdBuffer, image, color, rangeCount, pRanges);
1239}
1240
1241XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdClearColorImageRaw(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE image, const XGL_UINT32 color[4], XGL_UINT rangeCount, const XGL_IMAGE_SUBRESOURCE_RANGE* pRanges)
1242{
1243 nextTable.CmdClearColorImageRaw(cmdBuffer, image, color, rangeCount, pRanges);
1244}
1245
1246XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdClearDepthStencil(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE image, XGL_FLOAT depth, XGL_UINT32 stencil, XGL_UINT rangeCount, const XGL_IMAGE_SUBRESOURCE_RANGE* pRanges)
1247{
1248 nextTable.CmdClearDepthStencil(cmdBuffer, image, depth, stencil, rangeCount, pRanges);
1249}
1250
1251XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdResolveImage(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE destImage, XGL_UINT rectCount, const XGL_IMAGE_RESOLVE* pRects)
1252{
1253 nextTable.CmdResolveImage(cmdBuffer, srcImage, destImage, rectCount, pRects);
1254}
1255
1256XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdSetEvent(XGL_CMD_BUFFER cmdBuffer, XGL_EVENT event)
1257{
1258 nextTable.CmdSetEvent(cmdBuffer, event);
1259}
1260
1261XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdResetEvent(XGL_CMD_BUFFER cmdBuffer, XGL_EVENT event)
1262{
1263 nextTable.CmdResetEvent(cmdBuffer, event);
1264}
1265
1266XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdMemoryAtomic(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY destMem, XGL_GPU_SIZE destOffset, XGL_UINT64 srcData, XGL_ATOMIC_OP atomicOp)
1267{
1268 nextTable.CmdMemoryAtomic(cmdBuffer, destMem, destOffset, srcData, atomicOp);
1269}
1270
1271XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBeginQuery(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT slot, XGL_FLAGS flags)
1272{
1273 nextTable.CmdBeginQuery(cmdBuffer, queryPool, slot, flags);
1274}
1275
1276XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdEndQuery(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT slot)
1277{
1278 nextTable.CmdEndQuery(cmdBuffer, queryPool, slot);
1279}
1280
1281XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdResetQueryPool(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT startQuery, XGL_UINT queryCount)
1282{
1283 nextTable.CmdResetQueryPool(cmdBuffer, queryPool, startQuery, queryCount);
1284}
1285
1286XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdWriteTimestamp(XGL_CMD_BUFFER cmdBuffer, XGL_TIMESTAMP_TYPE timestampType, XGL_GPU_MEMORY destMem, XGL_GPU_SIZE destOffset)
1287{
1288 nextTable.CmdWriteTimestamp(cmdBuffer, timestampType, destMem, destOffset);
1289}
1290
1291XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdInitAtomicCounters(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_UINT startCounter, XGL_UINT counterCount, const XGL_UINT32* pData)
1292{
1293 nextTable.CmdInitAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, pData);
1294}
1295
1296XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdLoadAtomicCounters(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_UINT startCounter, XGL_UINT counterCount, XGL_GPU_MEMORY srcMem, XGL_GPU_SIZE srcOffset)
1297{
1298 nextTable.CmdLoadAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, srcMem, srcOffset);
1299}
1300
1301XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdSaveAtomicCounters(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_UINT startCounter, XGL_UINT counterCount, XGL_GPU_MEMORY destMem, XGL_GPU_SIZE destOffset)
1302{
1303 nextTable.CmdSaveAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, destMem, destOffset);
1304}
1305
1306XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetValidationLevel(XGL_DEVICE device, XGL_VALIDATION_LEVEL validationLevel)
1307{
1308 XGL_RESULT result = nextTable.DbgSetValidationLevel(device, validationLevel);
1309 return result;
1310}
1311
1312XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgRegisterMsgCallback(XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback, XGL_VOID* pUserData)
1313{
1314 XGL_RESULT result = nextTable.DbgRegisterMsgCallback(pfnMsgCallback, pUserData);
1315 return result;
1316}
1317
1318XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgUnregisterMsgCallback(XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback)
1319{
1320 XGL_RESULT result = nextTable.DbgUnregisterMsgCallback(pfnMsgCallback);
1321 return result;
1322}
1323
1324XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetMessageFilter(XGL_DEVICE device, XGL_INT msgCode, XGL_DBG_MSG_FILTER filter)
1325{
1326 XGL_RESULT result = nextTable.DbgSetMessageFilter(device, msgCode, filter);
1327 return result;
1328}
1329
1330XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetObjectTag(XGL_BASE_OBJECT object, XGL_SIZE tagSize, const XGL_VOID* pTag)
1331{
1332 XGL_RESULT result = nextTable.DbgSetObjectTag(object, tagSize, pTag);
1333 return result;
1334}
1335
1336XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetGlobalOption(XGL_DBG_GLOBAL_OPTION dbgOption, XGL_SIZE dataSize, const XGL_VOID* pData)
1337{
1338 XGL_RESULT result = nextTable.DbgSetGlobalOption(dbgOption, dataSize, pData);
1339 return result;
1340}
1341
1342XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetDeviceOption(XGL_DEVICE device, XGL_DBG_DEVICE_OPTION dbgOption, XGL_SIZE dataSize, const XGL_VOID* pData)
1343{
1344 XGL_RESULT result = nextTable.DbgSetDeviceOption(device, dbgOption, dataSize, pData);
1345 return result;
1346}
1347
1348XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDbgMarkerBegin(XGL_CMD_BUFFER cmdBuffer, const XGL_CHAR* pMarker)
1349{
1350 nextTable.CmdDbgMarkerBegin(cmdBuffer, pMarker);
1351}
1352
1353XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDbgMarkerEnd(XGL_CMD_BUFFER cmdBuffer)
1354{
1355 nextTable.CmdDbgMarkerEnd(cmdBuffer);
1356}
1357
1358XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11AssociateConnection(XGL_PHYSICAL_GPU gpu, const XGL_WSI_X11_CONNECTION_INFO* pConnectionInfo)
1359{
1360 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
1361 printf("At start of layered WsiX11AssociateConnection\n");
1362 pCurObj = gpuw;
1363 pthread_once(&tabOnce, initLayerTable);
1364 XGL_RESULT result = nextTable.WsiX11AssociateConnection((XGL_PHYSICAL_GPU)gpuw->nextObject, pConnectionInfo);
1365 printf("Completed layered WsiX11AssociateConnection\n");
1366 return result;
1367}
1368
1369XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11GetMSC(XGL_DEVICE device, xcb_randr_crtc_t crtc, XGL_UINT64* pMsc)
1370{
1371 XGL_RESULT result = nextTable.WsiX11GetMSC(device, crtc, pMsc);
1372 return result;
1373}
1374
1375XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11CreatePresentableImage(XGL_DEVICE device, const XGL_WSI_X11_PRESENTABLE_IMAGE_CREATE_INFO* pCreateInfo, XGL_IMAGE* pImage, XGL_GPU_MEMORY* pMem)
1376{
1377 XGL_RESULT result = nextTable.WsiX11CreatePresentableImage(device, pCreateInfo, pImage, pMem);
1378 return result;
1379}
1380
1381XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11QueuePresent(XGL_QUEUE queue, const XGL_WSI_X11_PRESENT_INFO* pPresentInfo, XGL_FENCE fence)
1382{
1383 XGL_RESULT result = nextTable.WsiX11QueuePresent(queue, pPresentInfo, fence);
1384 return result;
1385}
1386
1387XGL_LAYER_EXPORT XGL_VOID* XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* funcName)
1388{
1389 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
1390 if (gpu == NULL)
1391 return NULL;
1392 pCurObj = gpuw;
1393 pthread_once(&tabOnce, initLayerTable);
1394
1395 if (!strncmp("xglGetProcAddr", (const char *) funcName, sizeof("xglGetProcAddr")))
1396 return xglGetProcAddr;
1397 else if (!strncmp("xglInitAndEnumerateGpus", (const char *) funcName, sizeof("xglInitAndEnumerateGpus")))
1398 return nextTable.InitAndEnumerateGpus;
1399 else if (!strncmp("xglGetGpuInfo", (const char *) funcName, sizeof("xglGetGpuInfo")))
1400 return xglGetGpuInfo;
1401 else if (!strncmp("xglCreateDevice", (const char *) funcName, sizeof("xglCreateDevice")))
1402 return xglCreateDevice;
1403 else if (!strncmp("xglDestroyDevice", (const char *) funcName, sizeof("xglDestroyDevice")))
1404 return xglDestroyDevice;
1405 else if (!strncmp("xglGetExtensionSupport", (const char *) funcName, sizeof("xglGetExtensionSupport")))
1406 return xglGetExtensionSupport;
1407 else if (!strncmp("xglEnumerateLayers", (const char *) funcName, sizeof("xglEnumerateLayers")))
1408 return xglEnumerateLayers;
1409 else if (!strncmp("xglGetDeviceQueue", (const char *) funcName, sizeof("xglGetDeviceQueue")))
1410 return xglGetDeviceQueue;
1411 else if (!strncmp("xglQueueSubmit", (const char *) funcName, sizeof("xglQueueSubmit")))
1412 return xglQueueSubmit;
1413 else if (!strncmp("xglQueueSetGlobalMemReferences", (const char *) funcName, sizeof("xglQueueSetGlobalMemReferences")))
1414 return xglQueueSetGlobalMemReferences;
1415 else if (!strncmp("xglQueueWaitIdle", (const char *) funcName, sizeof("xglQueueWaitIdle")))
1416 return xglQueueWaitIdle;
1417 else if (!strncmp("xglDeviceWaitIdle", (const char *) funcName, sizeof("xglDeviceWaitIdle")))
1418 return xglDeviceWaitIdle;
1419 else if (!strncmp("xglGetMemoryHeapCount", (const char *) funcName, sizeof("xglGetMemoryHeapCount")))
1420 return xglGetMemoryHeapCount;
1421 else if (!strncmp("xglGetMemoryHeapInfo", (const char *) funcName, sizeof("xglGetMemoryHeapInfo")))
1422 return xglGetMemoryHeapInfo;
1423 else if (!strncmp("xglAllocMemory", (const char *) funcName, sizeof("xglAllocMemory")))
1424 return xglAllocMemory;
1425 else if (!strncmp("xglFreeMemory", (const char *) funcName, sizeof("xglFreeMemory")))
1426 return xglFreeMemory;
1427 else if (!strncmp("xglSetMemoryPriority", (const char *) funcName, sizeof("xglSetMemoryPriority")))
1428 return xglSetMemoryPriority;
1429 else if (!strncmp("xglMapMemory", (const char *) funcName, sizeof("xglMapMemory")))
1430 return xglMapMemory;
1431 else if (!strncmp("xglUnmapMemory", (const char *) funcName, sizeof("xglUnmapMemory")))
1432 return xglUnmapMemory;
1433 else if (!strncmp("xglPinSystemMemory", (const char *) funcName, sizeof("xglPinSystemMemory")))
1434 return xglPinSystemMemory;
1435 else if (!strncmp("xglRemapVirtualMemoryPages", (const char *) funcName, sizeof("xglRemapVirtualMemoryPages")))
1436 return xglRemapVirtualMemoryPages;
1437 else if (!strncmp("xglGetMultiGpuCompatibility", (const char *) funcName, sizeof("xglGetMultiGpuCompatibility")))
1438 return xglGetMultiGpuCompatibility;
1439 else if (!strncmp("xglOpenSharedMemory", (const char *) funcName, sizeof("xglOpenSharedMemory")))
1440 return xglOpenSharedMemory;
1441 else if (!strncmp("xglOpenSharedQueueSemaphore", (const char *) funcName, sizeof("xglOpenSharedQueueSemaphore")))
1442 return xglOpenSharedQueueSemaphore;
1443 else if (!strncmp("xglOpenPeerMemory", (const char *) funcName, sizeof("xglOpenPeerMemory")))
1444 return xglOpenPeerMemory;
1445 else if (!strncmp("xglOpenPeerImage", (const char *) funcName, sizeof("xglOpenPeerImage")))
1446 return xglOpenPeerImage;
1447 else if (!strncmp("xglDestroyObject", (const char *) funcName, sizeof("xglDestroyObject")))
1448 return xglDestroyObject;
1449 else if (!strncmp("xglGetObjectInfo", (const char *) funcName, sizeof("xglGetObjectInfo")))
1450 return xglGetObjectInfo;
1451 else if (!strncmp("xglBindObjectMemory", (const char *) funcName, sizeof("xglBindObjectMemory")))
1452 return xglBindObjectMemory;
1453 else if (!strncmp("xglCreateFence", (const char *) funcName, sizeof("xglCreateFence")))
1454 return xglCreateFence;
1455 else if (!strncmp("xglGetFenceStatus", (const char *) funcName, sizeof("xglGetFenceStatus")))
1456 return xglGetFenceStatus;
1457 else if (!strncmp("xglWaitForFences", (const char *) funcName, sizeof("xglWaitForFences")))
1458 return xglWaitForFences;
1459 else if (!strncmp("xglCreateQueueSemaphore", (const char *) funcName, sizeof("xglCreateQueueSemaphore")))
1460 return xglCreateQueueSemaphore;
1461 else if (!strncmp("xglSignalQueueSemaphore", (const char *) funcName, sizeof("xglSignalQueueSemaphore")))
1462 return xglSignalQueueSemaphore;
1463 else if (!strncmp("xglWaitQueueSemaphore", (const char *) funcName, sizeof("xglWaitQueueSemaphore")))
1464 return xglWaitQueueSemaphore;
1465 else if (!strncmp("xglCreateEvent", (const char *) funcName, sizeof("xglCreateEvent")))
1466 return xglCreateEvent;
1467 else if (!strncmp("xglGetEventStatus", (const char *) funcName, sizeof("xglGetEventStatus")))
1468 return xglGetEventStatus;
1469 else if (!strncmp("xglSetEvent", (const char *) funcName, sizeof("xglSetEvent")))
1470 return xglSetEvent;
1471 else if (!strncmp("xglResetEvent", (const char *) funcName, sizeof("xglResetEvent")))
1472 return xglResetEvent;
1473 else if (!strncmp("xglCreateQueryPool", (const char *) funcName, sizeof("xglCreateQueryPool")))
1474 return xglCreateQueryPool;
1475 else if (!strncmp("xglGetQueryPoolResults", (const char *) funcName, sizeof("xglGetQueryPoolResults")))
1476 return xglGetQueryPoolResults;
1477 else if (!strncmp("xglGetFormatInfo", (const char *) funcName, sizeof("xglGetFormatInfo")))
1478 return xglGetFormatInfo;
1479 else if (!strncmp("xglCreateImage", (const char *) funcName, sizeof("xglCreateImage")))
1480 return xglCreateImage;
1481 else if (!strncmp("xglGetImageSubresourceInfo", (const char *) funcName, sizeof("xglGetImageSubresourceInfo")))
1482 return xglGetImageSubresourceInfo;
1483 else if (!strncmp("xglCreateImageView", (const char *) funcName, sizeof("xglCreateImageView")))
1484 return xglCreateImageView;
1485 else if (!strncmp("xglCreateColorAttachmentView", (const char *) funcName, sizeof("xglCreateColorAttachmentView")))
1486 return xglCreateColorAttachmentView;
1487 else if (!strncmp("xglCreateDepthStencilView", (const char *) funcName, sizeof("xglCreateDepthStencilView")))
1488 return xglCreateDepthStencilView;
1489 else if (!strncmp("xglCreateShader", (const char *) funcName, sizeof("xglCreateShader")))
1490 return xglCreateShader;
1491 else if (!strncmp("xglCreateGraphicsPipeline", (const char *) funcName, sizeof("xglCreateGraphicsPipeline")))
1492 return xglCreateGraphicsPipeline;
1493 else if (!strncmp("xglCreateComputePipeline", (const char *) funcName, sizeof("xglCreateComputePipeline")))
1494 return xglCreateComputePipeline;
1495 else if (!strncmp("xglStorePipeline", (const char *) funcName, sizeof("xglStorePipeline")))
1496 return xglStorePipeline;
1497 else if (!strncmp("xglLoadPipeline", (const char *) funcName, sizeof("xglLoadPipeline")))
1498 return xglLoadPipeline;
1499 else if (!strncmp("xglCreatePipelineDelta", (const char *) funcName, sizeof("xglCreatePipelineDelta")))
1500 return xglCreatePipelineDelta;
1501 else if (!strncmp("xglCreateSampler", (const char *) funcName, sizeof("xglCreateSampler")))
1502 return xglCreateSampler;
1503 else if (!strncmp("xglCreateDescriptorSet", (const char *) funcName, sizeof("xglCreateDescriptorSet")))
1504 return xglCreateDescriptorSet;
1505 else if (!strncmp("xglBeginDescriptorSetUpdate", (const char *) funcName, sizeof("xglBeginDescriptorSetUpdate")))
1506 return xglBeginDescriptorSetUpdate;
1507 else if (!strncmp("xglEndDescriptorSetUpdate", (const char *) funcName, sizeof("xglEndDescriptorSetUpdate")))
1508 return xglEndDescriptorSetUpdate;
1509 else if (!strncmp("xglAttachSamplerDescriptors", (const char *) funcName, sizeof("xglAttachSamplerDescriptors")))
1510 return xglAttachSamplerDescriptors;
1511 else if (!strncmp("xglAttachImageViewDescriptors", (const char *) funcName, sizeof("xglAttachImageViewDescriptors")))
1512 return xglAttachImageViewDescriptors;
1513 else if (!strncmp("xglAttachMemoryViewDescriptors", (const char *) funcName, sizeof("xglAttachMemoryViewDescriptors")))
1514 return xglAttachMemoryViewDescriptors;
1515 else if (!strncmp("xglAttachNestedDescriptors", (const char *) funcName, sizeof("xglAttachNestedDescriptors")))
1516 return xglAttachNestedDescriptors;
1517 else if (!strncmp("xglClearDescriptorSetSlots", (const char *) funcName, sizeof("xglClearDescriptorSetSlots")))
1518 return xglClearDescriptorSetSlots;
1519 else if (!strncmp("xglCreateViewportState", (const char *) funcName, sizeof("xglCreateViewportState")))
1520 return xglCreateViewportState;
1521 else if (!strncmp("xglCreateRasterState", (const char *) funcName, sizeof("xglCreateRasterState")))
1522 return xglCreateRasterState;
1523 else if (!strncmp("xglCreateMsaaState", (const char *) funcName, sizeof("xglCreateMsaaState")))
1524 return xglCreateMsaaState;
1525 else if (!strncmp("xglCreateColorBlendState", (const char *) funcName, sizeof("xglCreateColorBlendState")))
1526 return xglCreateColorBlendState;
1527 else if (!strncmp("xglCreateDepthStencilState", (const char *) funcName, sizeof("xglCreateDepthStencilState")))
1528 return xglCreateDepthStencilState;
1529 else if (!strncmp("xglCreateCommandBuffer", (const char *) funcName, sizeof("xglCreateCommandBuffer")))
1530 return xglCreateCommandBuffer;
1531 else if (!strncmp("xglBeginCommandBuffer", (const char *) funcName, sizeof("xglBeginCommandBuffer")))
1532 return xglBeginCommandBuffer;
1533 else if (!strncmp("xglEndCommandBuffer", (const char *) funcName, sizeof("xglEndCommandBuffer")))
1534 return xglEndCommandBuffer;
1535 else if (!strncmp("xglResetCommandBuffer", (const char *) funcName, sizeof("xglResetCommandBuffer")))
1536 return xglResetCommandBuffer;
1537 else if (!strncmp("xglCmdBindPipeline", (const char *) funcName, sizeof("xglCmdBindPipeline")))
1538 return xglCmdBindPipeline;
1539 else if (!strncmp("xglCmdBindPipelineDelta", (const char *) funcName, sizeof("xglCmdBindPipelineDelta")))
1540 return xglCmdBindPipelineDelta;
1541 else if (!strncmp("xglCmdBindStateObject", (const char *) funcName, sizeof("xglCmdBindStateObject")))
1542 return xglCmdBindStateObject;
1543 else if (!strncmp("xglCmdBindDescriptorSet", (const char *) funcName, sizeof("xglCmdBindDescriptorSet")))
1544 return xglCmdBindDescriptorSet;
1545 else if (!strncmp("xglCmdBindDynamicMemoryView", (const char *) funcName, sizeof("xglCmdBindDynamicMemoryView")))
1546 return xglCmdBindDynamicMemoryView;
1547 else if (!strncmp("xglCmdBindIndexData", (const char *) funcName, sizeof("xglCmdBindIndexData")))
1548 return xglCmdBindIndexData;
1549 else if (!strncmp("xglCmdBindAttachments", (const char *) funcName, sizeof("xglCmdBindAttachments")))
1550 return xglCmdBindAttachments;
1551 else if (!strncmp("xglCmdPrepareMemoryRegions", (const char *) funcName, sizeof("xglCmdPrepareMemoryRegions")))
1552 return xglCmdPrepareMemoryRegions;
1553 else if (!strncmp("xglCmdPrepareImages", (const char *) funcName, sizeof("xglCmdPrepareImages")))
1554 return xglCmdPrepareImages;
1555 else if (!strncmp("xglCmdDraw", (const char *) funcName, sizeof("xglCmdDraw")))
1556 return xglCmdDraw;
1557 else if (!strncmp("xglCmdDrawIndexed", (const char *) funcName, sizeof("xglCmdDrawIndexed")))
1558 return xglCmdDrawIndexed;
1559 else if (!strncmp("xglCmdDrawIndirect", (const char *) funcName, sizeof("xglCmdDrawIndirect")))
1560 return xglCmdDrawIndirect;
1561 else if (!strncmp("xglCmdDrawIndexedIndirect", (const char *) funcName, sizeof("xglCmdDrawIndexedIndirect")))
1562 return xglCmdDrawIndexedIndirect;
1563 else if (!strncmp("xglCmdDispatch", (const char *) funcName, sizeof("xglCmdDispatch")))
1564 return xglCmdDispatch;
1565 else if (!strncmp("xglCmdDispatchIndirect", (const char *) funcName, sizeof("xglCmdDispatchIndirect")))
1566 return xglCmdDispatchIndirect;
1567 else if (!strncmp("xglCmdCopyMemory", (const char *) funcName, sizeof("xglCmdCopyMemory")))
1568 return xglCmdCopyMemory;
1569 else if (!strncmp("xglCmdCopyImage", (const char *) funcName, sizeof("xglCmdCopyImage")))
1570 return xglCmdCopyImage;
1571 else if (!strncmp("xglCmdCopyMemoryToImage", (const char *) funcName, sizeof("xglCmdCopyMemoryToImage")))
1572 return xglCmdCopyMemoryToImage;
1573 else if (!strncmp("xglCmdCopyImageToMemory", (const char *) funcName, sizeof("xglCmdCopyImageToMemory")))
1574 return xglCmdCopyImageToMemory;
1575 else if (!strncmp("xglCmdCloneImageData", (const char *) funcName, sizeof("xglCmdCloneImageData")))
1576 return xglCmdCloneImageData;
1577 else if (!strncmp("xglCmdUpdateMemory", (const char *) funcName, sizeof("xglCmdUpdateMemory")))
1578 return xglCmdUpdateMemory;
1579 else if (!strncmp("xglCmdFillMemory", (const char *) funcName, sizeof("xglCmdFillMemory")))
1580 return xglCmdFillMemory;
1581 else if (!strncmp("xglCmdClearColorImage", (const char *) funcName, sizeof("xglCmdClearColorImage")))
1582 return xglCmdClearColorImage;
1583 else if (!strncmp("xglCmdClearColorImageRaw", (const char *) funcName, sizeof("xglCmdClearColorImageRaw")))
1584 return xglCmdClearColorImageRaw;
1585 else if (!strncmp("xglCmdClearDepthStencil", (const char *) funcName, sizeof("xglCmdClearDepthStencil")))
1586 return xglCmdClearDepthStencil;
1587 else if (!strncmp("xglCmdResolveImage", (const char *) funcName, sizeof("xglCmdResolveImage")))
1588 return xglCmdResolveImage;
1589 else if (!strncmp("xglCmdSetEvent", (const char *) funcName, sizeof("xglCmdSetEvent")))
1590 return xglCmdSetEvent;
1591 else if (!strncmp("xglCmdResetEvent", (const char *) funcName, sizeof("xglCmdResetEvent")))
1592 return xglCmdResetEvent;
1593 else if (!strncmp("xglCmdMemoryAtomic", (const char *) funcName, sizeof("xglCmdMemoryAtomic")))
1594 return xglCmdMemoryAtomic;
1595 else if (!strncmp("xglCmdBeginQuery", (const char *) funcName, sizeof("xglCmdBeginQuery")))
1596 return xglCmdBeginQuery;
1597 else if (!strncmp("xglCmdEndQuery", (const char *) funcName, sizeof("xglCmdEndQuery")))
1598 return xglCmdEndQuery;
1599 else if (!strncmp("xglCmdResetQueryPool", (const char *) funcName, sizeof("xglCmdResetQueryPool")))
1600 return xglCmdResetQueryPool;
1601 else if (!strncmp("xglCmdWriteTimestamp", (const char *) funcName, sizeof("xglCmdWriteTimestamp")))
1602 return xglCmdWriteTimestamp;
1603 else if (!strncmp("xglCmdInitAtomicCounters", (const char *) funcName, sizeof("xglCmdInitAtomicCounters")))
1604 return xglCmdInitAtomicCounters;
1605 else if (!strncmp("xglCmdLoadAtomicCounters", (const char *) funcName, sizeof("xglCmdLoadAtomicCounters")))
1606 return xglCmdLoadAtomicCounters;
1607 else if (!strncmp("xglCmdSaveAtomicCounters", (const char *) funcName, sizeof("xglCmdSaveAtomicCounters")))
1608 return xglCmdSaveAtomicCounters;
1609 else if (!strncmp("xglDbgSetValidationLevel", (const char *) funcName, sizeof("xglDbgSetValidationLevel")))
1610 return xglDbgSetValidationLevel;
1611 else if (!strncmp("xglDbgRegisterMsgCallback", (const char *) funcName, sizeof("xglDbgRegisterMsgCallback")))
1612 return xglDbgRegisterMsgCallback;
1613 else if (!strncmp("xglDbgUnregisterMsgCallback", (const char *) funcName, sizeof("xglDbgUnregisterMsgCallback")))
1614 return xglDbgUnregisterMsgCallback;
1615 else if (!strncmp("xglDbgSetMessageFilter", (const char *) funcName, sizeof("xglDbgSetMessageFilter")))
1616 return xglDbgSetMessageFilter;
1617 else if (!strncmp("xglDbgSetObjectTag", (const char *) funcName, sizeof("xglDbgSetObjectTag")))
1618 return xglDbgSetObjectTag;
1619 else if (!strncmp("xglDbgSetGlobalOption", (const char *) funcName, sizeof("xglDbgSetGlobalOption")))
1620 return xglDbgSetGlobalOption;
1621 else if (!strncmp("xglDbgSetDeviceOption", (const char *) funcName, sizeof("xglDbgSetDeviceOption")))
1622 return xglDbgSetDeviceOption;
1623 else if (!strncmp("xglCmdDbgMarkerBegin", (const char *) funcName, sizeof("xglCmdDbgMarkerBegin")))
1624 return xglCmdDbgMarkerBegin;
1625 else if (!strncmp("xglCmdDbgMarkerEnd", (const char *) funcName, sizeof("xglCmdDbgMarkerEnd")))
1626 return xglCmdDbgMarkerEnd;
1627 else if (!strncmp("xglWsiX11AssociateConnection", (const char *) funcName, sizeof("xglWsiX11AssociateConnection")))
1628 return xglWsiX11AssociateConnection;
1629 else if (!strncmp("xglWsiX11GetMSC", (const char *) funcName, sizeof("xglWsiX11GetMSC")))
1630 return xglWsiX11GetMSC;
1631 else if (!strncmp("xglWsiX11CreatePresentableImage", (const char *) funcName, sizeof("xglWsiX11CreatePresentableImage")))
1632 return xglWsiX11CreatePresentableImage;
1633 else if (!strncmp("xglWsiX11QueuePresent", (const char *) funcName, sizeof("xglWsiX11QueuePresent")))
1634 return xglWsiX11QueuePresent;
1635 else {
1636 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
1637 if (gpuw->pGPA == NULL)
1638 return NULL;
1639 return gpuw->pGPA(gpuw->nextObject, funcName);
1640 }
1641}
1642