blob: ef6ea3068913f3771a3652376adf2fad6a589308 [file] [log] [blame]
Tobin Ehlis817736c2014-10-21 10:47: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 Ehlis92dbf802014-10-22 09:06:33 -060031#include "xgl_string_helper.h"
32#include "xgl_struct_string_helper.h"
Tobin Ehlis817736c2014-10-21 10:47:45 -060033
34static XGL_LAYER_DISPATCH_TABLE nextTable;
35static XGL_BASE_LAYER_OBJECT *pCurObj;
36static pthread_once_t tabOnce = PTHREAD_ONCE_INIT;
37
38
39static void initLayerTable()
40{
41 GetProcAddrType fpNextGPA;
42 fpNextGPA = pCurObj->pGPA;
43 assert(fpNextGPA);
44
45 GetProcAddrType fpGetProcAddr = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetProcAddr");
46 nextTable.GetProcAddr = fpGetProcAddr;
47 InitAndEnumerateGpusType fpInitAndEnumerateGpus = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglInitAndEnumerateGpus");
48 nextTable.InitAndEnumerateGpus = fpInitAndEnumerateGpus;
49 GetGpuInfoType fpGetGpuInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetGpuInfo");
50 nextTable.GetGpuInfo = fpGetGpuInfo;
51 CreateDeviceType fpCreateDevice = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDevice");
52 nextTable.CreateDevice = fpCreateDevice;
53 DestroyDeviceType fpDestroyDevice = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDestroyDevice");
54 nextTable.DestroyDevice = fpDestroyDevice;
55 GetExtensionSupportType fpGetExtensionSupport = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetExtensionSupport");
56 nextTable.GetExtensionSupport = fpGetExtensionSupport;
57 EnumerateLayersType fpEnumerateLayers = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglEnumerateLayers");
58 nextTable.EnumerateLayers = fpEnumerateLayers;
59 GetDeviceQueueType fpGetDeviceQueue = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetDeviceQueue");
60 nextTable.GetDeviceQueue = fpGetDeviceQueue;
61 QueueSubmitType fpQueueSubmit = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglQueueSubmit");
62 nextTable.QueueSubmit = fpQueueSubmit;
63 QueueSetGlobalMemReferencesType fpQueueSetGlobalMemReferences = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglQueueSetGlobalMemReferences");
64 nextTable.QueueSetGlobalMemReferences = fpQueueSetGlobalMemReferences;
65 QueueWaitIdleType fpQueueWaitIdle = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglQueueWaitIdle");
66 nextTable.QueueWaitIdle = fpQueueWaitIdle;
67 DeviceWaitIdleType fpDeviceWaitIdle = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDeviceWaitIdle");
68 nextTable.DeviceWaitIdle = fpDeviceWaitIdle;
69 GetMemoryHeapCountType fpGetMemoryHeapCount = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetMemoryHeapCount");
70 nextTable.GetMemoryHeapCount = fpGetMemoryHeapCount;
71 GetMemoryHeapInfoType fpGetMemoryHeapInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetMemoryHeapInfo");
72 nextTable.GetMemoryHeapInfo = fpGetMemoryHeapInfo;
73 AllocMemoryType fpAllocMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAllocMemory");
74 nextTable.AllocMemory = fpAllocMemory;
75 FreeMemoryType fpFreeMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglFreeMemory");
76 nextTable.FreeMemory = fpFreeMemory;
77 SetMemoryPriorityType fpSetMemoryPriority = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglSetMemoryPriority");
78 nextTable.SetMemoryPriority = fpSetMemoryPriority;
79 MapMemoryType fpMapMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglMapMemory");
80 nextTable.MapMemory = fpMapMemory;
81 UnmapMemoryType fpUnmapMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglUnmapMemory");
82 nextTable.UnmapMemory = fpUnmapMemory;
83 PinSystemMemoryType fpPinSystemMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglPinSystemMemory");
84 nextTable.PinSystemMemory = fpPinSystemMemory;
85 RemapVirtualMemoryPagesType fpRemapVirtualMemoryPages = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglRemapVirtualMemoryPages");
86 nextTable.RemapVirtualMemoryPages = fpRemapVirtualMemoryPages;
87 GetMultiGpuCompatibilityType fpGetMultiGpuCompatibility = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetMultiGpuCompatibility");
88 nextTable.GetMultiGpuCompatibility = fpGetMultiGpuCompatibility;
89 OpenSharedMemoryType fpOpenSharedMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenSharedMemory");
90 nextTable.OpenSharedMemory = fpOpenSharedMemory;
91 OpenSharedQueueSemaphoreType fpOpenSharedQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenSharedQueueSemaphore");
92 nextTable.OpenSharedQueueSemaphore = fpOpenSharedQueueSemaphore;
93 OpenPeerMemoryType fpOpenPeerMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenPeerMemory");
94 nextTable.OpenPeerMemory = fpOpenPeerMemory;
95 OpenPeerImageType fpOpenPeerImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenPeerImage");
96 nextTable.OpenPeerImage = fpOpenPeerImage;
97 DestroyObjectType fpDestroyObject = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDestroyObject");
98 nextTable.DestroyObject = fpDestroyObject;
99 GetObjectInfoType fpGetObjectInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetObjectInfo");
100 nextTable.GetObjectInfo = fpGetObjectInfo;
101 BindObjectMemoryType fpBindObjectMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglBindObjectMemory");
102 nextTable.BindObjectMemory = fpBindObjectMemory;
103 CreateFenceType fpCreateFence = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateFence");
104 nextTable.CreateFence = fpCreateFence;
105 GetFenceStatusType fpGetFenceStatus = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetFenceStatus");
106 nextTable.GetFenceStatus = fpGetFenceStatus;
107 WaitForFencesType fpWaitForFences = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWaitForFences");
108 nextTable.WaitForFences = fpWaitForFences;
109 CreateQueueSemaphoreType fpCreateQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateQueueSemaphore");
110 nextTable.CreateQueueSemaphore = fpCreateQueueSemaphore;
111 SignalQueueSemaphoreType fpSignalQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglSignalQueueSemaphore");
112 nextTable.SignalQueueSemaphore = fpSignalQueueSemaphore;
113 WaitQueueSemaphoreType fpWaitQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWaitQueueSemaphore");
114 nextTable.WaitQueueSemaphore = fpWaitQueueSemaphore;
115 CreateEventType fpCreateEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateEvent");
116 nextTable.CreateEvent = fpCreateEvent;
117 GetEventStatusType fpGetEventStatus = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetEventStatus");
118 nextTable.GetEventStatus = fpGetEventStatus;
119 SetEventType fpSetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglSetEvent");
120 nextTable.SetEvent = fpSetEvent;
121 ResetEventType fpResetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglResetEvent");
122 nextTable.ResetEvent = fpResetEvent;
123 CreateQueryPoolType fpCreateQueryPool = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateQueryPool");
124 nextTable.CreateQueryPool = fpCreateQueryPool;
125 GetQueryPoolResultsType fpGetQueryPoolResults = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetQueryPoolResults");
126 nextTable.GetQueryPoolResults = fpGetQueryPoolResults;
127 GetFormatInfoType fpGetFormatInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetFormatInfo");
128 nextTable.GetFormatInfo = fpGetFormatInfo;
129 CreateImageType fpCreateImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateImage");
130 nextTable.CreateImage = fpCreateImage;
131 GetImageSubresourceInfoType fpGetImageSubresourceInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetImageSubresourceInfo");
132 nextTable.GetImageSubresourceInfo = fpGetImageSubresourceInfo;
133 CreateImageViewType fpCreateImageView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateImageView");
134 nextTable.CreateImageView = fpCreateImageView;
135 CreateColorAttachmentViewType fpCreateColorAttachmentView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateColorAttachmentView");
136 nextTable.CreateColorAttachmentView = fpCreateColorAttachmentView;
137 CreateDepthStencilViewType fpCreateDepthStencilView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDepthStencilView");
138 nextTable.CreateDepthStencilView = fpCreateDepthStencilView;
139 CreateShaderType fpCreateShader = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateShader");
140 nextTable.CreateShader = fpCreateShader;
141 CreateGraphicsPipelineType fpCreateGraphicsPipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateGraphicsPipeline");
142 nextTable.CreateGraphicsPipeline = fpCreateGraphicsPipeline;
143 CreateComputePipelineType fpCreateComputePipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateComputePipeline");
144 nextTable.CreateComputePipeline = fpCreateComputePipeline;
145 StorePipelineType fpStorePipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglStorePipeline");
146 nextTable.StorePipeline = fpStorePipeline;
147 LoadPipelineType fpLoadPipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglLoadPipeline");
148 nextTable.LoadPipeline = fpLoadPipeline;
149 CreatePipelineDeltaType fpCreatePipelineDelta = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreatePipelineDelta");
150 nextTable.CreatePipelineDelta = fpCreatePipelineDelta;
151 CreateSamplerType fpCreateSampler = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateSampler");
152 nextTable.CreateSampler = fpCreateSampler;
153 CreateDescriptorSetType fpCreateDescriptorSet = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDescriptorSet");
154 nextTable.CreateDescriptorSet = fpCreateDescriptorSet;
155 BeginDescriptorSetUpdateType fpBeginDescriptorSetUpdate = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglBeginDescriptorSetUpdate");
156 nextTable.BeginDescriptorSetUpdate = fpBeginDescriptorSetUpdate;
157 EndDescriptorSetUpdateType fpEndDescriptorSetUpdate = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglEndDescriptorSetUpdate");
158 nextTable.EndDescriptorSetUpdate = fpEndDescriptorSetUpdate;
159 AttachSamplerDescriptorsType fpAttachSamplerDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachSamplerDescriptors");
160 nextTable.AttachSamplerDescriptors = fpAttachSamplerDescriptors;
161 AttachImageViewDescriptorsType fpAttachImageViewDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachImageViewDescriptors");
162 nextTable.AttachImageViewDescriptors = fpAttachImageViewDescriptors;
163 AttachMemoryViewDescriptorsType fpAttachMemoryViewDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachMemoryViewDescriptors");
164 nextTable.AttachMemoryViewDescriptors = fpAttachMemoryViewDescriptors;
165 AttachNestedDescriptorsType fpAttachNestedDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachNestedDescriptors");
166 nextTable.AttachNestedDescriptors = fpAttachNestedDescriptors;
167 ClearDescriptorSetSlotsType fpClearDescriptorSetSlots = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglClearDescriptorSetSlots");
168 nextTable.ClearDescriptorSetSlots = fpClearDescriptorSetSlots;
169 CreateViewportStateType fpCreateViewportState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateViewportState");
170 nextTable.CreateViewportState = fpCreateViewportState;
171 CreateRasterStateType fpCreateRasterState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateRasterState");
172 nextTable.CreateRasterState = fpCreateRasterState;
173 CreateMsaaStateType fpCreateMsaaState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateMsaaState");
174 nextTable.CreateMsaaState = fpCreateMsaaState;
175 CreateColorBlendStateType fpCreateColorBlendState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateColorBlendState");
176 nextTable.CreateColorBlendState = fpCreateColorBlendState;
177 CreateDepthStencilStateType fpCreateDepthStencilState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDepthStencilState");
178 nextTable.CreateDepthStencilState = fpCreateDepthStencilState;
179 CreateCommandBufferType fpCreateCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateCommandBuffer");
180 nextTable.CreateCommandBuffer = fpCreateCommandBuffer;
181 BeginCommandBufferType fpBeginCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglBeginCommandBuffer");
182 nextTable.BeginCommandBuffer = fpBeginCommandBuffer;
183 EndCommandBufferType fpEndCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglEndCommandBuffer");
184 nextTable.EndCommandBuffer = fpEndCommandBuffer;
185 ResetCommandBufferType fpResetCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglResetCommandBuffer");
186 nextTable.ResetCommandBuffer = fpResetCommandBuffer;
187 CmdBindPipelineType fpCmdBindPipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindPipeline");
188 nextTable.CmdBindPipeline = fpCmdBindPipeline;
189 CmdBindPipelineDeltaType fpCmdBindPipelineDelta = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindPipelineDelta");
190 nextTable.CmdBindPipelineDelta = fpCmdBindPipelineDelta;
191 CmdBindStateObjectType fpCmdBindStateObject = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindStateObject");
192 nextTable.CmdBindStateObject = fpCmdBindStateObject;
193 CmdBindDescriptorSetType fpCmdBindDescriptorSet = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindDescriptorSet");
194 nextTable.CmdBindDescriptorSet = fpCmdBindDescriptorSet;
195 CmdBindDynamicMemoryViewType fpCmdBindDynamicMemoryView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindDynamicMemoryView");
196 nextTable.CmdBindDynamicMemoryView = fpCmdBindDynamicMemoryView;
197 CmdBindIndexDataType fpCmdBindIndexData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindIndexData");
198 nextTable.CmdBindIndexData = fpCmdBindIndexData;
199 CmdBindAttachmentsType fpCmdBindAttachments = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindAttachments");
200 nextTable.CmdBindAttachments = fpCmdBindAttachments;
201 CmdPrepareMemoryRegionsType fpCmdPrepareMemoryRegions = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdPrepareMemoryRegions");
202 nextTable.CmdPrepareMemoryRegions = fpCmdPrepareMemoryRegions;
203 CmdPrepareImagesType fpCmdPrepareImages = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdPrepareImages");
204 nextTable.CmdPrepareImages = fpCmdPrepareImages;
205 CmdDrawType fpCmdDraw = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDraw");
206 nextTable.CmdDraw = fpCmdDraw;
207 CmdDrawIndexedType fpCmdDrawIndexed = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDrawIndexed");
208 nextTable.CmdDrawIndexed = fpCmdDrawIndexed;
209 CmdDrawIndirectType fpCmdDrawIndirect = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDrawIndirect");
210 nextTable.CmdDrawIndirect = fpCmdDrawIndirect;
211 CmdDrawIndexedIndirectType fpCmdDrawIndexedIndirect = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDrawIndexedIndirect");
212 nextTable.CmdDrawIndexedIndirect = fpCmdDrawIndexedIndirect;
213 CmdDispatchType fpCmdDispatch = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDispatch");
214 nextTable.CmdDispatch = fpCmdDispatch;
215 CmdDispatchIndirectType fpCmdDispatchIndirect = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDispatchIndirect");
216 nextTable.CmdDispatchIndirect = fpCmdDispatchIndirect;
217 CmdCopyMemoryType fpCmdCopyMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyMemory");
218 nextTable.CmdCopyMemory = fpCmdCopyMemory;
219 CmdCopyImageType fpCmdCopyImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyImage");
220 nextTable.CmdCopyImage = fpCmdCopyImage;
221 CmdCopyMemoryToImageType fpCmdCopyMemoryToImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyMemoryToImage");
222 nextTable.CmdCopyMemoryToImage = fpCmdCopyMemoryToImage;
223 CmdCopyImageToMemoryType fpCmdCopyImageToMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyImageToMemory");
224 nextTable.CmdCopyImageToMemory = fpCmdCopyImageToMemory;
225 CmdCloneImageDataType fpCmdCloneImageData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCloneImageData");
226 nextTable.CmdCloneImageData = fpCmdCloneImageData;
227 CmdUpdateMemoryType fpCmdUpdateMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdUpdateMemory");
228 nextTable.CmdUpdateMemory = fpCmdUpdateMemory;
229 CmdFillMemoryType fpCmdFillMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdFillMemory");
230 nextTable.CmdFillMemory = fpCmdFillMemory;
231 CmdClearColorImageType fpCmdClearColorImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdClearColorImage");
232 nextTable.CmdClearColorImage = fpCmdClearColorImage;
233 CmdClearColorImageRawType fpCmdClearColorImageRaw = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdClearColorImageRaw");
234 nextTable.CmdClearColorImageRaw = fpCmdClearColorImageRaw;
235 CmdClearDepthStencilType fpCmdClearDepthStencil = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdClearDepthStencil");
236 nextTable.CmdClearDepthStencil = fpCmdClearDepthStencil;
237 CmdResolveImageType fpCmdResolveImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdResolveImage");
238 nextTable.CmdResolveImage = fpCmdResolveImage;
239 CmdSetEventType fpCmdSetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdSetEvent");
240 nextTable.CmdSetEvent = fpCmdSetEvent;
241 CmdResetEventType fpCmdResetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdResetEvent");
242 nextTable.CmdResetEvent = fpCmdResetEvent;
243 CmdMemoryAtomicType fpCmdMemoryAtomic = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdMemoryAtomic");
244 nextTable.CmdMemoryAtomic = fpCmdMemoryAtomic;
245 CmdBeginQueryType fpCmdBeginQuery = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBeginQuery");
246 nextTable.CmdBeginQuery = fpCmdBeginQuery;
247 CmdEndQueryType fpCmdEndQuery = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdEndQuery");
248 nextTable.CmdEndQuery = fpCmdEndQuery;
249 CmdResetQueryPoolType fpCmdResetQueryPool = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdResetQueryPool");
250 nextTable.CmdResetQueryPool = fpCmdResetQueryPool;
251 CmdWriteTimestampType fpCmdWriteTimestamp = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdWriteTimestamp");
252 nextTable.CmdWriteTimestamp = fpCmdWriteTimestamp;
253 CmdInitAtomicCountersType fpCmdInitAtomicCounters = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdInitAtomicCounters");
254 nextTable.CmdInitAtomicCounters = fpCmdInitAtomicCounters;
255 CmdLoadAtomicCountersType fpCmdLoadAtomicCounters = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdLoadAtomicCounters");
256 nextTable.CmdLoadAtomicCounters = fpCmdLoadAtomicCounters;
257 CmdSaveAtomicCountersType fpCmdSaveAtomicCounters = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdSaveAtomicCounters");
258 nextTable.CmdSaveAtomicCounters = fpCmdSaveAtomicCounters;
259 DbgSetValidationLevelType fpDbgSetValidationLevel = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetValidationLevel");
260 nextTable.DbgSetValidationLevel = fpDbgSetValidationLevel;
261 DbgRegisterMsgCallbackType fpDbgRegisterMsgCallback = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgRegisterMsgCallback");
262 nextTable.DbgRegisterMsgCallback = fpDbgRegisterMsgCallback;
263 DbgUnregisterMsgCallbackType fpDbgUnregisterMsgCallback = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgUnregisterMsgCallback");
264 nextTable.DbgUnregisterMsgCallback = fpDbgUnregisterMsgCallback;
265 DbgSetMessageFilterType fpDbgSetMessageFilter = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetMessageFilter");
266 nextTable.DbgSetMessageFilter = fpDbgSetMessageFilter;
267 DbgSetObjectTagType fpDbgSetObjectTag = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetObjectTag");
268 nextTable.DbgSetObjectTag = fpDbgSetObjectTag;
269 DbgSetGlobalOptionType fpDbgSetGlobalOption = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetGlobalOption");
270 nextTable.DbgSetGlobalOption = fpDbgSetGlobalOption;
271 DbgSetDeviceOptionType fpDbgSetDeviceOption = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetDeviceOption");
272 nextTable.DbgSetDeviceOption = fpDbgSetDeviceOption;
273 CmdDbgMarkerBeginType fpCmdDbgMarkerBegin = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDbgMarkerBegin");
274 nextTable.CmdDbgMarkerBegin = fpCmdDbgMarkerBegin;
275 CmdDbgMarkerEndType fpCmdDbgMarkerEnd = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDbgMarkerEnd");
276 nextTable.CmdDbgMarkerEnd = fpCmdDbgMarkerEnd;
277 WsiX11AssociateConnectionType fpWsiX11AssociateConnection = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11AssociateConnection");
278 nextTable.WsiX11AssociateConnection = fpWsiX11AssociateConnection;
279 WsiX11GetMSCType fpWsiX11GetMSC = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11GetMSC");
280 nextTable.WsiX11GetMSC = fpWsiX11GetMSC;
281 WsiX11CreatePresentableImageType fpWsiX11CreatePresentableImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11CreatePresentableImage");
282 nextTable.WsiX11CreatePresentableImage = fpWsiX11CreatePresentableImage;
283 WsiX11QueuePresentType fpWsiX11QueuePresent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11QueuePresent");
284 nextTable.WsiX11QueuePresent = fpWsiX11QueuePresent;
285}
286
287
288XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetGpuInfo(XGL_PHYSICAL_GPU gpu, XGL_PHYSICAL_GPU_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
289{
290 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600291 pCurObj = gpuw;
292 pthread_once(&tabOnce, initLayerTable);
293 XGL_RESULT result = nextTable.GetGpuInfo((XGL_PHYSICAL_GPU)gpuw->nextObject, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600294 printf("xglGetGpuInfo(gpu = %p, infoType = %s, pDataSize = %i, pData = %p) = %s\n", (void*)gpu, string_XGL_PHYSICAL_GPU_INFO_TYPE(infoType), *pDataSize, (void*)pData, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600295 return result;
296}
297
298XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDevice(XGL_PHYSICAL_GPU gpu, const XGL_DEVICE_CREATE_INFO* pCreateInfo, XGL_DEVICE* pDevice)
299{
300 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600301 pCurObj = gpuw;
302 pthread_once(&tabOnce, initLayerTable);
303 XGL_RESULT result = nextTable.CreateDevice((XGL_PHYSICAL_GPU)gpuw->nextObject, pCreateInfo, pDevice);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600304 printf("xglCreateDevice(gpu = %p, pCreateInfo = %p, pDevice = %p) = %s\n", (void*)gpu, (void*)pCreateInfo, (void*)*pDevice, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600305 char *pTmpStr;
306 if (pCreateInfo) {
307 pTmpStr = xgl_print_xgl_device_create_info(pCreateInfo, " ");
308 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
309 free(pTmpStr);
310 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600311 return result;
312}
313
314XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDestroyDevice(XGL_DEVICE device)
315{
316 XGL_RESULT result = nextTable.DestroyDevice(device);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600317 printf("xglDestroyDevice(device = %p) = %s\n", (void*)device, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600318 return result;
319}
320
321XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetExtensionSupport(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* pExtName)
322{
323 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600324 pCurObj = gpuw;
325 pthread_once(&tabOnce, initLayerTable);
326 XGL_RESULT result = nextTable.GetExtensionSupport((XGL_PHYSICAL_GPU)gpuw->nextObject, pExtName);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600327 printf("xglGetExtensionSupport(gpu = %p, pExtName = %p) = %s\n", (void*)gpu, (void*)pExtName, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600328 return result;
329}
330
331XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglEnumerateLayers(XGL_PHYSICAL_GPU gpu, XGL_SIZE maxLayerCount, XGL_SIZE maxStringSize, XGL_CHAR* const* pOutLayers, XGL_SIZE * pOutLayerCount)
332{
333 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600334 pCurObj = gpuw;
335 pthread_once(&tabOnce, initLayerTable);
336 XGL_RESULT result = nextTable.EnumerateLayers((XGL_PHYSICAL_GPU)gpuw->nextObject, maxLayerCount, maxStringSize, pOutLayers, pOutLayerCount);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600337 printf("xglEnumerateLayers(gpu = %p, maxLayerCount = %i, maxStringSize = %i, pOutLayers = %p, pOutLayerCount = %i) = %s\n", (void*)gpu, maxLayerCount, maxStringSize, (void*)pOutLayers, *pOutLayerCount, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600338 return result;
339}
340
341XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetDeviceQueue(XGL_DEVICE device, XGL_QUEUE_TYPE queueType, XGL_UINT queueIndex, XGL_QUEUE* pQueue)
342{
343 XGL_RESULT result = nextTable.GetDeviceQueue(device, queueType, queueIndex, pQueue);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600344 printf("xglGetDeviceQueue(device = %p, queueType = %s, queueIndex = %i, pQueue = %p) = %s\n", (void*)device, string_XGL_QUEUE_TYPE(queueType), queueIndex, (void*)pQueue, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600345 return result;
346}
347
348XGL_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)
349{
350 XGL_RESULT result = nextTable.QueueSubmit(queue, cmdBufferCount, pCmdBuffers, memRefCount, pMemRefs, fence);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600351 printf("xglQueueSubmit(queue = %p, cmdBufferCount = %i, pCmdBuffers = %p, memRefCount = %i, pMemRefs = %p, fence = %p) = %s\n", (void*)queue, cmdBufferCount, (void*)pCmdBuffers, memRefCount, (void*)pMemRefs, (void*)fence, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600352 char *pTmpStr;
353 if (pMemRefs) {
354 pTmpStr = xgl_print_xgl_memory_ref(pMemRefs, " ");
355 printf(" pMemRefs (%p)\n%s\n", (void*)pMemRefs, pTmpStr);
356 free(pTmpStr);
357 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600358 return result;
359}
360
361XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglQueueSetGlobalMemReferences(XGL_QUEUE queue, XGL_UINT memRefCount, const XGL_MEMORY_REF* pMemRefs)
362{
363 XGL_RESULT result = nextTable.QueueSetGlobalMemReferences(queue, memRefCount, pMemRefs);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600364 printf("xglQueueSetGlobalMemReferences(queue = %p, memRefCount = %i, pMemRefs = %p) = %s\n", (void*)queue, memRefCount, (void*)pMemRefs, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600365 char *pTmpStr;
366 if (pMemRefs) {
367 pTmpStr = xgl_print_xgl_memory_ref(pMemRefs, " ");
368 printf(" pMemRefs (%p)\n%s\n", (void*)pMemRefs, pTmpStr);
369 free(pTmpStr);
370 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600371 return result;
372}
373
374XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglQueueWaitIdle(XGL_QUEUE queue)
375{
376 XGL_RESULT result = nextTable.QueueWaitIdle(queue);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600377 printf("xglQueueWaitIdle(queue = %p) = %s\n", (void*)queue, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600378 return result;
379}
380
381XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDeviceWaitIdle(XGL_DEVICE device)
382{
383 XGL_RESULT result = nextTable.DeviceWaitIdle(device);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600384 printf("xglDeviceWaitIdle(device = %p) = %s\n", (void*)device, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600385 return result;
386}
387
388XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetMemoryHeapCount(XGL_DEVICE device, XGL_UINT* pCount)
389{
390 XGL_RESULT result = nextTable.GetMemoryHeapCount(device, pCount);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600391 printf("xglGetMemoryHeapCount(device = %p, pCount = %i) = %s\n", (void*)device, *pCount, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600392 return result;
393}
394
395XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetMemoryHeapInfo(XGL_DEVICE device, XGL_UINT heapId, XGL_MEMORY_HEAP_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
396{
397 XGL_RESULT result = nextTable.GetMemoryHeapInfo(device, heapId, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600398 printf("xglGetMemoryHeapInfo(device = %p, heapId = %i, infoType = %s, pDataSize = %i, pData = %p) = %s\n", (void*)device, heapId, string_XGL_MEMORY_HEAP_INFO_TYPE(infoType), *pDataSize, (void*)pData, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600399 return result;
400}
401
402XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglAllocMemory(XGL_DEVICE device, const XGL_MEMORY_ALLOC_INFO* pAllocInfo, XGL_GPU_MEMORY* pMem)
403{
404 XGL_RESULT result = nextTable.AllocMemory(device, pAllocInfo, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600405 printf("xglAllocMemory(device = %p, pAllocInfo = %p, pMem = %p) = %s\n", (void*)device, (void*)pAllocInfo, (void*)pMem, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600406 char *pTmpStr;
407 if (pAllocInfo) {
408 pTmpStr = xgl_print_xgl_memory_alloc_info(pAllocInfo, " ");
409 printf(" pAllocInfo (%p)\n%s\n", (void*)pAllocInfo, pTmpStr);
410 free(pTmpStr);
411 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600412 return result;
413}
414
415XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglFreeMemory(XGL_GPU_MEMORY mem)
416{
417 XGL_RESULT result = nextTable.FreeMemory(mem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600418 printf("xglFreeMemory(mem = %p) = %s\n", (void*)mem, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600419 return result;
420}
421
422XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglSetMemoryPriority(XGL_GPU_MEMORY mem, XGL_MEMORY_PRIORITY priority)
423{
424 XGL_RESULT result = nextTable.SetMemoryPriority(mem, priority);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600425 printf("xglSetMemoryPriority(mem = %p, priority = %p) = %s\n", (void*)mem, (void*)priority, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600426 return result;
427}
428
429XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglMapMemory(XGL_GPU_MEMORY mem, XGL_FLAGS flags, XGL_VOID** ppData)
430{
431 XGL_RESULT result = nextTable.MapMemory(mem, flags, ppData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600432 printf("xglMapMemory(mem = %p, flags = %i, ppData = %p) = %s\n", (void*)mem, flags, (void*)ppData, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600433 return result;
434}
435
436XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglUnmapMemory(XGL_GPU_MEMORY mem)
437{
438 XGL_RESULT result = nextTable.UnmapMemory(mem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600439 printf("xglUnmapMemory(mem = %p) = %s\n", (void*)mem, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600440 return result;
441}
442
443XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglPinSystemMemory(XGL_DEVICE device, const XGL_VOID* pSysMem, XGL_SIZE memSize, XGL_GPU_MEMORY* pMem)
444{
445 XGL_RESULT result = nextTable.PinSystemMemory(device, pSysMem, memSize, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600446 printf("xglPinSystemMemory(device = %p, pSysMem = %p, memSize = %i, pMem = %p) = %s\n", (void*)device, (void*)pSysMem, memSize, (void*)pMem, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600447 return result;
448}
449
450XGL_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)
451{
452 XGL_RESULT result = nextTable.RemapVirtualMemoryPages(device, rangeCount, pRanges, preWaitSemaphoreCount, pPreWaitSemaphores, postSignalSemaphoreCount, pPostSignalSemaphores);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600453 printf("xglRemapVirtualMemoryPages(device = %p, rangeCount = %i, pRanges = %p, preWaitSemaphoreCount = %i, pPreWaitSemaphores = %p, postSignalSemaphoreCount = %i, pPostSignalSemaphores = %p) = %s\n", (void*)device, rangeCount, (void*)pRanges, preWaitSemaphoreCount, (void*)pPreWaitSemaphores, postSignalSemaphoreCount, (void*)pPostSignalSemaphores, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600454 char *pTmpStr;
455 if (pRanges) {
456 pTmpStr = xgl_print_xgl_virtual_memory_remap_range(pRanges, " ");
457 printf(" pRanges (%p)\n%s\n", (void*)pRanges, pTmpStr);
458 free(pTmpStr);
459 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600460 return result;
461}
462
463XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetMultiGpuCompatibility(XGL_PHYSICAL_GPU gpu0, XGL_PHYSICAL_GPU gpu1, XGL_GPU_COMPATIBILITY_INFO* pInfo)
464{
465 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu0;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600466 pCurObj = gpuw;
467 pthread_once(&tabOnce, initLayerTable);
468 XGL_RESULT result = nextTable.GetMultiGpuCompatibility((XGL_PHYSICAL_GPU)gpuw->nextObject, gpu1, pInfo);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600469 printf("xglGetMultiGpuCompatibility(gpu0 = %p, gpu1 = %p, pInfo = %p) = %s\n", (void*)gpu0, (void*)gpu1, (void*)pInfo, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600470 return result;
471}
472
473XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenSharedMemory(XGL_DEVICE device, const XGL_MEMORY_OPEN_INFO* pOpenInfo, XGL_GPU_MEMORY* pMem)
474{
475 XGL_RESULT result = nextTable.OpenSharedMemory(device, pOpenInfo, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600476 printf("xglOpenSharedMemory(device = %p, pOpenInfo = %p, pMem = %p) = %s\n", (void*)device, (void*)pOpenInfo, (void*)pMem, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600477 char *pTmpStr;
478 if (pOpenInfo) {
479 pTmpStr = xgl_print_xgl_memory_open_info(pOpenInfo, " ");
480 printf(" pOpenInfo (%p)\n%s\n", (void*)pOpenInfo, pTmpStr);
481 free(pTmpStr);
482 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600483 return result;
484}
485
486XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenSharedQueueSemaphore(XGL_DEVICE device, const XGL_QUEUE_SEMAPHORE_OPEN_INFO* pOpenInfo, XGL_QUEUE_SEMAPHORE* pSemaphore)
487{
488 XGL_RESULT result = nextTable.OpenSharedQueueSemaphore(device, pOpenInfo, pSemaphore);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600489 printf("xglOpenSharedQueueSemaphore(device = %p, pOpenInfo = %p, pSemaphore = %p) = %s\n", (void*)device, (void*)pOpenInfo, (void*)pSemaphore, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600490 return result;
491}
492
493XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenPeerMemory(XGL_DEVICE device, const XGL_PEER_MEMORY_OPEN_INFO* pOpenInfo, XGL_GPU_MEMORY* pMem)
494{
495 XGL_RESULT result = nextTable.OpenPeerMemory(device, pOpenInfo, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600496 printf("xglOpenPeerMemory(device = %p, pOpenInfo = %p, pMem = %p) = %s\n", (void*)device, (void*)pOpenInfo, (void*)pMem, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600497 char *pTmpStr;
498 if (pOpenInfo) {
499 pTmpStr = xgl_print_xgl_peer_memory_open_info(pOpenInfo, " ");
500 printf(" pOpenInfo (%p)\n%s\n", (void*)pOpenInfo, pTmpStr);
501 free(pTmpStr);
502 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600503 return result;
504}
505
506XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenPeerImage(XGL_DEVICE device, const XGL_PEER_IMAGE_OPEN_INFO* pOpenInfo, XGL_IMAGE* pImage, XGL_GPU_MEMORY* pMem)
507{
508 XGL_RESULT result = nextTable.OpenPeerImage(device, pOpenInfo, pImage, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600509 printf("xglOpenPeerImage(device = %p, pOpenInfo = %p, pImage = %p, pMem = %p) = %s\n", (void*)device, (void*)pOpenInfo, (void*)pImage, (void*)pMem, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600510 char *pTmpStr;
511 if (pOpenInfo) {
512 pTmpStr = xgl_print_xgl_peer_image_open_info(pOpenInfo, " ");
513 printf(" pOpenInfo (%p)\n%s\n", (void*)pOpenInfo, pTmpStr);
514 free(pTmpStr);
515 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600516 return result;
517}
518
519XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDestroyObject(XGL_OBJECT object)
520{
521 XGL_RESULT result = nextTable.DestroyObject(object);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600522 printf("xglDestroyObject(object = %p) = %s\n", (void*)object, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600523 return result;
524}
525
526XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetObjectInfo(XGL_BASE_OBJECT object, XGL_OBJECT_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
527{
528 XGL_RESULT result = nextTable.GetObjectInfo(object, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600529 printf("xglGetObjectInfo(object = %p, infoType = %s, pDataSize = %i, pData = %p) = %s\n", (void*)object, string_XGL_OBJECT_INFO_TYPE(infoType), *pDataSize, (void*)pData, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600530 return result;
531}
532
533XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglBindObjectMemory(XGL_OBJECT object, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset)
534{
535 XGL_RESULT result = nextTable.BindObjectMemory(object, mem, offset);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600536 printf("xglBindObjectMemory(object = %p, mem = %p, offset = %i) = %s\n", (void*)object, (void*)mem, offset, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600537 return result;
538}
539
540XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateFence(XGL_DEVICE device, const XGL_FENCE_CREATE_INFO* pCreateInfo, XGL_FENCE* pFence)
541{
542 XGL_RESULT result = nextTable.CreateFence(device, pCreateInfo, pFence);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600543 printf("xglCreateFence(device = %p, pCreateInfo = %p, pFence = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pFence, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600544 char *pTmpStr;
545 if (pCreateInfo) {
546 pTmpStr = xgl_print_xgl_fence_create_info(pCreateInfo, " ");
547 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
548 free(pTmpStr);
549 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600550 return result;
551}
552
553XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetFenceStatus(XGL_FENCE fence)
554{
555 XGL_RESULT result = nextTable.GetFenceStatus(fence);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600556 printf("xglGetFenceStatus(fence = %p) = %s\n", (void*)fence, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600557 return result;
558}
559
560XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWaitForFences(XGL_DEVICE device, XGL_UINT fenceCount, const XGL_FENCE* pFences, XGL_BOOL waitAll, XGL_UINT64 timeout)
561{
562 XGL_RESULT result = nextTable.WaitForFences(device, fenceCount, pFences, waitAll, timeout);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600563 printf("xglWaitForFences(device = %p, fenceCount = %i, pFences = %p, waitAll = %u, timeout = %lu) = %s\n", (void*)device, fenceCount, (void*)pFences, waitAll, timeout, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600564 return result;
565}
566
567XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateQueueSemaphore(XGL_DEVICE device, const XGL_QUEUE_SEMAPHORE_CREATE_INFO* pCreateInfo, XGL_QUEUE_SEMAPHORE* pSemaphore)
568{
569 XGL_RESULT result = nextTable.CreateQueueSemaphore(device, pCreateInfo, pSemaphore);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600570 printf("xglCreateQueueSemaphore(device = %p, pCreateInfo = %p, pSemaphore = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pSemaphore, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600571 char *pTmpStr;
572 if (pCreateInfo) {
573 pTmpStr = xgl_print_xgl_queue_semaphore_create_info(pCreateInfo, " ");
574 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
575 free(pTmpStr);
576 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600577 return result;
578}
579
580XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglSignalQueueSemaphore(XGL_QUEUE queue, XGL_QUEUE_SEMAPHORE semaphore)
581{
582 XGL_RESULT result = nextTable.SignalQueueSemaphore(queue, semaphore);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600583 printf("xglSignalQueueSemaphore(queue = %p, semaphore = %p) = %s\n", (void*)queue, (void*)semaphore, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600584 return result;
585}
586
587XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWaitQueueSemaphore(XGL_QUEUE queue, XGL_QUEUE_SEMAPHORE semaphore)
588{
589 XGL_RESULT result = nextTable.WaitQueueSemaphore(queue, semaphore);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600590 printf("xglWaitQueueSemaphore(queue = %p, semaphore = %p) = %s\n", (void*)queue, (void*)semaphore, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600591 return result;
592}
593
594XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateEvent(XGL_DEVICE device, const XGL_EVENT_CREATE_INFO* pCreateInfo, XGL_EVENT* pEvent)
595{
596 XGL_RESULT result = nextTable.CreateEvent(device, pCreateInfo, pEvent);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600597 printf("xglCreateEvent(device = %p, pCreateInfo = %p, pEvent = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pEvent, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600598 char *pTmpStr;
599 if (pCreateInfo) {
600 pTmpStr = xgl_print_xgl_event_create_info(pCreateInfo, " ");
601 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
602 free(pTmpStr);
603 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600604 return result;
605}
606
607XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetEventStatus(XGL_EVENT event)
608{
609 XGL_RESULT result = nextTable.GetEventStatus(event);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600610 printf("xglGetEventStatus(event = %p) = %s\n", (void*)event, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600611 return result;
612}
613
614XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglSetEvent(XGL_EVENT event)
615{
616 XGL_RESULT result = nextTable.SetEvent(event);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600617 printf("xglSetEvent(event = %p) = %s\n", (void*)event, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600618 return result;
619}
620
621XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglResetEvent(XGL_EVENT event)
622{
623 XGL_RESULT result = nextTable.ResetEvent(event);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600624 printf("xglResetEvent(event = %p) = %s\n", (void*)event, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600625 return result;
626}
627
628XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateQueryPool(XGL_DEVICE device, const XGL_QUERY_POOL_CREATE_INFO* pCreateInfo, XGL_QUERY_POOL* pQueryPool)
629{
630 XGL_RESULT result = nextTable.CreateQueryPool(device, pCreateInfo, pQueryPool);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600631 printf("xglCreateQueryPool(device = %p, pCreateInfo = %p, pQueryPool = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pQueryPool, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600632 char *pTmpStr;
633 if (pCreateInfo) {
634 pTmpStr = xgl_print_xgl_query_pool_create_info(pCreateInfo, " ");
635 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
636 free(pTmpStr);
637 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600638 return result;
639}
640
641XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetQueryPoolResults(XGL_QUERY_POOL queryPool, XGL_UINT startQuery, XGL_UINT queryCount, XGL_SIZE* pDataSize, XGL_VOID* pData)
642{
643 XGL_RESULT result = nextTable.GetQueryPoolResults(queryPool, startQuery, queryCount, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600644 printf("xglGetQueryPoolResults(queryPool = %p, startQuery = %i, queryCount = %i, pDataSize = %i, pData = %p) = %s\n", (void*)queryPool, startQuery, queryCount, *pDataSize, (void*)pData, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600645 return result;
646}
647
648XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetFormatInfo(XGL_DEVICE device, XGL_FORMAT format, XGL_FORMAT_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
649{
650 XGL_RESULT result = nextTable.GetFormatInfo(device, format, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600651 printf("xglGetFormatInfo(device = %p, format.channelFormat = %s, format.numericFormat = %s, infoType = %i, pDataSize = %i, pData = %p) = %s\n", (void*)device, string_XGL_CHANNEL_FORMAT(format.channelFormat), string_XGL_NUM_FORMAT(format.numericFormat), infoType, *pDataSize, (void*)pData, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600652 return result;
653}
654
655XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateImage(XGL_DEVICE device, const XGL_IMAGE_CREATE_INFO* pCreateInfo, XGL_IMAGE* pImage)
656{
657 XGL_RESULT result = nextTable.CreateImage(device, pCreateInfo, pImage);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600658 printf("xglCreateImage(device = %p, pCreateInfo = %p, pImage = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pImage, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600659 char *pTmpStr;
660 if (pCreateInfo) {
661 pTmpStr = xgl_print_xgl_image_create_info(pCreateInfo, " ");
662 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
663 free(pTmpStr);
664 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600665 return result;
666}
667
668XGL_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)
669{
670 XGL_RESULT result = nextTable.GetImageSubresourceInfo(image, pSubresource, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600671 printf("xglGetImageSubresourceInfo(image = %p, pSubresource = %p, infoType = %s, pDataSize = %i, pData = %p) = %s\n", (void*)image, (void*)pSubresource, string_XGL_SUBRESOURCE_INFO_TYPE(infoType), *pDataSize, (void*)pData, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600672 char *pTmpStr;
673 if (pSubresource) {
674 pTmpStr = xgl_print_xgl_image_subresource(pSubresource, " ");
675 printf(" pSubresource (%p)\n%s\n", (void*)pSubresource, pTmpStr);
676 free(pTmpStr);
677 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600678 return result;
679}
680
681XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateImageView(XGL_DEVICE device, const XGL_IMAGE_VIEW_CREATE_INFO* pCreateInfo, XGL_IMAGE_VIEW* pView)
682{
683 XGL_RESULT result = nextTable.CreateImageView(device, pCreateInfo, pView);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600684 printf("xglCreateImageView(device = %p, pCreateInfo = %p, pView = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pView, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600685 char *pTmpStr;
686 if (pCreateInfo) {
687 pTmpStr = xgl_print_xgl_image_view_create_info(pCreateInfo, " ");
688 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
689 free(pTmpStr);
690 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600691 return result;
692}
693
694XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateColorAttachmentView(XGL_DEVICE device, const XGL_COLOR_ATTACHMENT_VIEW_CREATE_INFO* pCreateInfo, XGL_COLOR_ATTACHMENT_VIEW* pView)
695{
696 XGL_RESULT result = nextTable.CreateColorAttachmentView(device, pCreateInfo, pView);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600697 printf("xglCreateColorAttachmentView(device = %p, pCreateInfo = %p, pView = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pView, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600698 char *pTmpStr;
699 if (pCreateInfo) {
700 pTmpStr = xgl_print_xgl_color_attachment_view_create_info(pCreateInfo, " ");
701 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
702 free(pTmpStr);
703 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600704 return result;
705}
706
707XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDepthStencilView(XGL_DEVICE device, const XGL_DEPTH_STENCIL_VIEW_CREATE_INFO* pCreateInfo, XGL_DEPTH_STENCIL_VIEW* pView)
708{
709 XGL_RESULT result = nextTable.CreateDepthStencilView(device, pCreateInfo, pView);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600710 printf("xglCreateDepthStencilView(device = %p, pCreateInfo = %p, pView = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pView, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600711 char *pTmpStr;
712 if (pCreateInfo) {
713 pTmpStr = xgl_print_xgl_depth_stencil_view_create_info(pCreateInfo, " ");
714 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
715 free(pTmpStr);
716 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600717 return result;
718}
719
720XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateShader(XGL_DEVICE device, const XGL_SHADER_CREATE_INFO* pCreateInfo, XGL_SHADER* pShader)
721{
722 XGL_RESULT result = nextTable.CreateShader(device, pCreateInfo, pShader);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600723 printf("xglCreateShader(device = %p, pCreateInfo = %p, pShader = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pShader, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600724 char *pTmpStr;
725 if (pCreateInfo) {
726 pTmpStr = xgl_print_xgl_shader_create_info(pCreateInfo, " ");
727 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
728 free(pTmpStr);
729 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600730 return result;
731}
732
733XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateGraphicsPipeline(XGL_DEVICE device, const XGL_GRAPHICS_PIPELINE_CREATE_INFO* pCreateInfo, XGL_PIPELINE* pPipeline)
734{
735 XGL_RESULT result = nextTable.CreateGraphicsPipeline(device, pCreateInfo, pPipeline);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600736 printf("xglCreateGraphicsPipeline(device = %p, pCreateInfo = %p, pPipeline = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pPipeline, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600737 char *pTmpStr;
738 if (pCreateInfo) {
739 pTmpStr = xgl_print_xgl_graphics_pipeline_create_info(pCreateInfo, " ");
740 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
741 free(pTmpStr);
742 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600743 return result;
744}
745
746XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateComputePipeline(XGL_DEVICE device, const XGL_COMPUTE_PIPELINE_CREATE_INFO* pCreateInfo, XGL_PIPELINE* pPipeline)
747{
748 XGL_RESULT result = nextTable.CreateComputePipeline(device, pCreateInfo, pPipeline);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600749 printf("xglCreateComputePipeline(device = %p, pCreateInfo = %p, pPipeline = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pPipeline, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600750 char *pTmpStr;
751 if (pCreateInfo) {
752 pTmpStr = xgl_print_xgl_compute_pipeline_create_info(pCreateInfo, " ");
753 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
754 free(pTmpStr);
755 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600756 return result;
757}
758
759XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglStorePipeline(XGL_PIPELINE pipeline, XGL_SIZE* pDataSize, XGL_VOID* pData)
760{
761 XGL_RESULT result = nextTable.StorePipeline(pipeline, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600762 printf("xglStorePipeline(pipeline = %p, pDataSize = %i, pData = %p) = %s\n", (void*)pipeline, *pDataSize, (void*)pData, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600763 return result;
764}
765
766XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglLoadPipeline(XGL_DEVICE device, XGL_SIZE dataSize, const XGL_VOID* pData, XGL_PIPELINE* pPipeline)
767{
768 XGL_RESULT result = nextTable.LoadPipeline(device, dataSize, pData, pPipeline);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600769 printf("xglLoadPipeline(device = %p, dataSize = %i, pData = %p, pPipeline = %p) = %s\n", (void*)device, dataSize, (void*)pData, (void*)pPipeline, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600770 return result;
771}
772
773XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreatePipelineDelta(XGL_DEVICE device, XGL_PIPELINE p1, XGL_PIPELINE p2, XGL_PIPELINE_DELTA* delta)
774{
775 XGL_RESULT result = nextTable.CreatePipelineDelta(device, p1, p2, delta);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600776 printf("xglCreatePipelineDelta(device = %p, p1 = %p, p2 = %p, delta = %p) = %s\n", (void*)device, (void*)p1, (void*)p2, (void*)*delta, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600777 return result;
778}
779
780XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateSampler(XGL_DEVICE device, const XGL_SAMPLER_CREATE_INFO* pCreateInfo, XGL_SAMPLER* pSampler)
781{
782 XGL_RESULT result = nextTable.CreateSampler(device, pCreateInfo, pSampler);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600783 printf("xglCreateSampler(device = %p, pCreateInfo = %p, pSampler = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pSampler, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600784 char *pTmpStr;
785 if (pCreateInfo) {
786 pTmpStr = xgl_print_xgl_sampler_create_info(pCreateInfo, " ");
787 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
788 free(pTmpStr);
789 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600790 return result;
791}
792
793XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDescriptorSet(XGL_DEVICE device, const XGL_DESCRIPTOR_SET_CREATE_INFO* pCreateInfo, XGL_DESCRIPTOR_SET* pDescriptorSet)
794{
795 XGL_RESULT result = nextTable.CreateDescriptorSet(device, pCreateInfo, pDescriptorSet);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600796 printf("xglCreateDescriptorSet(device = %p, pCreateInfo = %p, pDescriptorSet = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pDescriptorSet, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600797 char *pTmpStr;
798 if (pCreateInfo) {
799 pTmpStr = xgl_print_xgl_descriptor_set_create_info(pCreateInfo, " ");
800 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
801 free(pTmpStr);
802 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600803 return result;
804}
805
806XGL_LAYER_EXPORT XGL_VOID XGLAPI xglBeginDescriptorSetUpdate(XGL_DESCRIPTOR_SET descriptorSet)
807{
808 nextTable.BeginDescriptorSetUpdate(descriptorSet);
809 printf("xglBeginDescriptorSetUpdate(descriptorSet = %p)\n", (void*)descriptorSet);
810}
811
812XGL_LAYER_EXPORT XGL_VOID XGLAPI xglEndDescriptorSetUpdate(XGL_DESCRIPTOR_SET descriptorSet)
813{
814 nextTable.EndDescriptorSetUpdate(descriptorSet);
815 printf("xglEndDescriptorSetUpdate(descriptorSet = %p)\n", (void*)descriptorSet);
816}
817
818XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachSamplerDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_SAMPLER* pSamplers)
819{
820 nextTable.AttachSamplerDescriptors(descriptorSet, startSlot, slotCount, pSamplers);
821 printf("xglAttachSamplerDescriptors(descriptorSet = %p, startSlot = %i, slotCount = %i, pSamplers = %p)\n", (void*)descriptorSet, startSlot, slotCount, (void*)pSamplers);
822}
823
824XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachImageViewDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_IMAGE_VIEW_ATTACH_INFO* pImageViews)
825{
826 nextTable.AttachImageViewDescriptors(descriptorSet, startSlot, slotCount, pImageViews);
827 printf("xglAttachImageViewDescriptors(descriptorSet = %p, startSlot = %i, slotCount = %i, pImageViews = %p)\n", (void*)descriptorSet, startSlot, slotCount, (void*)pImageViews);
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600828 char *pTmpStr;
829 if (pImageViews) {
830 pTmpStr = xgl_print_xgl_image_view_attach_info(pImageViews, " ");
831 printf(" pImageViews (%p)\n%s\n", (void*)pImageViews, pTmpStr);
832 free(pTmpStr);
833 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600834}
835
836XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachMemoryViewDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_MEMORY_VIEW_ATTACH_INFO* pMemViews)
837{
838 nextTable.AttachMemoryViewDescriptors(descriptorSet, startSlot, slotCount, pMemViews);
839 printf("xglAttachMemoryViewDescriptors(descriptorSet = %p, startSlot = %i, slotCount = %i, pMemViews = %p)\n", (void*)descriptorSet, startSlot, slotCount, (void*)pMemViews);
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600840 char *pTmpStr;
841 if (pMemViews) {
842 pTmpStr = xgl_print_xgl_memory_view_attach_info(pMemViews, " ");
843 printf(" pMemViews (%p)\n%s\n", (void*)pMemViews, pTmpStr);
844 free(pTmpStr);
845 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600846}
847
848XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachNestedDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_DESCRIPTOR_SET_ATTACH_INFO* pNestedDescriptorSets)
849{
850 nextTable.AttachNestedDescriptors(descriptorSet, startSlot, slotCount, pNestedDescriptorSets);
851 printf("xglAttachNestedDescriptors(descriptorSet = %p, startSlot = %i, slotCount = %i, pNestedDescriptorSets = %p)\n", (void*)descriptorSet, startSlot, slotCount, (void*)pNestedDescriptorSets);
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600852 char *pTmpStr;
853 if (pNestedDescriptorSets) {
854 pTmpStr = xgl_print_xgl_descriptor_set_attach_info(pNestedDescriptorSets, " ");
855 printf(" pNestedDescriptorSets (%p)\n%s\n", (void*)pNestedDescriptorSets, pTmpStr);
856 free(pTmpStr);
857 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600858}
859
860XGL_LAYER_EXPORT XGL_VOID XGLAPI xglClearDescriptorSetSlots(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount)
861{
862 nextTable.ClearDescriptorSetSlots(descriptorSet, startSlot, slotCount);
863 printf("xglClearDescriptorSetSlots(descriptorSet = %p, startSlot = %i, slotCount = %i)\n", (void*)descriptorSet, startSlot, slotCount);
864}
865
866XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateViewportState(XGL_DEVICE device, const XGL_VIEWPORT_STATE_CREATE_INFO* pCreateInfo, XGL_VIEWPORT_STATE_OBJECT* pState)
867{
868 XGL_RESULT result = nextTable.CreateViewportState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600869 printf("xglCreateViewportState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600870 char *pTmpStr;
871 if (pCreateInfo) {
872 pTmpStr = xgl_print_xgl_viewport_state_create_info(pCreateInfo, " ");
873 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
874 free(pTmpStr);
875 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600876 return result;
877}
878
879XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateRasterState(XGL_DEVICE device, const XGL_RASTER_STATE_CREATE_INFO* pCreateInfo, XGL_RASTER_STATE_OBJECT* pState)
880{
881 XGL_RESULT result = nextTable.CreateRasterState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600882 printf("xglCreateRasterState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600883 char *pTmpStr;
884 if (pCreateInfo) {
885 pTmpStr = xgl_print_xgl_raster_state_create_info(pCreateInfo, " ");
886 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
887 free(pTmpStr);
888 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600889 return result;
890}
891
892XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateMsaaState(XGL_DEVICE device, const XGL_MSAA_STATE_CREATE_INFO* pCreateInfo, XGL_MSAA_STATE_OBJECT* pState)
893{
894 XGL_RESULT result = nextTable.CreateMsaaState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600895 printf("xglCreateMsaaState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600896 char *pTmpStr;
897 if (pCreateInfo) {
898 pTmpStr = xgl_print_xgl_msaa_state_create_info(pCreateInfo, " ");
899 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
900 free(pTmpStr);
901 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600902 return result;
903}
904
905XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateColorBlendState(XGL_DEVICE device, const XGL_COLOR_BLEND_STATE_CREATE_INFO* pCreateInfo, XGL_COLOR_BLEND_STATE_OBJECT* pState)
906{
907 XGL_RESULT result = nextTable.CreateColorBlendState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600908 printf("xglCreateColorBlendState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600909 char *pTmpStr;
910 if (pCreateInfo) {
911 pTmpStr = xgl_print_xgl_color_blend_state_create_info(pCreateInfo, " ");
912 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
913 free(pTmpStr);
914 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600915 return result;
916}
917
918XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDepthStencilState(XGL_DEVICE device, const XGL_DEPTH_STENCIL_STATE_CREATE_INFO* pCreateInfo, XGL_DEPTH_STENCIL_STATE_OBJECT* pState)
919{
920 XGL_RESULT result = nextTable.CreateDepthStencilState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600921 printf("xglCreateDepthStencilState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600922 char *pTmpStr;
923 if (pCreateInfo) {
924 pTmpStr = xgl_print_xgl_depth_stencil_state_create_info(pCreateInfo, " ");
925 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
926 free(pTmpStr);
927 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600928 return result;
929}
930
931XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateCommandBuffer(XGL_DEVICE device, const XGL_CMD_BUFFER_CREATE_INFO* pCreateInfo, XGL_CMD_BUFFER* pCmdBuffer)
932{
933 XGL_RESULT result = nextTable.CreateCommandBuffer(device, pCreateInfo, pCmdBuffer);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600934 printf("xglCreateCommandBuffer(device = %p, pCreateInfo = %p, pCmdBuffer = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pCmdBuffer, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600935 char *pTmpStr;
936 if (pCreateInfo) {
937 pTmpStr = xgl_print_xgl_cmd_buffer_create_info(pCreateInfo, " ");
938 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
939 free(pTmpStr);
940 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600941 return result;
942}
943
944XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglBeginCommandBuffer(XGL_CMD_BUFFER cmdBuffer, XGL_FLAGS flags)
945{
946 XGL_RESULT result = nextTable.BeginCommandBuffer(cmdBuffer, flags);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600947 printf("xglBeginCommandBuffer(cmdBuffer = %p, flags = %i) = %s\n", (void*)cmdBuffer, flags, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600948 return result;
949}
950
951XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglEndCommandBuffer(XGL_CMD_BUFFER cmdBuffer)
952{
953 XGL_RESULT result = nextTable.EndCommandBuffer(cmdBuffer);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600954 printf("xglEndCommandBuffer(cmdBuffer = %p) = %s\n", (void*)cmdBuffer, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600955 return result;
956}
957
958XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglResetCommandBuffer(XGL_CMD_BUFFER cmdBuffer)
959{
960 XGL_RESULT result = nextTable.ResetCommandBuffer(cmdBuffer);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600961 printf("xglResetCommandBuffer(cmdBuffer = %p) = %s\n", (void*)cmdBuffer, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600962 return result;
963}
964
965XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindPipeline(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_PIPELINE pipeline)
966{
967 nextTable.CmdBindPipeline(cmdBuffer, pipelineBindPoint, pipeline);
968 printf("xglCmdBindPipeline(cmdBuffer = %p, pipelineBindPoint = %i, pipeline = %p)\n", (void*)cmdBuffer, pipelineBindPoint, (void*)pipeline);
969}
970
971XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindPipelineDelta(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_PIPELINE_DELTA delta)
972{
973 nextTable.CmdBindPipelineDelta(cmdBuffer, pipelineBindPoint, delta);
974 printf("xglCmdBindPipelineDelta(cmdBuffer = %p, pipelineBindPoint = %i, delta = %p)\n", (void*)cmdBuffer, pipelineBindPoint, (void*)delta);
975}
976
977XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindStateObject(XGL_CMD_BUFFER cmdBuffer, XGL_STATE_BIND_POINT stateBindPoint, XGL_STATE_OBJECT state)
978{
979 nextTable.CmdBindStateObject(cmdBuffer, stateBindPoint, state);
980 printf("xglCmdBindStateObject(cmdBuffer = %p, stateBindPoint = %i, state = %p)\n", (void*)cmdBuffer, stateBindPoint, (void*)state);
981}
982
983XGL_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)
984{
985 nextTable.CmdBindDescriptorSet(cmdBuffer, pipelineBindPoint, index, descriptorSet, slotOffset);
986 printf("xglCmdBindDescriptorSet(cmdBuffer = %p, pipelineBindPoint = %i, index = %i, descriptorSet = %p, slotOffset = %i)\n", (void*)cmdBuffer, pipelineBindPoint, index, (void*)descriptorSet, slotOffset);
987}
988
989XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindDynamicMemoryView(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, const XGL_MEMORY_VIEW_ATTACH_INFO* pMemView)
990{
991 nextTable.CmdBindDynamicMemoryView(cmdBuffer, pipelineBindPoint, pMemView);
992 printf("xglCmdBindDynamicMemoryView(cmdBuffer = %p, pipelineBindPoint = %i, pMemView = %p)\n", (void*)cmdBuffer, pipelineBindPoint, (void*)pMemView);
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600993 char *pTmpStr;
994 if (pMemView) {
995 pTmpStr = xgl_print_xgl_memory_view_attach_info(pMemView, " ");
996 printf(" pMemView (%p)\n%s\n", (void*)pMemView, pTmpStr);
997 free(pTmpStr);
998 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600999}
1000
1001XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindIndexData(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_INDEX_TYPE indexType)
1002{
1003 nextTable.CmdBindIndexData(cmdBuffer, mem, offset, indexType);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001004 printf("xglCmdBindIndexData(cmdBuffer = %p, mem = %p, offset = %i, indexType = %s)\n", (void*)cmdBuffer, (void*)mem, offset, string_XGL_INDEX_TYPE(indexType));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001005}
1006
1007XGL_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)
1008{
1009 nextTable.CmdBindAttachments(cmdBuffer, colorAttachmentCount, pColorAttachments, pDepthStencilAttachment);
1010 printf("xglCmdBindAttachments(cmdBuffer = %p, colorAttachmentCount = %i, pColorAttachments = %p, pDepthStencilAttachment = %p)\n", (void*)cmdBuffer, colorAttachmentCount, (void*)pColorAttachments, (void*)pDepthStencilAttachment);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001011 char *pTmpStr;
1012 if (pColorAttachments) {
1013 pTmpStr = xgl_print_xgl_color_attachment_bind_info(pColorAttachments, " ");
1014 printf(" pColorAttachments (%p)\n%s\n", (void*)pColorAttachments, pTmpStr);
1015 free(pTmpStr);
1016 }
1017 if (pDepthStencilAttachment) {
1018 pTmpStr = xgl_print_xgl_depth_stencil_bind_info(pDepthStencilAttachment, " ");
1019 printf(" pDepthStencilAttachment (%p)\n%s\n", (void*)pDepthStencilAttachment, pTmpStr);
1020 free(pTmpStr);
1021 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001022}
1023
1024XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdPrepareMemoryRegions(XGL_CMD_BUFFER cmdBuffer, XGL_UINT transitionCount, const XGL_MEMORY_STATE_TRANSITION* pStateTransitions)
1025{
1026 nextTable.CmdPrepareMemoryRegions(cmdBuffer, transitionCount, pStateTransitions);
1027 printf("xglCmdPrepareMemoryRegions(cmdBuffer = %p, transitionCount = %i, pStateTransitions = %p)\n", (void*)cmdBuffer, transitionCount, (void*)pStateTransitions);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001028 char *pTmpStr;
1029 if (pStateTransitions) {
1030 pTmpStr = xgl_print_xgl_memory_state_transition(pStateTransitions, " ");
1031 printf(" pStateTransitions (%p)\n%s\n", (void*)pStateTransitions, pTmpStr);
1032 free(pTmpStr);
1033 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001034}
1035
1036XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdPrepareImages(XGL_CMD_BUFFER cmdBuffer, XGL_UINT transitionCount, const XGL_IMAGE_STATE_TRANSITION* pStateTransitions)
1037{
1038 nextTable.CmdPrepareImages(cmdBuffer, transitionCount, pStateTransitions);
1039 printf("xglCmdPrepareImages(cmdBuffer = %p, transitionCount = %i, pStateTransitions = %p)\n", (void*)cmdBuffer, transitionCount, (void*)pStateTransitions);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001040 char *pTmpStr;
1041 if (pStateTransitions) {
1042 pTmpStr = xgl_print_xgl_image_state_transition(pStateTransitions, " ");
1043 printf(" pStateTransitions (%p)\n%s\n", (void*)pStateTransitions, pTmpStr);
1044 free(pTmpStr);
1045 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001046}
1047
1048XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDraw(XGL_CMD_BUFFER cmdBuffer, XGL_UINT firstVertex, XGL_UINT vertexCount, XGL_UINT firstInstance, XGL_UINT instanceCount)
1049{
1050 nextTable.CmdDraw(cmdBuffer, firstVertex, vertexCount, firstInstance, instanceCount);
1051 printf("xglCmdDraw(cmdBuffer = %p, firstVertex = %i, vertexCount = %i, firstInstance = %i, instanceCount = %i)\n", (void*)cmdBuffer, firstVertex, vertexCount, firstInstance, instanceCount);
1052}
1053
1054XGL_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)
1055{
1056 nextTable.CmdDrawIndexed(cmdBuffer, firstIndex, indexCount, vertexOffset, firstInstance, instanceCount);
1057 printf("xglCmdDrawIndexed(cmdBuffer = %p, firstIndex = %i, indexCount = %i, vertexOffset = %i, firstInstance = %i, instanceCount = %i)\n", (void*)cmdBuffer, firstIndex, indexCount, vertexOffset, firstInstance, instanceCount);
1058}
1059
1060XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDrawIndirect(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT32 count, XGL_UINT32 stride)
1061{
1062 nextTable.CmdDrawIndirect(cmdBuffer, mem, offset, count, stride);
1063 printf("xglCmdDrawIndirect(cmdBuffer = %p, mem = %p, offset = %i, count = %i, stride = %i)\n", (void*)cmdBuffer, (void*)mem, offset, count, stride);
1064}
1065
1066XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDrawIndexedIndirect(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT32 count, XGL_UINT32 stride)
1067{
1068 nextTable.CmdDrawIndexedIndirect(cmdBuffer, mem, offset, count, stride);
1069 printf("xglCmdDrawIndexedIndirect(cmdBuffer = %p, mem = %p, offset = %i, count = %i, stride = %i)\n", (void*)cmdBuffer, (void*)mem, offset, count, stride);
1070}
1071
1072XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDispatch(XGL_CMD_BUFFER cmdBuffer, XGL_UINT x, XGL_UINT y, XGL_UINT z)
1073{
1074 nextTable.CmdDispatch(cmdBuffer, x, y, z);
1075 printf("xglCmdDispatch(cmdBuffer = %p, x = %i, y = %i, z = %i)\n", (void*)cmdBuffer, x, y, z);
1076}
1077
1078XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDispatchIndirect(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset)
1079{
1080 nextTable.CmdDispatchIndirect(cmdBuffer, mem, offset);
1081 printf("xglCmdDispatchIndirect(cmdBuffer = %p, mem = %p, offset = %i)\n", (void*)cmdBuffer, (void*)mem, offset);
1082}
1083
1084XGL_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)
1085{
1086 nextTable.CmdCopyMemory(cmdBuffer, srcMem, destMem, regionCount, pRegions);
1087 printf("xglCmdCopyMemory(cmdBuffer = %p, srcMem = %p, destMem = %p, regionCount = %i, pRegions = %p)\n", (void*)cmdBuffer, (void*)srcMem, (void*)destMem, regionCount, (void*)pRegions);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001088 char *pTmpStr;
1089 if (pRegions) {
1090 pTmpStr = xgl_print_xgl_memory_copy(pRegions, " ");
1091 printf(" pRegions (%p)\n%s\n", (void*)pRegions, pTmpStr);
1092 free(pTmpStr);
1093 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001094}
1095
1096XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdCopyImage(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE destImage, XGL_UINT regionCount, const XGL_IMAGE_COPY* pRegions)
1097{
1098 nextTable.CmdCopyImage(cmdBuffer, srcImage, destImage, regionCount, pRegions);
1099 printf("xglCmdCopyImage(cmdBuffer = %p, srcImage = %p, destImage = %p, regionCount = %i, pRegions = %p)\n", (void*)cmdBuffer, (void*)srcImage, (void*)destImage, regionCount, (void*)pRegions);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001100 char *pTmpStr;
1101 if (pRegions) {
1102 pTmpStr = xgl_print_xgl_image_copy(pRegions, " ");
1103 printf(" pRegions (%p)\n%s\n", (void*)pRegions, pTmpStr);
1104 free(pTmpStr);
1105 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001106}
1107
1108XGL_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)
1109{
1110 nextTable.CmdCopyMemoryToImage(cmdBuffer, srcMem, destImage, regionCount, pRegions);
1111 printf("xglCmdCopyMemoryToImage(cmdBuffer = %p, srcMem = %p, destImage = %p, regionCount = %i, pRegions = %p)\n", (void*)cmdBuffer, (void*)srcMem, (void*)destImage, regionCount, (void*)pRegions);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001112 char *pTmpStr;
1113 if (pRegions) {
1114 pTmpStr = xgl_print_xgl_memory_image_copy(pRegions, " ");
1115 printf(" pRegions (%p)\n%s\n", (void*)pRegions, pTmpStr);
1116 free(pTmpStr);
1117 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001118}
1119
1120XGL_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)
1121{
1122 nextTable.CmdCopyImageToMemory(cmdBuffer, srcImage, destMem, regionCount, pRegions);
1123 printf("xglCmdCopyImageToMemory(cmdBuffer = %p, srcImage = %p, destMem = %p, regionCount = %i, pRegions = %p)\n", (void*)cmdBuffer, (void*)srcImage, (void*)destMem, regionCount, (void*)pRegions);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001124 char *pTmpStr;
1125 if (pRegions) {
1126 pTmpStr = xgl_print_xgl_memory_image_copy(pRegions, " ");
1127 printf(" pRegions (%p)\n%s\n", (void*)pRegions, pTmpStr);
1128 free(pTmpStr);
1129 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001130}
1131
1132XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdCloneImageData(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE_STATE srcImageState, XGL_IMAGE destImage, XGL_IMAGE_STATE destImageState)
1133{
1134 nextTable.CmdCloneImageData(cmdBuffer, srcImage, srcImageState, destImage, destImageState);
1135 printf("xglCmdCloneImageData(cmdBuffer = %p, srcImage = %p, srcImageState = %p, destImage = %p, destImageState = %p)\n", (void*)cmdBuffer, (void*)srcImage, (void*)srcImageState, (void*)destImage, (void*)destImageState);
1136}
1137
1138XGL_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)
1139{
1140 nextTable.CmdUpdateMemory(cmdBuffer, destMem, destOffset, dataSize, pData);
1141 printf("xglCmdUpdateMemory(cmdBuffer = %p, destMem = %p, destOffset = %i, dataSize = %i, pData = %i)\n", (void*)cmdBuffer, (void*)destMem, destOffset, dataSize, *pData);
1142}
1143
1144XGL_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)
1145{
1146 nextTable.CmdFillMemory(cmdBuffer, destMem, destOffset, fillSize, data);
1147 printf("xglCmdFillMemory(cmdBuffer = %p, destMem = %p, destOffset = %i, fillSize = %i, data = %i)\n", (void*)cmdBuffer, (void*)destMem, destOffset, fillSize, data);
1148}
1149
1150XGL_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)
1151{
1152 nextTable.CmdClearColorImage(cmdBuffer, image, color, rangeCount, pRanges);
1153 printf("xglCmdClearColorImage(cmdBuffer = %p, image = %p, color = [%f, %f, %f, %f], rangeCount = %i, pRanges = %p)\n", (void*)cmdBuffer, (void*)image, color[0], color[1], color[2], color[3], rangeCount, (void*)pRanges);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001154 char *pTmpStr;
1155 if (pRanges) {
1156 pTmpStr = xgl_print_xgl_image_subresource_range(pRanges, " ");
1157 printf(" pRanges (%p)\n%s\n", (void*)pRanges, pTmpStr);
1158 free(pTmpStr);
1159 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001160}
1161
1162XGL_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)
1163{
1164 nextTable.CmdClearColorImageRaw(cmdBuffer, image, color, rangeCount, pRanges);
1165 printf("xglCmdClearColorImageRaw(cmdBuffer = %p, image = %p, color = [%i, %i, %i, %i], rangeCount = %i, pRanges = %p)\n", (void*)cmdBuffer, (void*)image, color[0], color[1], color[2], color[3], rangeCount, (void*)pRanges);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001166 char *pTmpStr;
1167 if (pRanges) {
1168 pTmpStr = xgl_print_xgl_image_subresource_range(pRanges, " ");
1169 printf(" pRanges (%p)\n%s\n", (void*)pRanges, pTmpStr);
1170 free(pTmpStr);
1171 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001172}
1173
1174XGL_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)
1175{
1176 nextTable.CmdClearDepthStencil(cmdBuffer, image, depth, stencil, rangeCount, pRanges);
1177 printf("xglCmdClearDepthStencil(cmdBuffer = %p, image = %p, depth = %f, stencil = %i, rangeCount = %i, pRanges = %p)\n", (void*)cmdBuffer, (void*)image, depth, stencil, rangeCount, (void*)pRanges);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001178 char *pTmpStr;
1179 if (pRanges) {
1180 pTmpStr = xgl_print_xgl_image_subresource_range(pRanges, " ");
1181 printf(" pRanges (%p)\n%s\n", (void*)pRanges, pTmpStr);
1182 free(pTmpStr);
1183 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001184}
1185
1186XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdResolveImage(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE destImage, XGL_UINT rectCount, const XGL_IMAGE_RESOLVE* pRects)
1187{
1188 nextTable.CmdResolveImage(cmdBuffer, srcImage, destImage, rectCount, pRects);
1189 printf("xglCmdResolveImage(cmdBuffer = %p, srcImage = %p, destImage = %p, rectCount = %i, pRects = %p)\n", (void*)cmdBuffer, (void*)srcImage, (void*)destImage, rectCount, (void*)pRects);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001190 char *pTmpStr;
1191 if (pRects) {
1192 pTmpStr = xgl_print_xgl_image_resolve(pRects, " ");
1193 printf(" pRects (%p)\n%s\n", (void*)pRects, pTmpStr);
1194 free(pTmpStr);
1195 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001196}
1197
1198XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdSetEvent(XGL_CMD_BUFFER cmdBuffer, XGL_EVENT event)
1199{
1200 nextTable.CmdSetEvent(cmdBuffer, event);
1201 printf("xglCmdSetEvent(cmdBuffer = %p, event = %p)\n", (void*)cmdBuffer, (void*)event);
1202}
1203
1204XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdResetEvent(XGL_CMD_BUFFER cmdBuffer, XGL_EVENT event)
1205{
1206 nextTable.CmdResetEvent(cmdBuffer, event);
1207 printf("xglCmdResetEvent(cmdBuffer = %p, event = %p)\n", (void*)cmdBuffer, (void*)event);
1208}
1209
1210XGL_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)
1211{
1212 nextTable.CmdMemoryAtomic(cmdBuffer, destMem, destOffset, srcData, atomicOp);
1213 printf("xglCmdMemoryAtomic(cmdBuffer = %p, destMem = %p, destOffset = %i, srcData = %lu, atomicOp = %p)\n", (void*)cmdBuffer, (void*)destMem, destOffset, srcData, (void*)atomicOp);
1214}
1215
1216XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBeginQuery(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT slot, XGL_FLAGS flags)
1217{
1218 nextTable.CmdBeginQuery(cmdBuffer, queryPool, slot, flags);
1219 printf("xglCmdBeginQuery(cmdBuffer = %p, queryPool = %p, slot = %i, flags = %i)\n", (void*)cmdBuffer, (void*)queryPool, slot, flags);
1220}
1221
1222XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdEndQuery(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT slot)
1223{
1224 nextTable.CmdEndQuery(cmdBuffer, queryPool, slot);
1225 printf("xglCmdEndQuery(cmdBuffer = %p, queryPool = %p, slot = %i)\n", (void*)cmdBuffer, (void*)queryPool, slot);
1226}
1227
1228XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdResetQueryPool(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT startQuery, XGL_UINT queryCount)
1229{
1230 nextTable.CmdResetQueryPool(cmdBuffer, queryPool, startQuery, queryCount);
1231 printf("xglCmdResetQueryPool(cmdBuffer = %p, queryPool = %p, startQuery = %i, queryCount = %i)\n", (void*)cmdBuffer, (void*)queryPool, startQuery, queryCount);
1232}
1233
1234XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdWriteTimestamp(XGL_CMD_BUFFER cmdBuffer, XGL_TIMESTAMP_TYPE timestampType, XGL_GPU_MEMORY destMem, XGL_GPU_SIZE destOffset)
1235{
1236 nextTable.CmdWriteTimestamp(cmdBuffer, timestampType, destMem, destOffset);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001237 printf("xglCmdWriteTimestamp(cmdBuffer = %p, timestampType = %s, destMem = %p, destOffset = %i)\n", (void*)cmdBuffer, string_XGL_TIMESTAMP_TYPE(timestampType), (void*)destMem, destOffset);
Tobin Ehlis817736c2014-10-21 10:47:45 -06001238}
1239
1240XGL_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)
1241{
1242 nextTable.CmdInitAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, pData);
1243 printf("xglCmdInitAtomicCounters(cmdBuffer = %p, pipelineBindPoint = %i, startCounter = %i, counterCount = %i, pData = %i)\n", (void*)cmdBuffer, pipelineBindPoint, startCounter, counterCount, *pData);
1244}
1245
1246XGL_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)
1247{
1248 nextTable.CmdLoadAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, srcMem, srcOffset);
1249 printf("xglCmdLoadAtomicCounters(cmdBuffer = %p, pipelineBindPoint = %i, startCounter = %i, counterCount = %i, srcMem = %p, srcOffset = %i)\n", (void*)cmdBuffer, pipelineBindPoint, startCounter, counterCount, (void*)srcMem, srcOffset);
1250}
1251
1252XGL_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)
1253{
1254 nextTable.CmdSaveAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, destMem, destOffset);
1255 printf("xglCmdSaveAtomicCounters(cmdBuffer = %p, pipelineBindPoint = %i, startCounter = %i, counterCount = %i, destMem = %p, destOffset = %i)\n", (void*)cmdBuffer, pipelineBindPoint, startCounter, counterCount, (void*)destMem, destOffset);
1256}
1257
1258XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetValidationLevel(XGL_DEVICE device, XGL_VALIDATION_LEVEL validationLevel)
1259{
1260 XGL_RESULT result = nextTable.DbgSetValidationLevel(device, validationLevel);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001261 printf("xglDbgSetValidationLevel(device = %p, validationLevel = %p) = %s\n", (void*)device, (void*)validationLevel, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001262 return result;
1263}
1264
1265XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgRegisterMsgCallback(XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback, XGL_VOID* pUserData)
1266{
1267 XGL_RESULT result = nextTable.DbgRegisterMsgCallback(pfnMsgCallback, pUserData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001268 printf("xglDbgRegisterMsgCallback(pfnMsgCallback = %p, pUserData = %p) = %s\n", (void*)pfnMsgCallback, (void*)pUserData, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001269 return result;
1270}
1271
1272XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgUnregisterMsgCallback(XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback)
1273{
1274 XGL_RESULT result = nextTable.DbgUnregisterMsgCallback(pfnMsgCallback);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001275 printf("xglDbgUnregisterMsgCallback(pfnMsgCallback = %p) = %s\n", (void*)pfnMsgCallback, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001276 return result;
1277}
1278
1279XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetMessageFilter(XGL_DEVICE device, XGL_INT msgCode, XGL_DBG_MSG_FILTER filter)
1280{
1281 XGL_RESULT result = nextTable.DbgSetMessageFilter(device, msgCode, filter);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001282 printf("xglDbgSetMessageFilter(device = %p, msgCode = %i, filter = %p) = %s\n", (void*)device, msgCode, (void*)filter, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001283 return result;
1284}
1285
1286XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetObjectTag(XGL_BASE_OBJECT object, XGL_SIZE tagSize, const XGL_VOID* pTag)
1287{
1288 XGL_RESULT result = nextTable.DbgSetObjectTag(object, tagSize, pTag);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001289 printf("xglDbgSetObjectTag(object = %p, tagSize = %i, pTag = %p) = %s\n", (void*)object, tagSize, (void*)pTag, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001290 return result;
1291}
1292
1293XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetGlobalOption(XGL_DBG_GLOBAL_OPTION dbgOption, XGL_SIZE dataSize, const XGL_VOID* pData)
1294{
1295 XGL_RESULT result = nextTable.DbgSetGlobalOption(dbgOption, dataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001296 printf("xglDbgSetGlobalOption(dbgOption = %p, dataSize = %i, pData = %p) = %s\n", (void*)dbgOption, dataSize, (void*)pData, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001297 return result;
1298}
1299
1300XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetDeviceOption(XGL_DEVICE device, XGL_DBG_DEVICE_OPTION dbgOption, XGL_SIZE dataSize, const XGL_VOID* pData)
1301{
1302 XGL_RESULT result = nextTable.DbgSetDeviceOption(device, dbgOption, dataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001303 printf("xglDbgSetDeviceOption(device = %p, dbgOption = %p, dataSize = %i, pData = %p) = %s\n", (void*)device, (void*)dbgOption, dataSize, (void*)pData, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001304 return result;
1305}
1306
1307XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDbgMarkerBegin(XGL_CMD_BUFFER cmdBuffer, const XGL_CHAR* pMarker)
1308{
1309 nextTable.CmdDbgMarkerBegin(cmdBuffer, pMarker);
1310 printf("xglCmdDbgMarkerBegin(cmdBuffer = %p, pMarker = %p)\n", (void*)cmdBuffer, (void*)pMarker);
1311}
1312
1313XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDbgMarkerEnd(XGL_CMD_BUFFER cmdBuffer)
1314{
1315 nextTable.CmdDbgMarkerEnd(cmdBuffer);
1316 printf("xglCmdDbgMarkerEnd(cmdBuffer = %p)\n", (void*)cmdBuffer);
1317}
1318
1319XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11AssociateConnection(XGL_PHYSICAL_GPU gpu, const XGL_WSI_X11_CONNECTION_INFO* pConnectionInfo)
1320{
1321 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -06001322 pCurObj = gpuw;
1323 pthread_once(&tabOnce, initLayerTable);
1324 XGL_RESULT result = nextTable.WsiX11AssociateConnection((XGL_PHYSICAL_GPU)gpuw->nextObject, pConnectionInfo);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001325 printf("xglWsiX11AssociateConnection(gpu = %p, pConnectionInfo = %p) = %s\n", (void*)gpu, (void*)pConnectionInfo, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001326 return result;
1327}
1328
Chia-I Wu6204f342014-11-07 13:33:45 +08001329XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11GetMSC(XGL_DEVICE device, xcb_window_t window, xcb_randr_crtc_t crtc, XGL_UINT64* pMsc)
Tobin Ehlis817736c2014-10-21 10:47:45 -06001330{
Chia-I Wu6204f342014-11-07 13:33:45 +08001331 XGL_RESULT result = nextTable.WsiX11GetMSC(device, window, crtc, pMsc);
1332 printf("xglWsiX11GetMSC(device = %p, window = %i, crtc = %i, pMsc = %lu) = %s\n", (void*)device, window, crtc, *pMsc, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001333 return result;
1334}
1335
1336XGL_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)
1337{
1338 XGL_RESULT result = nextTable.WsiX11CreatePresentableImage(device, pCreateInfo, pImage, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001339 printf("xglWsiX11CreatePresentableImage(device = %p, pCreateInfo = %p, pImage = %p, pMem = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)pImage, (void*)pMem, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001340 return result;
1341}
1342
1343XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11QueuePresent(XGL_QUEUE queue, const XGL_WSI_X11_PRESENT_INFO* pPresentInfo, XGL_FENCE fence)
1344{
1345 XGL_RESULT result = nextTable.WsiX11QueuePresent(queue, pPresentInfo, fence);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001346 printf("xglWsiX11QueuePresent(queue = %p, pPresentInfo = %p, fence = %p) = %s\n", (void*)queue, (void*)pPresentInfo, (void*)fence, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001347 return result;
1348}
1349
1350XGL_LAYER_EXPORT XGL_VOID* XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* funcName)
1351{
1352 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
1353 if (gpu == NULL)
1354 return NULL;
1355 pCurObj = gpuw;
1356 pthread_once(&tabOnce, initLayerTable);
1357
1358 if (!strncmp("xglGetProcAddr", (const char *) funcName, sizeof("xglGetProcAddr")))
1359 return xglGetProcAddr;
1360 else if (!strncmp("xglInitAndEnumerateGpus", (const char *) funcName, sizeof("xglInitAndEnumerateGpus")))
1361 return nextTable.InitAndEnumerateGpus;
1362 else if (!strncmp("xglGetGpuInfo", (const char *) funcName, sizeof("xglGetGpuInfo")))
1363 return xglGetGpuInfo;
1364 else if (!strncmp("xglCreateDevice", (const char *) funcName, sizeof("xglCreateDevice")))
1365 return xglCreateDevice;
1366 else if (!strncmp("xglDestroyDevice", (const char *) funcName, sizeof("xglDestroyDevice")))
1367 return xglDestroyDevice;
1368 else if (!strncmp("xglGetExtensionSupport", (const char *) funcName, sizeof("xglGetExtensionSupport")))
1369 return xglGetExtensionSupport;
1370 else if (!strncmp("xglEnumerateLayers", (const char *) funcName, sizeof("xglEnumerateLayers")))
1371 return xglEnumerateLayers;
1372 else if (!strncmp("xglGetDeviceQueue", (const char *) funcName, sizeof("xglGetDeviceQueue")))
1373 return xglGetDeviceQueue;
1374 else if (!strncmp("xglQueueSubmit", (const char *) funcName, sizeof("xglQueueSubmit")))
1375 return xglQueueSubmit;
1376 else if (!strncmp("xglQueueSetGlobalMemReferences", (const char *) funcName, sizeof("xglQueueSetGlobalMemReferences")))
1377 return xglQueueSetGlobalMemReferences;
1378 else if (!strncmp("xglQueueWaitIdle", (const char *) funcName, sizeof("xglQueueWaitIdle")))
1379 return xglQueueWaitIdle;
1380 else if (!strncmp("xglDeviceWaitIdle", (const char *) funcName, sizeof("xglDeviceWaitIdle")))
1381 return xglDeviceWaitIdle;
1382 else if (!strncmp("xglGetMemoryHeapCount", (const char *) funcName, sizeof("xglGetMemoryHeapCount")))
1383 return xglGetMemoryHeapCount;
1384 else if (!strncmp("xglGetMemoryHeapInfo", (const char *) funcName, sizeof("xglGetMemoryHeapInfo")))
1385 return xglGetMemoryHeapInfo;
1386 else if (!strncmp("xglAllocMemory", (const char *) funcName, sizeof("xglAllocMemory")))
1387 return xglAllocMemory;
1388 else if (!strncmp("xglFreeMemory", (const char *) funcName, sizeof("xglFreeMemory")))
1389 return xglFreeMemory;
1390 else if (!strncmp("xglSetMemoryPriority", (const char *) funcName, sizeof("xglSetMemoryPriority")))
1391 return xglSetMemoryPriority;
1392 else if (!strncmp("xglMapMemory", (const char *) funcName, sizeof("xglMapMemory")))
1393 return xglMapMemory;
1394 else if (!strncmp("xglUnmapMemory", (const char *) funcName, sizeof("xglUnmapMemory")))
1395 return xglUnmapMemory;
1396 else if (!strncmp("xglPinSystemMemory", (const char *) funcName, sizeof("xglPinSystemMemory")))
1397 return xglPinSystemMemory;
1398 else if (!strncmp("xglRemapVirtualMemoryPages", (const char *) funcName, sizeof("xglRemapVirtualMemoryPages")))
1399 return xglRemapVirtualMemoryPages;
1400 else if (!strncmp("xglGetMultiGpuCompatibility", (const char *) funcName, sizeof("xglGetMultiGpuCompatibility")))
1401 return xglGetMultiGpuCompatibility;
1402 else if (!strncmp("xglOpenSharedMemory", (const char *) funcName, sizeof("xglOpenSharedMemory")))
1403 return xglOpenSharedMemory;
1404 else if (!strncmp("xglOpenSharedQueueSemaphore", (const char *) funcName, sizeof("xglOpenSharedQueueSemaphore")))
1405 return xglOpenSharedQueueSemaphore;
1406 else if (!strncmp("xglOpenPeerMemory", (const char *) funcName, sizeof("xglOpenPeerMemory")))
1407 return xglOpenPeerMemory;
1408 else if (!strncmp("xglOpenPeerImage", (const char *) funcName, sizeof("xglOpenPeerImage")))
1409 return xglOpenPeerImage;
1410 else if (!strncmp("xglDestroyObject", (const char *) funcName, sizeof("xglDestroyObject")))
1411 return xglDestroyObject;
1412 else if (!strncmp("xglGetObjectInfo", (const char *) funcName, sizeof("xglGetObjectInfo")))
1413 return xglGetObjectInfo;
1414 else if (!strncmp("xglBindObjectMemory", (const char *) funcName, sizeof("xglBindObjectMemory")))
1415 return xglBindObjectMemory;
1416 else if (!strncmp("xglCreateFence", (const char *) funcName, sizeof("xglCreateFence")))
1417 return xglCreateFence;
1418 else if (!strncmp("xglGetFenceStatus", (const char *) funcName, sizeof("xglGetFenceStatus")))
1419 return xglGetFenceStatus;
1420 else if (!strncmp("xglWaitForFences", (const char *) funcName, sizeof("xglWaitForFences")))
1421 return xglWaitForFences;
1422 else if (!strncmp("xglCreateQueueSemaphore", (const char *) funcName, sizeof("xglCreateQueueSemaphore")))
1423 return xglCreateQueueSemaphore;
1424 else if (!strncmp("xglSignalQueueSemaphore", (const char *) funcName, sizeof("xglSignalQueueSemaphore")))
1425 return xglSignalQueueSemaphore;
1426 else if (!strncmp("xglWaitQueueSemaphore", (const char *) funcName, sizeof("xglWaitQueueSemaphore")))
1427 return xglWaitQueueSemaphore;
1428 else if (!strncmp("xglCreateEvent", (const char *) funcName, sizeof("xglCreateEvent")))
1429 return xglCreateEvent;
1430 else if (!strncmp("xglGetEventStatus", (const char *) funcName, sizeof("xglGetEventStatus")))
1431 return xglGetEventStatus;
1432 else if (!strncmp("xglSetEvent", (const char *) funcName, sizeof("xglSetEvent")))
1433 return xglSetEvent;
1434 else if (!strncmp("xglResetEvent", (const char *) funcName, sizeof("xglResetEvent")))
1435 return xglResetEvent;
1436 else if (!strncmp("xglCreateQueryPool", (const char *) funcName, sizeof("xglCreateQueryPool")))
1437 return xglCreateQueryPool;
1438 else if (!strncmp("xglGetQueryPoolResults", (const char *) funcName, sizeof("xglGetQueryPoolResults")))
1439 return xglGetQueryPoolResults;
1440 else if (!strncmp("xglGetFormatInfo", (const char *) funcName, sizeof("xglGetFormatInfo")))
1441 return xglGetFormatInfo;
1442 else if (!strncmp("xglCreateImage", (const char *) funcName, sizeof("xglCreateImage")))
1443 return xglCreateImage;
1444 else if (!strncmp("xglGetImageSubresourceInfo", (const char *) funcName, sizeof("xglGetImageSubresourceInfo")))
1445 return xglGetImageSubresourceInfo;
1446 else if (!strncmp("xglCreateImageView", (const char *) funcName, sizeof("xglCreateImageView")))
1447 return xglCreateImageView;
1448 else if (!strncmp("xglCreateColorAttachmentView", (const char *) funcName, sizeof("xglCreateColorAttachmentView")))
1449 return xglCreateColorAttachmentView;
1450 else if (!strncmp("xglCreateDepthStencilView", (const char *) funcName, sizeof("xglCreateDepthStencilView")))
1451 return xglCreateDepthStencilView;
1452 else if (!strncmp("xglCreateShader", (const char *) funcName, sizeof("xglCreateShader")))
1453 return xglCreateShader;
1454 else if (!strncmp("xglCreateGraphicsPipeline", (const char *) funcName, sizeof("xglCreateGraphicsPipeline")))
1455 return xglCreateGraphicsPipeline;
1456 else if (!strncmp("xglCreateComputePipeline", (const char *) funcName, sizeof("xglCreateComputePipeline")))
1457 return xglCreateComputePipeline;
1458 else if (!strncmp("xglStorePipeline", (const char *) funcName, sizeof("xglStorePipeline")))
1459 return xglStorePipeline;
1460 else if (!strncmp("xglLoadPipeline", (const char *) funcName, sizeof("xglLoadPipeline")))
1461 return xglLoadPipeline;
1462 else if (!strncmp("xglCreatePipelineDelta", (const char *) funcName, sizeof("xglCreatePipelineDelta")))
1463 return xglCreatePipelineDelta;
1464 else if (!strncmp("xglCreateSampler", (const char *) funcName, sizeof("xglCreateSampler")))
1465 return xglCreateSampler;
1466 else if (!strncmp("xglCreateDescriptorSet", (const char *) funcName, sizeof("xglCreateDescriptorSet")))
1467 return xglCreateDescriptorSet;
1468 else if (!strncmp("xglBeginDescriptorSetUpdate", (const char *) funcName, sizeof("xglBeginDescriptorSetUpdate")))
1469 return xglBeginDescriptorSetUpdate;
1470 else if (!strncmp("xglEndDescriptorSetUpdate", (const char *) funcName, sizeof("xglEndDescriptorSetUpdate")))
1471 return xglEndDescriptorSetUpdate;
1472 else if (!strncmp("xglAttachSamplerDescriptors", (const char *) funcName, sizeof("xglAttachSamplerDescriptors")))
1473 return xglAttachSamplerDescriptors;
1474 else if (!strncmp("xglAttachImageViewDescriptors", (const char *) funcName, sizeof("xglAttachImageViewDescriptors")))
1475 return xglAttachImageViewDescriptors;
1476 else if (!strncmp("xglAttachMemoryViewDescriptors", (const char *) funcName, sizeof("xglAttachMemoryViewDescriptors")))
1477 return xglAttachMemoryViewDescriptors;
1478 else if (!strncmp("xglAttachNestedDescriptors", (const char *) funcName, sizeof("xglAttachNestedDescriptors")))
1479 return xglAttachNestedDescriptors;
1480 else if (!strncmp("xglClearDescriptorSetSlots", (const char *) funcName, sizeof("xglClearDescriptorSetSlots")))
1481 return xglClearDescriptorSetSlots;
1482 else if (!strncmp("xglCreateViewportState", (const char *) funcName, sizeof("xglCreateViewportState")))
1483 return xglCreateViewportState;
1484 else if (!strncmp("xglCreateRasterState", (const char *) funcName, sizeof("xglCreateRasterState")))
1485 return xglCreateRasterState;
1486 else if (!strncmp("xglCreateMsaaState", (const char *) funcName, sizeof("xglCreateMsaaState")))
1487 return xglCreateMsaaState;
1488 else if (!strncmp("xglCreateColorBlendState", (const char *) funcName, sizeof("xglCreateColorBlendState")))
1489 return xglCreateColorBlendState;
1490 else if (!strncmp("xglCreateDepthStencilState", (const char *) funcName, sizeof("xglCreateDepthStencilState")))
1491 return xglCreateDepthStencilState;
1492 else if (!strncmp("xglCreateCommandBuffer", (const char *) funcName, sizeof("xglCreateCommandBuffer")))
1493 return xglCreateCommandBuffer;
1494 else if (!strncmp("xglBeginCommandBuffer", (const char *) funcName, sizeof("xglBeginCommandBuffer")))
1495 return xglBeginCommandBuffer;
1496 else if (!strncmp("xglEndCommandBuffer", (const char *) funcName, sizeof("xglEndCommandBuffer")))
1497 return xglEndCommandBuffer;
1498 else if (!strncmp("xglResetCommandBuffer", (const char *) funcName, sizeof("xglResetCommandBuffer")))
1499 return xglResetCommandBuffer;
1500 else if (!strncmp("xglCmdBindPipeline", (const char *) funcName, sizeof("xglCmdBindPipeline")))
1501 return xglCmdBindPipeline;
1502 else if (!strncmp("xglCmdBindPipelineDelta", (const char *) funcName, sizeof("xglCmdBindPipelineDelta")))
1503 return xglCmdBindPipelineDelta;
1504 else if (!strncmp("xglCmdBindStateObject", (const char *) funcName, sizeof("xglCmdBindStateObject")))
1505 return xglCmdBindStateObject;
1506 else if (!strncmp("xglCmdBindDescriptorSet", (const char *) funcName, sizeof("xglCmdBindDescriptorSet")))
1507 return xglCmdBindDescriptorSet;
1508 else if (!strncmp("xglCmdBindDynamicMemoryView", (const char *) funcName, sizeof("xglCmdBindDynamicMemoryView")))
1509 return xglCmdBindDynamicMemoryView;
1510 else if (!strncmp("xglCmdBindIndexData", (const char *) funcName, sizeof("xglCmdBindIndexData")))
1511 return xglCmdBindIndexData;
1512 else if (!strncmp("xglCmdBindAttachments", (const char *) funcName, sizeof("xglCmdBindAttachments")))
1513 return xglCmdBindAttachments;
1514 else if (!strncmp("xglCmdPrepareMemoryRegions", (const char *) funcName, sizeof("xglCmdPrepareMemoryRegions")))
1515 return xglCmdPrepareMemoryRegions;
1516 else if (!strncmp("xglCmdPrepareImages", (const char *) funcName, sizeof("xglCmdPrepareImages")))
1517 return xglCmdPrepareImages;
1518 else if (!strncmp("xglCmdDraw", (const char *) funcName, sizeof("xglCmdDraw")))
1519 return xglCmdDraw;
1520 else if (!strncmp("xglCmdDrawIndexed", (const char *) funcName, sizeof("xglCmdDrawIndexed")))
1521 return xglCmdDrawIndexed;
1522 else if (!strncmp("xglCmdDrawIndirect", (const char *) funcName, sizeof("xglCmdDrawIndirect")))
1523 return xglCmdDrawIndirect;
1524 else if (!strncmp("xglCmdDrawIndexedIndirect", (const char *) funcName, sizeof("xglCmdDrawIndexedIndirect")))
1525 return xglCmdDrawIndexedIndirect;
1526 else if (!strncmp("xglCmdDispatch", (const char *) funcName, sizeof("xglCmdDispatch")))
1527 return xglCmdDispatch;
1528 else if (!strncmp("xglCmdDispatchIndirect", (const char *) funcName, sizeof("xglCmdDispatchIndirect")))
1529 return xglCmdDispatchIndirect;
1530 else if (!strncmp("xglCmdCopyMemory", (const char *) funcName, sizeof("xglCmdCopyMemory")))
1531 return xglCmdCopyMemory;
1532 else if (!strncmp("xglCmdCopyImage", (const char *) funcName, sizeof("xglCmdCopyImage")))
1533 return xglCmdCopyImage;
1534 else if (!strncmp("xglCmdCopyMemoryToImage", (const char *) funcName, sizeof("xglCmdCopyMemoryToImage")))
1535 return xglCmdCopyMemoryToImage;
1536 else if (!strncmp("xglCmdCopyImageToMemory", (const char *) funcName, sizeof("xglCmdCopyImageToMemory")))
1537 return xglCmdCopyImageToMemory;
1538 else if (!strncmp("xglCmdCloneImageData", (const char *) funcName, sizeof("xglCmdCloneImageData")))
1539 return xglCmdCloneImageData;
1540 else if (!strncmp("xglCmdUpdateMemory", (const char *) funcName, sizeof("xglCmdUpdateMemory")))
1541 return xglCmdUpdateMemory;
1542 else if (!strncmp("xglCmdFillMemory", (const char *) funcName, sizeof("xglCmdFillMemory")))
1543 return xglCmdFillMemory;
1544 else if (!strncmp("xglCmdClearColorImage", (const char *) funcName, sizeof("xglCmdClearColorImage")))
1545 return xglCmdClearColorImage;
1546 else if (!strncmp("xglCmdClearColorImageRaw", (const char *) funcName, sizeof("xglCmdClearColorImageRaw")))
1547 return xglCmdClearColorImageRaw;
1548 else if (!strncmp("xglCmdClearDepthStencil", (const char *) funcName, sizeof("xglCmdClearDepthStencil")))
1549 return xglCmdClearDepthStencil;
1550 else if (!strncmp("xglCmdResolveImage", (const char *) funcName, sizeof("xglCmdResolveImage")))
1551 return xglCmdResolveImage;
1552 else if (!strncmp("xglCmdSetEvent", (const char *) funcName, sizeof("xglCmdSetEvent")))
1553 return xglCmdSetEvent;
1554 else if (!strncmp("xglCmdResetEvent", (const char *) funcName, sizeof("xglCmdResetEvent")))
1555 return xglCmdResetEvent;
1556 else if (!strncmp("xglCmdMemoryAtomic", (const char *) funcName, sizeof("xglCmdMemoryAtomic")))
1557 return xglCmdMemoryAtomic;
1558 else if (!strncmp("xglCmdBeginQuery", (const char *) funcName, sizeof("xglCmdBeginQuery")))
1559 return xglCmdBeginQuery;
1560 else if (!strncmp("xglCmdEndQuery", (const char *) funcName, sizeof("xglCmdEndQuery")))
1561 return xglCmdEndQuery;
1562 else if (!strncmp("xglCmdResetQueryPool", (const char *) funcName, sizeof("xglCmdResetQueryPool")))
1563 return xglCmdResetQueryPool;
1564 else if (!strncmp("xglCmdWriteTimestamp", (const char *) funcName, sizeof("xglCmdWriteTimestamp")))
1565 return xglCmdWriteTimestamp;
1566 else if (!strncmp("xglCmdInitAtomicCounters", (const char *) funcName, sizeof("xglCmdInitAtomicCounters")))
1567 return xglCmdInitAtomicCounters;
1568 else if (!strncmp("xglCmdLoadAtomicCounters", (const char *) funcName, sizeof("xglCmdLoadAtomicCounters")))
1569 return xglCmdLoadAtomicCounters;
1570 else if (!strncmp("xglCmdSaveAtomicCounters", (const char *) funcName, sizeof("xglCmdSaveAtomicCounters")))
1571 return xglCmdSaveAtomicCounters;
1572 else if (!strncmp("xglDbgSetValidationLevel", (const char *) funcName, sizeof("xglDbgSetValidationLevel")))
1573 return xglDbgSetValidationLevel;
1574 else if (!strncmp("xglDbgRegisterMsgCallback", (const char *) funcName, sizeof("xglDbgRegisterMsgCallback")))
1575 return xglDbgRegisterMsgCallback;
1576 else if (!strncmp("xglDbgUnregisterMsgCallback", (const char *) funcName, sizeof("xglDbgUnregisterMsgCallback")))
1577 return xglDbgUnregisterMsgCallback;
1578 else if (!strncmp("xglDbgSetMessageFilter", (const char *) funcName, sizeof("xglDbgSetMessageFilter")))
1579 return xglDbgSetMessageFilter;
1580 else if (!strncmp("xglDbgSetObjectTag", (const char *) funcName, sizeof("xglDbgSetObjectTag")))
1581 return xglDbgSetObjectTag;
1582 else if (!strncmp("xglDbgSetGlobalOption", (const char *) funcName, sizeof("xglDbgSetGlobalOption")))
1583 return xglDbgSetGlobalOption;
1584 else if (!strncmp("xglDbgSetDeviceOption", (const char *) funcName, sizeof("xglDbgSetDeviceOption")))
1585 return xglDbgSetDeviceOption;
1586 else if (!strncmp("xglCmdDbgMarkerBegin", (const char *) funcName, sizeof("xglCmdDbgMarkerBegin")))
1587 return xglCmdDbgMarkerBegin;
1588 else if (!strncmp("xglCmdDbgMarkerEnd", (const char *) funcName, sizeof("xglCmdDbgMarkerEnd")))
1589 return xglCmdDbgMarkerEnd;
1590 else if (!strncmp("xglWsiX11AssociateConnection", (const char *) funcName, sizeof("xglWsiX11AssociateConnection")))
1591 return xglWsiX11AssociateConnection;
1592 else if (!strncmp("xglWsiX11GetMSC", (const char *) funcName, sizeof("xglWsiX11GetMSC")))
1593 return xglWsiX11GetMSC;
1594 else if (!strncmp("xglWsiX11CreatePresentableImage", (const char *) funcName, sizeof("xglWsiX11CreatePresentableImage")))
1595 return xglWsiX11CreatePresentableImage;
1596 else if (!strncmp("xglWsiX11QueuePresent", (const char *) funcName, sizeof("xglWsiX11QueuePresent")))
1597 return xglWsiX11QueuePresent;
1598 else {
1599 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
1600 if (gpuw->pGPA == NULL)
1601 return NULL;
1602 return gpuw->pGPA(gpuw->nextObject, funcName);
1603 }
1604}
1605