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