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