blob: 1e6b8ab2b2e5cce175bc31a45ec7407bf0bce739 [file] [log] [blame]
Tobin Ehlis817736c2014-10-21 10:47:45 -06001/* THIS FILE IS GENERATED. DO NOT EDIT. */
2
3/*
4 * XGL
5 *
6 * Copyright (C) 2014 LunarG, Inc.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
25 */
26
27#include <stdio.h>
28#include <stdlib.h>
29#include <string.h>
30#include <assert.h>
31#include <pthread.h>
32#include "xglLayer.h"
Tobin Ehlis92dbf802014-10-22 09:06:33 -060033#include "xgl_string_helper.h"
34#include "xgl_struct_string_helper.h"
Tobin Ehlis817736c2014-10-21 10:47:45 -060035
36static XGL_LAYER_DISPATCH_TABLE nextTable;
37static XGL_BASE_LAYER_OBJECT *pCurObj;
38static pthread_once_t tabOnce = PTHREAD_ONCE_INIT;
39
40
41static void initLayerTable()
42{
43 GetProcAddrType fpNextGPA;
44 fpNextGPA = pCurObj->pGPA;
45 assert(fpNextGPA);
46
47 GetProcAddrType fpGetProcAddr = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetProcAddr");
48 nextTable.GetProcAddr = fpGetProcAddr;
49 InitAndEnumerateGpusType fpInitAndEnumerateGpus = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglInitAndEnumerateGpus");
50 nextTable.InitAndEnumerateGpus = fpInitAndEnumerateGpus;
51 GetGpuInfoType fpGetGpuInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetGpuInfo");
52 nextTable.GetGpuInfo = fpGetGpuInfo;
53 CreateDeviceType fpCreateDevice = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDevice");
54 nextTable.CreateDevice = fpCreateDevice;
55 DestroyDeviceType fpDestroyDevice = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDestroyDevice");
56 nextTable.DestroyDevice = fpDestroyDevice;
57 GetExtensionSupportType fpGetExtensionSupport = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetExtensionSupport");
58 nextTable.GetExtensionSupport = fpGetExtensionSupport;
59 EnumerateLayersType fpEnumerateLayers = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglEnumerateLayers");
60 nextTable.EnumerateLayers = fpEnumerateLayers;
61 GetDeviceQueueType fpGetDeviceQueue = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetDeviceQueue");
62 nextTable.GetDeviceQueue = fpGetDeviceQueue;
63 QueueSubmitType fpQueueSubmit = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglQueueSubmit");
64 nextTable.QueueSubmit = fpQueueSubmit;
65 QueueSetGlobalMemReferencesType fpQueueSetGlobalMemReferences = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglQueueSetGlobalMemReferences");
66 nextTable.QueueSetGlobalMemReferences = fpQueueSetGlobalMemReferences;
67 QueueWaitIdleType fpQueueWaitIdle = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglQueueWaitIdle");
68 nextTable.QueueWaitIdle = fpQueueWaitIdle;
69 DeviceWaitIdleType fpDeviceWaitIdle = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDeviceWaitIdle");
70 nextTable.DeviceWaitIdle = fpDeviceWaitIdle;
71 GetMemoryHeapCountType fpGetMemoryHeapCount = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetMemoryHeapCount");
72 nextTable.GetMemoryHeapCount = fpGetMemoryHeapCount;
73 GetMemoryHeapInfoType fpGetMemoryHeapInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetMemoryHeapInfo");
74 nextTable.GetMemoryHeapInfo = fpGetMemoryHeapInfo;
75 AllocMemoryType fpAllocMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAllocMemory");
76 nextTable.AllocMemory = fpAllocMemory;
77 FreeMemoryType fpFreeMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglFreeMemory");
78 nextTable.FreeMemory = fpFreeMemory;
79 SetMemoryPriorityType fpSetMemoryPriority = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglSetMemoryPriority");
80 nextTable.SetMemoryPriority = fpSetMemoryPriority;
81 MapMemoryType fpMapMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglMapMemory");
82 nextTable.MapMemory = fpMapMemory;
83 UnmapMemoryType fpUnmapMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglUnmapMemory");
84 nextTable.UnmapMemory = fpUnmapMemory;
85 PinSystemMemoryType fpPinSystemMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglPinSystemMemory");
86 nextTable.PinSystemMemory = fpPinSystemMemory;
87 RemapVirtualMemoryPagesType fpRemapVirtualMemoryPages = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglRemapVirtualMemoryPages");
88 nextTable.RemapVirtualMemoryPages = fpRemapVirtualMemoryPages;
89 GetMultiGpuCompatibilityType fpGetMultiGpuCompatibility = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetMultiGpuCompatibility");
90 nextTable.GetMultiGpuCompatibility = fpGetMultiGpuCompatibility;
91 OpenSharedMemoryType fpOpenSharedMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenSharedMemory");
92 nextTable.OpenSharedMemory = fpOpenSharedMemory;
93 OpenSharedQueueSemaphoreType fpOpenSharedQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenSharedQueueSemaphore");
94 nextTable.OpenSharedQueueSemaphore = fpOpenSharedQueueSemaphore;
95 OpenPeerMemoryType fpOpenPeerMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenPeerMemory");
96 nextTable.OpenPeerMemory = fpOpenPeerMemory;
97 OpenPeerImageType fpOpenPeerImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenPeerImage");
98 nextTable.OpenPeerImage = fpOpenPeerImage;
99 DestroyObjectType fpDestroyObject = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDestroyObject");
100 nextTable.DestroyObject = fpDestroyObject;
101 GetObjectInfoType fpGetObjectInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetObjectInfo");
102 nextTable.GetObjectInfo = fpGetObjectInfo;
103 BindObjectMemoryType fpBindObjectMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglBindObjectMemory");
104 nextTable.BindObjectMemory = fpBindObjectMemory;
105 CreateFenceType fpCreateFence = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateFence");
106 nextTable.CreateFence = fpCreateFence;
107 GetFenceStatusType fpGetFenceStatus = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetFenceStatus");
108 nextTable.GetFenceStatus = fpGetFenceStatus;
109 WaitForFencesType fpWaitForFences = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWaitForFences");
110 nextTable.WaitForFences = fpWaitForFences;
111 CreateQueueSemaphoreType fpCreateQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateQueueSemaphore");
112 nextTable.CreateQueueSemaphore = fpCreateQueueSemaphore;
113 SignalQueueSemaphoreType fpSignalQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglSignalQueueSemaphore");
114 nextTable.SignalQueueSemaphore = fpSignalQueueSemaphore;
115 WaitQueueSemaphoreType fpWaitQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWaitQueueSemaphore");
116 nextTable.WaitQueueSemaphore = fpWaitQueueSemaphore;
117 CreateEventType fpCreateEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateEvent");
118 nextTable.CreateEvent = fpCreateEvent;
119 GetEventStatusType fpGetEventStatus = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetEventStatus");
120 nextTable.GetEventStatus = fpGetEventStatus;
121 SetEventType fpSetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglSetEvent");
122 nextTable.SetEvent = fpSetEvent;
123 ResetEventType fpResetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglResetEvent");
124 nextTable.ResetEvent = fpResetEvent;
125 CreateQueryPoolType fpCreateQueryPool = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateQueryPool");
126 nextTable.CreateQueryPool = fpCreateQueryPool;
127 GetQueryPoolResultsType fpGetQueryPoolResults = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetQueryPoolResults");
128 nextTable.GetQueryPoolResults = fpGetQueryPoolResults;
129 GetFormatInfoType fpGetFormatInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetFormatInfo");
130 nextTable.GetFormatInfo = fpGetFormatInfo;
131 CreateImageType fpCreateImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateImage");
132 nextTable.CreateImage = fpCreateImage;
133 GetImageSubresourceInfoType fpGetImageSubresourceInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetImageSubresourceInfo");
134 nextTable.GetImageSubresourceInfo = fpGetImageSubresourceInfo;
135 CreateImageViewType fpCreateImageView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateImageView");
136 nextTable.CreateImageView = fpCreateImageView;
137 CreateColorAttachmentViewType fpCreateColorAttachmentView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateColorAttachmentView");
138 nextTable.CreateColorAttachmentView = fpCreateColorAttachmentView;
139 CreateDepthStencilViewType fpCreateDepthStencilView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDepthStencilView");
140 nextTable.CreateDepthStencilView = fpCreateDepthStencilView;
141 CreateShaderType fpCreateShader = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateShader");
142 nextTable.CreateShader = fpCreateShader;
143 CreateGraphicsPipelineType fpCreateGraphicsPipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateGraphicsPipeline");
144 nextTable.CreateGraphicsPipeline = fpCreateGraphicsPipeline;
145 CreateComputePipelineType fpCreateComputePipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateComputePipeline");
146 nextTable.CreateComputePipeline = fpCreateComputePipeline;
147 StorePipelineType fpStorePipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglStorePipeline");
148 nextTable.StorePipeline = fpStorePipeline;
149 LoadPipelineType fpLoadPipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglLoadPipeline");
150 nextTable.LoadPipeline = fpLoadPipeline;
151 CreatePipelineDeltaType fpCreatePipelineDelta = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreatePipelineDelta");
152 nextTable.CreatePipelineDelta = fpCreatePipelineDelta;
153 CreateSamplerType fpCreateSampler = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateSampler");
154 nextTable.CreateSampler = fpCreateSampler;
155 CreateDescriptorSetType fpCreateDescriptorSet = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDescriptorSet");
156 nextTable.CreateDescriptorSet = fpCreateDescriptorSet;
157 BeginDescriptorSetUpdateType fpBeginDescriptorSetUpdate = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglBeginDescriptorSetUpdate");
158 nextTable.BeginDescriptorSetUpdate = fpBeginDescriptorSetUpdate;
159 EndDescriptorSetUpdateType fpEndDescriptorSetUpdate = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglEndDescriptorSetUpdate");
160 nextTable.EndDescriptorSetUpdate = fpEndDescriptorSetUpdate;
161 AttachSamplerDescriptorsType fpAttachSamplerDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachSamplerDescriptors");
162 nextTable.AttachSamplerDescriptors = fpAttachSamplerDescriptors;
163 AttachImageViewDescriptorsType fpAttachImageViewDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachImageViewDescriptors");
164 nextTable.AttachImageViewDescriptors = fpAttachImageViewDescriptors;
165 AttachMemoryViewDescriptorsType fpAttachMemoryViewDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachMemoryViewDescriptors");
166 nextTable.AttachMemoryViewDescriptors = fpAttachMemoryViewDescriptors;
167 AttachNestedDescriptorsType fpAttachNestedDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachNestedDescriptors");
168 nextTable.AttachNestedDescriptors = fpAttachNestedDescriptors;
169 ClearDescriptorSetSlotsType fpClearDescriptorSetSlots = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglClearDescriptorSetSlots");
170 nextTable.ClearDescriptorSetSlots = fpClearDescriptorSetSlots;
171 CreateViewportStateType fpCreateViewportState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateViewportState");
172 nextTable.CreateViewportState = fpCreateViewportState;
173 CreateRasterStateType fpCreateRasterState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateRasterState");
174 nextTable.CreateRasterState = fpCreateRasterState;
175 CreateMsaaStateType fpCreateMsaaState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateMsaaState");
176 nextTable.CreateMsaaState = fpCreateMsaaState;
177 CreateColorBlendStateType fpCreateColorBlendState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateColorBlendState");
178 nextTable.CreateColorBlendState = fpCreateColorBlendState;
179 CreateDepthStencilStateType fpCreateDepthStencilState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDepthStencilState");
180 nextTable.CreateDepthStencilState = fpCreateDepthStencilState;
181 CreateCommandBufferType fpCreateCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateCommandBuffer");
182 nextTable.CreateCommandBuffer = fpCreateCommandBuffer;
183 BeginCommandBufferType fpBeginCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglBeginCommandBuffer");
184 nextTable.BeginCommandBuffer = fpBeginCommandBuffer;
185 EndCommandBufferType fpEndCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglEndCommandBuffer");
186 nextTable.EndCommandBuffer = fpEndCommandBuffer;
187 ResetCommandBufferType fpResetCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglResetCommandBuffer");
188 nextTable.ResetCommandBuffer = fpResetCommandBuffer;
189 CmdBindPipelineType fpCmdBindPipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindPipeline");
190 nextTable.CmdBindPipeline = fpCmdBindPipeline;
191 CmdBindPipelineDeltaType fpCmdBindPipelineDelta = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindPipelineDelta");
192 nextTable.CmdBindPipelineDelta = fpCmdBindPipelineDelta;
193 CmdBindStateObjectType fpCmdBindStateObject = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindStateObject");
194 nextTable.CmdBindStateObject = fpCmdBindStateObject;
195 CmdBindDescriptorSetType fpCmdBindDescriptorSet = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindDescriptorSet");
196 nextTable.CmdBindDescriptorSet = fpCmdBindDescriptorSet;
197 CmdBindDynamicMemoryViewType fpCmdBindDynamicMemoryView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindDynamicMemoryView");
198 nextTable.CmdBindDynamicMemoryView = fpCmdBindDynamicMemoryView;
199 CmdBindIndexDataType fpCmdBindIndexData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindIndexData");
200 nextTable.CmdBindIndexData = fpCmdBindIndexData;
201 CmdBindAttachmentsType fpCmdBindAttachments = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindAttachments");
202 nextTable.CmdBindAttachments = fpCmdBindAttachments;
203 CmdPrepareMemoryRegionsType fpCmdPrepareMemoryRegions = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdPrepareMemoryRegions");
204 nextTable.CmdPrepareMemoryRegions = fpCmdPrepareMemoryRegions;
205 CmdPrepareImagesType fpCmdPrepareImages = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdPrepareImages");
206 nextTable.CmdPrepareImages = fpCmdPrepareImages;
207 CmdDrawType fpCmdDraw = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDraw");
208 nextTable.CmdDraw = fpCmdDraw;
209 CmdDrawIndexedType fpCmdDrawIndexed = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDrawIndexed");
210 nextTable.CmdDrawIndexed = fpCmdDrawIndexed;
211 CmdDrawIndirectType fpCmdDrawIndirect = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDrawIndirect");
212 nextTable.CmdDrawIndirect = fpCmdDrawIndirect;
213 CmdDrawIndexedIndirectType fpCmdDrawIndexedIndirect = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDrawIndexedIndirect");
214 nextTable.CmdDrawIndexedIndirect = fpCmdDrawIndexedIndirect;
215 CmdDispatchType fpCmdDispatch = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDispatch");
216 nextTable.CmdDispatch = fpCmdDispatch;
217 CmdDispatchIndirectType fpCmdDispatchIndirect = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDispatchIndirect");
218 nextTable.CmdDispatchIndirect = fpCmdDispatchIndirect;
219 CmdCopyMemoryType fpCmdCopyMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyMemory");
220 nextTable.CmdCopyMemory = fpCmdCopyMemory;
221 CmdCopyImageType fpCmdCopyImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyImage");
222 nextTable.CmdCopyImage = fpCmdCopyImage;
223 CmdCopyMemoryToImageType fpCmdCopyMemoryToImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyMemoryToImage");
224 nextTable.CmdCopyMemoryToImage = fpCmdCopyMemoryToImage;
225 CmdCopyImageToMemoryType fpCmdCopyImageToMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyImageToMemory");
226 nextTable.CmdCopyImageToMemory = fpCmdCopyImageToMemory;
227 CmdCloneImageDataType fpCmdCloneImageData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCloneImageData");
228 nextTable.CmdCloneImageData = fpCmdCloneImageData;
229 CmdUpdateMemoryType fpCmdUpdateMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdUpdateMemory");
230 nextTable.CmdUpdateMemory = fpCmdUpdateMemory;
231 CmdFillMemoryType fpCmdFillMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdFillMemory");
232 nextTable.CmdFillMemory = fpCmdFillMemory;
233 CmdClearColorImageType fpCmdClearColorImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdClearColorImage");
234 nextTable.CmdClearColorImage = fpCmdClearColorImage;
235 CmdClearColorImageRawType fpCmdClearColorImageRaw = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdClearColorImageRaw");
236 nextTable.CmdClearColorImageRaw = fpCmdClearColorImageRaw;
237 CmdClearDepthStencilType fpCmdClearDepthStencil = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdClearDepthStencil");
238 nextTable.CmdClearDepthStencil = fpCmdClearDepthStencil;
239 CmdResolveImageType fpCmdResolveImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdResolveImage");
240 nextTable.CmdResolveImage = fpCmdResolveImage;
241 CmdSetEventType fpCmdSetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdSetEvent");
242 nextTable.CmdSetEvent = fpCmdSetEvent;
243 CmdResetEventType fpCmdResetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdResetEvent");
244 nextTable.CmdResetEvent = fpCmdResetEvent;
245 CmdMemoryAtomicType fpCmdMemoryAtomic = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdMemoryAtomic");
246 nextTable.CmdMemoryAtomic = fpCmdMemoryAtomic;
247 CmdBeginQueryType fpCmdBeginQuery = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBeginQuery");
248 nextTable.CmdBeginQuery = fpCmdBeginQuery;
249 CmdEndQueryType fpCmdEndQuery = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdEndQuery");
250 nextTable.CmdEndQuery = fpCmdEndQuery;
251 CmdResetQueryPoolType fpCmdResetQueryPool = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdResetQueryPool");
252 nextTable.CmdResetQueryPool = fpCmdResetQueryPool;
253 CmdWriteTimestampType fpCmdWriteTimestamp = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdWriteTimestamp");
254 nextTable.CmdWriteTimestamp = fpCmdWriteTimestamp;
255 CmdInitAtomicCountersType fpCmdInitAtomicCounters = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdInitAtomicCounters");
256 nextTable.CmdInitAtomicCounters = fpCmdInitAtomicCounters;
257 CmdLoadAtomicCountersType fpCmdLoadAtomicCounters = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdLoadAtomicCounters");
258 nextTable.CmdLoadAtomicCounters = fpCmdLoadAtomicCounters;
259 CmdSaveAtomicCountersType fpCmdSaveAtomicCounters = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdSaveAtomicCounters");
260 nextTable.CmdSaveAtomicCounters = fpCmdSaveAtomicCounters;
261 DbgSetValidationLevelType fpDbgSetValidationLevel = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetValidationLevel");
262 nextTable.DbgSetValidationLevel = fpDbgSetValidationLevel;
263 DbgRegisterMsgCallbackType fpDbgRegisterMsgCallback = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgRegisterMsgCallback");
264 nextTable.DbgRegisterMsgCallback = fpDbgRegisterMsgCallback;
265 DbgUnregisterMsgCallbackType fpDbgUnregisterMsgCallback = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgUnregisterMsgCallback");
266 nextTable.DbgUnregisterMsgCallback = fpDbgUnregisterMsgCallback;
267 DbgSetMessageFilterType fpDbgSetMessageFilter = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetMessageFilter");
268 nextTable.DbgSetMessageFilter = fpDbgSetMessageFilter;
269 DbgSetObjectTagType fpDbgSetObjectTag = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetObjectTag");
270 nextTable.DbgSetObjectTag = fpDbgSetObjectTag;
271 DbgSetGlobalOptionType fpDbgSetGlobalOption = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetGlobalOption");
272 nextTable.DbgSetGlobalOption = fpDbgSetGlobalOption;
273 DbgSetDeviceOptionType fpDbgSetDeviceOption = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetDeviceOption");
274 nextTable.DbgSetDeviceOption = fpDbgSetDeviceOption;
275 CmdDbgMarkerBeginType fpCmdDbgMarkerBegin = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDbgMarkerBegin");
276 nextTable.CmdDbgMarkerBegin = fpCmdDbgMarkerBegin;
277 CmdDbgMarkerEndType fpCmdDbgMarkerEnd = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDbgMarkerEnd");
278 nextTable.CmdDbgMarkerEnd = fpCmdDbgMarkerEnd;
279 WsiX11AssociateConnectionType fpWsiX11AssociateConnection = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11AssociateConnection");
280 nextTable.WsiX11AssociateConnection = fpWsiX11AssociateConnection;
281 WsiX11GetMSCType fpWsiX11GetMSC = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11GetMSC");
282 nextTable.WsiX11GetMSC = fpWsiX11GetMSC;
283 WsiX11CreatePresentableImageType fpWsiX11CreatePresentableImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11CreatePresentableImage");
284 nextTable.WsiX11CreatePresentableImage = fpWsiX11CreatePresentableImage;
285 WsiX11QueuePresentType fpWsiX11QueuePresent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11QueuePresent");
286 nextTable.WsiX11QueuePresent = fpWsiX11QueuePresent;
287}
288
289
290XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetGpuInfo(XGL_PHYSICAL_GPU gpu, XGL_PHYSICAL_GPU_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
291{
292 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600293 pCurObj = gpuw;
294 pthread_once(&tabOnce, initLayerTable);
295 XGL_RESULT result = nextTable.GetGpuInfo((XGL_PHYSICAL_GPU)gpuw->nextObject, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600296 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 -0600297 return result;
298}
299
300XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDevice(XGL_PHYSICAL_GPU gpu, const XGL_DEVICE_CREATE_INFO* pCreateInfo, XGL_DEVICE* pDevice)
301{
302 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600303 pCurObj = gpuw;
304 pthread_once(&tabOnce, initLayerTable);
305 XGL_RESULT result = nextTable.CreateDevice((XGL_PHYSICAL_GPU)gpuw->nextObject, pCreateInfo, pDevice);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600306 printf("xglCreateDevice(gpu = %p, pCreateInfo = %p, pDevice = %p) = %s\n", (void*)gpu, (void*)pCreateInfo, (void*)*pDevice, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600307 char *pTmpStr = xgl_print_xgl_device_create_info(pCreateInfo, " ");
308 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
309 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600310 return result;
311}
312
313XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDestroyDevice(XGL_DEVICE device)
314{
315 XGL_RESULT result = nextTable.DestroyDevice(device);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600316 printf("xglDestroyDevice(device = %p) = %s\n", (void*)device, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600317 return result;
318}
319
320XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetExtensionSupport(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* pExtName)
321{
322 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600323 pCurObj = gpuw;
324 pthread_once(&tabOnce, initLayerTable);
325 XGL_RESULT result = nextTable.GetExtensionSupport((XGL_PHYSICAL_GPU)gpuw->nextObject, pExtName);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600326 printf("xglGetExtensionSupport(gpu = %p, pExtName = %p) = %s\n", (void*)gpu, (void*)pExtName, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600327 return result;
328}
329
330XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglEnumerateLayers(XGL_PHYSICAL_GPU gpu, XGL_SIZE maxLayerCount, XGL_SIZE maxStringSize, XGL_CHAR* const* pOutLayers, XGL_SIZE * pOutLayerCount)
331{
332 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600333 pCurObj = gpuw;
334 pthread_once(&tabOnce, initLayerTable);
335 XGL_RESULT result = nextTable.EnumerateLayers((XGL_PHYSICAL_GPU)gpuw->nextObject, maxLayerCount, maxStringSize, pOutLayers, pOutLayerCount);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600336 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 -0600337 return result;
338}
339
340XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetDeviceQueue(XGL_DEVICE device, XGL_QUEUE_TYPE queueType, XGL_UINT queueIndex, XGL_QUEUE* pQueue)
341{
342 XGL_RESULT result = nextTable.GetDeviceQueue(device, queueType, queueIndex, pQueue);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600343 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 -0600344 return result;
345}
346
347XGL_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)
348{
349 XGL_RESULT result = nextTable.QueueSubmit(queue, cmdBufferCount, pCmdBuffers, memRefCount, pMemRefs, fence);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600350 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 Ehlis817736c2014-10-21 10:47:45 -0600351 return result;
352}
353
354XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglQueueSetGlobalMemReferences(XGL_QUEUE queue, XGL_UINT memRefCount, const XGL_MEMORY_REF* pMemRefs)
355{
356 XGL_RESULT result = nextTable.QueueSetGlobalMemReferences(queue, memRefCount, pMemRefs);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600357 printf("xglQueueSetGlobalMemReferences(queue = %p, memRefCount = %i, pMemRefs = %p) = %s\n", (void*)queue, memRefCount, (void*)pMemRefs, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600358 return result;
359}
360
361XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglQueueWaitIdle(XGL_QUEUE queue)
362{
363 XGL_RESULT result = nextTable.QueueWaitIdle(queue);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600364 printf("xglQueueWaitIdle(queue = %p) = %s\n", (void*)queue, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600365 return result;
366}
367
368XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDeviceWaitIdle(XGL_DEVICE device)
369{
370 XGL_RESULT result = nextTable.DeviceWaitIdle(device);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600371 printf("xglDeviceWaitIdle(device = %p) = %s\n", (void*)device, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600372 return result;
373}
374
375XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetMemoryHeapCount(XGL_DEVICE device, XGL_UINT* pCount)
376{
377 XGL_RESULT result = nextTable.GetMemoryHeapCount(device, pCount);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600378 printf("xglGetMemoryHeapCount(device = %p, pCount = %i) = %s\n", (void*)device, *pCount, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600379 return result;
380}
381
382XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetMemoryHeapInfo(XGL_DEVICE device, XGL_UINT heapId, XGL_MEMORY_HEAP_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
383{
384 XGL_RESULT result = nextTable.GetMemoryHeapInfo(device, heapId, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600385 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 -0600386 return result;
387}
388
389XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglAllocMemory(XGL_DEVICE device, const XGL_MEMORY_ALLOC_INFO* pAllocInfo, XGL_GPU_MEMORY* pMem)
390{
391 XGL_RESULT result = nextTable.AllocMemory(device, pAllocInfo, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600392 printf("xglAllocMemory(device = %p, pAllocInfo = %p, pMem = %p) = %s\n", (void*)device, (void*)pAllocInfo, (void*)pMem, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600393 return result;
394}
395
396XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglFreeMemory(XGL_GPU_MEMORY mem)
397{
398 XGL_RESULT result = nextTable.FreeMemory(mem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600399 printf("xglFreeMemory(mem = %p) = %s\n", (void*)mem, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600400 return result;
401}
402
403XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglSetMemoryPriority(XGL_GPU_MEMORY mem, XGL_MEMORY_PRIORITY priority)
404{
405 XGL_RESULT result = nextTable.SetMemoryPriority(mem, priority);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600406 printf("xglSetMemoryPriority(mem = %p, priority = %p) = %s\n", (void*)mem, (void*)priority, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600407 return result;
408}
409
410XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglMapMemory(XGL_GPU_MEMORY mem, XGL_FLAGS flags, XGL_VOID** ppData)
411{
412 XGL_RESULT result = nextTable.MapMemory(mem, flags, ppData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600413 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 -0600414 return result;
415}
416
417XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglUnmapMemory(XGL_GPU_MEMORY mem)
418{
419 XGL_RESULT result = nextTable.UnmapMemory(mem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600420 printf("xglUnmapMemory(mem = %p) = %s\n", (void*)mem, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600421 return result;
422}
423
424XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglPinSystemMemory(XGL_DEVICE device, const XGL_VOID* pSysMem, XGL_SIZE memSize, XGL_GPU_MEMORY* pMem)
425{
426 XGL_RESULT result = nextTable.PinSystemMemory(device, pSysMem, memSize, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600427 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 -0600428 return result;
429}
430
431XGL_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)
432{
433 XGL_RESULT result = nextTable.RemapVirtualMemoryPages(device, rangeCount, pRanges, preWaitSemaphoreCount, pPreWaitSemaphores, postSignalSemaphoreCount, pPostSignalSemaphores);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600434 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 Ehlis817736c2014-10-21 10:47:45 -0600435 return result;
436}
437
438XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetMultiGpuCompatibility(XGL_PHYSICAL_GPU gpu0, XGL_PHYSICAL_GPU gpu1, XGL_GPU_COMPATIBILITY_INFO* pInfo)
439{
440 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu0;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600441 pCurObj = gpuw;
442 pthread_once(&tabOnce, initLayerTable);
443 XGL_RESULT result = nextTable.GetMultiGpuCompatibility((XGL_PHYSICAL_GPU)gpuw->nextObject, gpu1, pInfo);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600444 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 -0600445 return result;
446}
447
448XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenSharedMemory(XGL_DEVICE device, const XGL_MEMORY_OPEN_INFO* pOpenInfo, XGL_GPU_MEMORY* pMem)
449{
450 XGL_RESULT result = nextTable.OpenSharedMemory(device, pOpenInfo, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600451 printf("xglOpenSharedMemory(device = %p, pOpenInfo = %p, pMem = %p) = %s\n", (void*)device, (void*)pOpenInfo, (void*)pMem, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600452 return result;
453}
454
455XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenSharedQueueSemaphore(XGL_DEVICE device, const XGL_QUEUE_SEMAPHORE_OPEN_INFO* pOpenInfo, XGL_QUEUE_SEMAPHORE* pSemaphore)
456{
457 XGL_RESULT result = nextTable.OpenSharedQueueSemaphore(device, pOpenInfo, pSemaphore);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600458 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 -0600459 return result;
460}
461
462XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenPeerMemory(XGL_DEVICE device, const XGL_PEER_MEMORY_OPEN_INFO* pOpenInfo, XGL_GPU_MEMORY* pMem)
463{
464 XGL_RESULT result = nextTable.OpenPeerMemory(device, pOpenInfo, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600465 printf("xglOpenPeerMemory(device = %p, pOpenInfo = %p, pMem = %p) = %s\n", (void*)device, (void*)pOpenInfo, (void*)pMem, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600466 return result;
467}
468
469XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenPeerImage(XGL_DEVICE device, const XGL_PEER_IMAGE_OPEN_INFO* pOpenInfo, XGL_IMAGE* pImage, XGL_GPU_MEMORY* pMem)
470{
471 XGL_RESULT result = nextTable.OpenPeerImage(device, pOpenInfo, pImage, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600472 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 Ehlis817736c2014-10-21 10:47:45 -0600473 return result;
474}
475
476XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDestroyObject(XGL_OBJECT object)
477{
478 XGL_RESULT result = nextTable.DestroyObject(object);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600479 printf("xglDestroyObject(object = %p) = %s\n", (void*)object, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600480 return result;
481}
482
483XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetObjectInfo(XGL_BASE_OBJECT object, XGL_OBJECT_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
484{
485 XGL_RESULT result = nextTable.GetObjectInfo(object, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600486 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 -0600487 return result;
488}
489
490XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglBindObjectMemory(XGL_OBJECT object, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset)
491{
492 XGL_RESULT result = nextTable.BindObjectMemory(object, mem, offset);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600493 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 -0600494 return result;
495}
496
497XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateFence(XGL_DEVICE device, const XGL_FENCE_CREATE_INFO* pCreateInfo, XGL_FENCE* pFence)
498{
499 XGL_RESULT result = nextTable.CreateFence(device, pCreateInfo, pFence);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600500 printf("xglCreateFence(device = %p, pCreateInfo = %p, pFence = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pFence, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600501 char *pTmpStr = xgl_print_xgl_fence_create_info(pCreateInfo, " ");
502 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
503 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600504 return result;
505}
506
507XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetFenceStatus(XGL_FENCE fence)
508{
509 XGL_RESULT result = nextTable.GetFenceStatus(fence);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600510 printf("xglGetFenceStatus(fence = %p) = %s\n", (void*)fence, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600511 return result;
512}
513
514XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWaitForFences(XGL_DEVICE device, XGL_UINT fenceCount, const XGL_FENCE* pFences, XGL_BOOL waitAll, XGL_UINT64 timeout)
515{
516 XGL_RESULT result = nextTable.WaitForFences(device, fenceCount, pFences, waitAll, timeout);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600517 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 -0600518 return result;
519}
520
521XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateQueueSemaphore(XGL_DEVICE device, const XGL_QUEUE_SEMAPHORE_CREATE_INFO* pCreateInfo, XGL_QUEUE_SEMAPHORE* pSemaphore)
522{
523 XGL_RESULT result = nextTable.CreateQueueSemaphore(device, pCreateInfo, pSemaphore);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600524 printf("xglCreateQueueSemaphore(device = %p, pCreateInfo = %p, pSemaphore = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pSemaphore, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600525 char *pTmpStr = xgl_print_xgl_queue_semaphore_create_info(pCreateInfo, " ");
526 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
527 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600528 return result;
529}
530
531XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglSignalQueueSemaphore(XGL_QUEUE queue, XGL_QUEUE_SEMAPHORE semaphore)
532{
533 XGL_RESULT result = nextTable.SignalQueueSemaphore(queue, semaphore);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600534 printf("xglSignalQueueSemaphore(queue = %p, semaphore = %p) = %s\n", (void*)queue, (void*)semaphore, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600535 return result;
536}
537
538XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWaitQueueSemaphore(XGL_QUEUE queue, XGL_QUEUE_SEMAPHORE semaphore)
539{
540 XGL_RESULT result = nextTable.WaitQueueSemaphore(queue, semaphore);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600541 printf("xglWaitQueueSemaphore(queue = %p, semaphore = %p) = %s\n", (void*)queue, (void*)semaphore, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600542 return result;
543}
544
545XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateEvent(XGL_DEVICE device, const XGL_EVENT_CREATE_INFO* pCreateInfo, XGL_EVENT* pEvent)
546{
547 XGL_RESULT result = nextTable.CreateEvent(device, pCreateInfo, pEvent);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600548 printf("xglCreateEvent(device = %p, pCreateInfo = %p, pEvent = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pEvent, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600549 char *pTmpStr = xgl_print_xgl_event_create_info(pCreateInfo, " ");
550 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
551 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600552 return result;
553}
554
555XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetEventStatus(XGL_EVENT event)
556{
557 XGL_RESULT result = nextTable.GetEventStatus(event);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600558 printf("xglGetEventStatus(event = %p) = %s\n", (void*)event, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600559 return result;
560}
561
562XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglSetEvent(XGL_EVENT event)
563{
564 XGL_RESULT result = nextTable.SetEvent(event);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600565 printf("xglSetEvent(event = %p) = %s\n", (void*)event, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600566 return result;
567}
568
569XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglResetEvent(XGL_EVENT event)
570{
571 XGL_RESULT result = nextTable.ResetEvent(event);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600572 printf("xglResetEvent(event = %p) = %s\n", (void*)event, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600573 return result;
574}
575
576XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateQueryPool(XGL_DEVICE device, const XGL_QUERY_POOL_CREATE_INFO* pCreateInfo, XGL_QUERY_POOL* pQueryPool)
577{
578 XGL_RESULT result = nextTable.CreateQueryPool(device, pCreateInfo, pQueryPool);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600579 printf("xglCreateQueryPool(device = %p, pCreateInfo = %p, pQueryPool = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pQueryPool, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600580 char *pTmpStr = xgl_print_xgl_query_pool_create_info(pCreateInfo, " ");
581 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
582 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600583 return result;
584}
585
586XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetQueryPoolResults(XGL_QUERY_POOL queryPool, XGL_UINT startQuery, XGL_UINT queryCount, XGL_SIZE* pDataSize, XGL_VOID* pData)
587{
588 XGL_RESULT result = nextTable.GetQueryPoolResults(queryPool, startQuery, queryCount, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600589 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 -0600590 return result;
591}
592
593XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetFormatInfo(XGL_DEVICE device, XGL_FORMAT format, XGL_FORMAT_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
594{
595 XGL_RESULT result = nextTable.GetFormatInfo(device, format, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600596 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 -0600597 return result;
598}
599
600XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateImage(XGL_DEVICE device, const XGL_IMAGE_CREATE_INFO* pCreateInfo, XGL_IMAGE* pImage)
601{
602 XGL_RESULT result = nextTable.CreateImage(device, pCreateInfo, pImage);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600603 printf("xglCreateImage(device = %p, pCreateInfo = %p, pImage = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pImage, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600604 char *pTmpStr = xgl_print_xgl_image_create_info(pCreateInfo, " ");
605 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
606 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600607 return result;
608}
609
610XGL_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)
611{
612 XGL_RESULT result = nextTable.GetImageSubresourceInfo(image, pSubresource, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600613 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 Ehlis817736c2014-10-21 10:47:45 -0600614 return result;
615}
616
617XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateImageView(XGL_DEVICE device, const XGL_IMAGE_VIEW_CREATE_INFO* pCreateInfo, XGL_IMAGE_VIEW* pView)
618{
619 XGL_RESULT result = nextTable.CreateImageView(device, pCreateInfo, pView);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600620 printf("xglCreateImageView(device = %p, pCreateInfo = %p, pView = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pView, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600621 char *pTmpStr = xgl_print_xgl_image_view_create_info(pCreateInfo, " ");
622 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
623 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600624 return result;
625}
626
627XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateColorAttachmentView(XGL_DEVICE device, const XGL_COLOR_ATTACHMENT_VIEW_CREATE_INFO* pCreateInfo, XGL_COLOR_ATTACHMENT_VIEW* pView)
628{
629 XGL_RESULT result = nextTable.CreateColorAttachmentView(device, pCreateInfo, pView);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600630 printf("xglCreateColorAttachmentView(device = %p, pCreateInfo = %p, pView = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pView, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600631 char *pTmpStr = xgl_print_xgl_color_attachment_view_create_info(pCreateInfo, " ");
632 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
633 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600634 return result;
635}
636
637XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDepthStencilView(XGL_DEVICE device, const XGL_DEPTH_STENCIL_VIEW_CREATE_INFO* pCreateInfo, XGL_DEPTH_STENCIL_VIEW* pView)
638{
639 XGL_RESULT result = nextTable.CreateDepthStencilView(device, pCreateInfo, pView);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600640 printf("xglCreateDepthStencilView(device = %p, pCreateInfo = %p, pView = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pView, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600641 char *pTmpStr = xgl_print_xgl_depth_stencil_view_create_info(pCreateInfo, " ");
642 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
643 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600644 return result;
645}
646
647XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateShader(XGL_DEVICE device, const XGL_SHADER_CREATE_INFO* pCreateInfo, XGL_SHADER* pShader)
648{
649 XGL_RESULT result = nextTable.CreateShader(device, pCreateInfo, pShader);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600650 printf("xglCreateShader(device = %p, pCreateInfo = %p, pShader = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pShader, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600651 char *pTmpStr = xgl_print_xgl_shader_create_info(pCreateInfo, " ");
652 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
653 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600654 return result;
655}
656
657XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateGraphicsPipeline(XGL_DEVICE device, const XGL_GRAPHICS_PIPELINE_CREATE_INFO* pCreateInfo, XGL_PIPELINE* pPipeline)
658{
659 XGL_RESULT result = nextTable.CreateGraphicsPipeline(device, pCreateInfo, pPipeline);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600660 printf("xglCreateGraphicsPipeline(device = %p, pCreateInfo = %p, pPipeline = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pPipeline, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600661 char *pTmpStr = xgl_print_xgl_graphics_pipeline_create_info(pCreateInfo, " ");
662 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
663 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600664 return result;
665}
666
667XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateComputePipeline(XGL_DEVICE device, const XGL_COMPUTE_PIPELINE_CREATE_INFO* pCreateInfo, XGL_PIPELINE* pPipeline)
668{
669 XGL_RESULT result = nextTable.CreateComputePipeline(device, pCreateInfo, pPipeline);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600670 printf("xglCreateComputePipeline(device = %p, pCreateInfo = %p, pPipeline = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pPipeline, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600671 char *pTmpStr = xgl_print_xgl_compute_pipeline_create_info(pCreateInfo, " ");
672 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
673 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600674 return result;
675}
676
677XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglStorePipeline(XGL_PIPELINE pipeline, XGL_SIZE* pDataSize, XGL_VOID* pData)
678{
679 XGL_RESULT result = nextTable.StorePipeline(pipeline, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600680 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 -0600681 return result;
682}
683
684XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglLoadPipeline(XGL_DEVICE device, XGL_SIZE dataSize, const XGL_VOID* pData, XGL_PIPELINE* pPipeline)
685{
686 XGL_RESULT result = nextTable.LoadPipeline(device, dataSize, pData, pPipeline);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600687 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 -0600688 return result;
689}
690
691XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreatePipelineDelta(XGL_DEVICE device, XGL_PIPELINE p1, XGL_PIPELINE p2, XGL_PIPELINE_DELTA* delta)
692{
693 XGL_RESULT result = nextTable.CreatePipelineDelta(device, p1, p2, delta);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600694 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 -0600695 return result;
696}
697
698XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateSampler(XGL_DEVICE device, const XGL_SAMPLER_CREATE_INFO* pCreateInfo, XGL_SAMPLER* pSampler)
699{
700 XGL_RESULT result = nextTable.CreateSampler(device, pCreateInfo, pSampler);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600701 printf("xglCreateSampler(device = %p, pCreateInfo = %p, pSampler = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pSampler, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600702 char *pTmpStr = xgl_print_xgl_sampler_create_info(pCreateInfo, " ");
703 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
704 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600705 return result;
706}
707
708XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDescriptorSet(XGL_DEVICE device, const XGL_DESCRIPTOR_SET_CREATE_INFO* pCreateInfo, XGL_DESCRIPTOR_SET* pDescriptorSet)
709{
710 XGL_RESULT result = nextTable.CreateDescriptorSet(device, pCreateInfo, pDescriptorSet);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600711 printf("xglCreateDescriptorSet(device = %p, pCreateInfo = %p, pDescriptorSet = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pDescriptorSet, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600712 char *pTmpStr = xgl_print_xgl_descriptor_set_create_info(pCreateInfo, " ");
713 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
714 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600715 return result;
716}
717
718XGL_LAYER_EXPORT XGL_VOID XGLAPI xglBeginDescriptorSetUpdate(XGL_DESCRIPTOR_SET descriptorSet)
719{
720 nextTable.BeginDescriptorSetUpdate(descriptorSet);
721 printf("xglBeginDescriptorSetUpdate(descriptorSet = %p)\n", (void*)descriptorSet);
722}
723
724XGL_LAYER_EXPORT XGL_VOID XGLAPI xglEndDescriptorSetUpdate(XGL_DESCRIPTOR_SET descriptorSet)
725{
726 nextTable.EndDescriptorSetUpdate(descriptorSet);
727 printf("xglEndDescriptorSetUpdate(descriptorSet = %p)\n", (void*)descriptorSet);
728}
729
730XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachSamplerDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_SAMPLER* pSamplers)
731{
732 nextTable.AttachSamplerDescriptors(descriptorSet, startSlot, slotCount, pSamplers);
733 printf("xglAttachSamplerDescriptors(descriptorSet = %p, startSlot = %i, slotCount = %i, pSamplers = %p)\n", (void*)descriptorSet, startSlot, slotCount, (void*)pSamplers);
734}
735
736XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachImageViewDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_IMAGE_VIEW_ATTACH_INFO* pImageViews)
737{
738 nextTable.AttachImageViewDescriptors(descriptorSet, startSlot, slotCount, pImageViews);
739 printf("xglAttachImageViewDescriptors(descriptorSet = %p, startSlot = %i, slotCount = %i, pImageViews = %p)\n", (void*)descriptorSet, startSlot, slotCount, (void*)pImageViews);
740}
741
742XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachMemoryViewDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_MEMORY_VIEW_ATTACH_INFO* pMemViews)
743{
744 nextTable.AttachMemoryViewDescriptors(descriptorSet, startSlot, slotCount, pMemViews);
745 printf("xglAttachMemoryViewDescriptors(descriptorSet = %p, startSlot = %i, slotCount = %i, pMemViews = %p)\n", (void*)descriptorSet, startSlot, slotCount, (void*)pMemViews);
746}
747
748XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachNestedDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_DESCRIPTOR_SET_ATTACH_INFO* pNestedDescriptorSets)
749{
750 nextTable.AttachNestedDescriptors(descriptorSet, startSlot, slotCount, pNestedDescriptorSets);
751 printf("xglAttachNestedDescriptors(descriptorSet = %p, startSlot = %i, slotCount = %i, pNestedDescriptorSets = %p)\n", (void*)descriptorSet, startSlot, slotCount, (void*)pNestedDescriptorSets);
752}
753
754XGL_LAYER_EXPORT XGL_VOID XGLAPI xglClearDescriptorSetSlots(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount)
755{
756 nextTable.ClearDescriptorSetSlots(descriptorSet, startSlot, slotCount);
757 printf("xglClearDescriptorSetSlots(descriptorSet = %p, startSlot = %i, slotCount = %i)\n", (void*)descriptorSet, startSlot, slotCount);
758}
759
760XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateViewportState(XGL_DEVICE device, const XGL_VIEWPORT_STATE_CREATE_INFO* pCreateInfo, XGL_VIEWPORT_STATE_OBJECT* pState)
761{
762 XGL_RESULT result = nextTable.CreateViewportState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600763 printf("xglCreateViewportState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600764 char *pTmpStr = xgl_print_xgl_viewport_state_create_info(pCreateInfo, " ");
765 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
766 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600767 return result;
768}
769
770XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateRasterState(XGL_DEVICE device, const XGL_RASTER_STATE_CREATE_INFO* pCreateInfo, XGL_RASTER_STATE_OBJECT* pState)
771{
772 XGL_RESULT result = nextTable.CreateRasterState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600773 printf("xglCreateRasterState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600774 char *pTmpStr = xgl_print_xgl_raster_state_create_info(pCreateInfo, " ");
775 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
776 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600777 return result;
778}
779
780XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateMsaaState(XGL_DEVICE device, const XGL_MSAA_STATE_CREATE_INFO* pCreateInfo, XGL_MSAA_STATE_OBJECT* pState)
781{
782 XGL_RESULT result = nextTable.CreateMsaaState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600783 printf("xglCreateMsaaState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600784 char *pTmpStr = xgl_print_xgl_msaa_state_create_info(pCreateInfo, " ");
785 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
786 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600787 return result;
788}
789
790XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateColorBlendState(XGL_DEVICE device, const XGL_COLOR_BLEND_STATE_CREATE_INFO* pCreateInfo, XGL_COLOR_BLEND_STATE_OBJECT* pState)
791{
792 XGL_RESULT result = nextTable.CreateColorBlendState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600793 printf("xglCreateColorBlendState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600794 char *pTmpStr = xgl_print_xgl_color_blend_state_create_info(pCreateInfo, " ");
795 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
796 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600797 return result;
798}
799
800XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDepthStencilState(XGL_DEVICE device, const XGL_DEPTH_STENCIL_STATE_CREATE_INFO* pCreateInfo, XGL_DEPTH_STENCIL_STATE_OBJECT* pState)
801{
802 XGL_RESULT result = nextTable.CreateDepthStencilState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600803 printf("xglCreateDepthStencilState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600804 char *pTmpStr = xgl_print_xgl_depth_stencil_state_create_info(pCreateInfo, " ");
805 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
806 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600807 return result;
808}
809
810XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateCommandBuffer(XGL_DEVICE device, const XGL_CMD_BUFFER_CREATE_INFO* pCreateInfo, XGL_CMD_BUFFER* pCmdBuffer)
811{
812 XGL_RESULT result = nextTable.CreateCommandBuffer(device, pCreateInfo, pCmdBuffer);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600813 printf("xglCreateCommandBuffer(device = %p, pCreateInfo = %p, pCmdBuffer = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pCmdBuffer, string_XGL_RESULT(result));
Tobin Ehlisee33fa52014-10-22 15:13:53 -0600814 char *pTmpStr = xgl_print_xgl_cmd_buffer_create_info(pCreateInfo, " ");
815 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
816 free(pTmpStr);
Tobin Ehlis817736c2014-10-21 10:47:45 -0600817 return result;
818}
819
820XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglBeginCommandBuffer(XGL_CMD_BUFFER cmdBuffer, XGL_FLAGS flags)
821{
822 XGL_RESULT result = nextTable.BeginCommandBuffer(cmdBuffer, flags);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600823 printf("xglBeginCommandBuffer(cmdBuffer = %p, flags = %i) = %s\n", (void*)cmdBuffer, flags, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600824 return result;
825}
826
827XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglEndCommandBuffer(XGL_CMD_BUFFER cmdBuffer)
828{
829 XGL_RESULT result = nextTable.EndCommandBuffer(cmdBuffer);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600830 printf("xglEndCommandBuffer(cmdBuffer = %p) = %s\n", (void*)cmdBuffer, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600831 return result;
832}
833
834XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglResetCommandBuffer(XGL_CMD_BUFFER cmdBuffer)
835{
836 XGL_RESULT result = nextTable.ResetCommandBuffer(cmdBuffer);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600837 printf("xglResetCommandBuffer(cmdBuffer = %p) = %s\n", (void*)cmdBuffer, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600838 return result;
839}
840
841XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindPipeline(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_PIPELINE pipeline)
842{
843 nextTable.CmdBindPipeline(cmdBuffer, pipelineBindPoint, pipeline);
844 printf("xglCmdBindPipeline(cmdBuffer = %p, pipelineBindPoint = %i, pipeline = %p)\n", (void*)cmdBuffer, pipelineBindPoint, (void*)pipeline);
845}
846
847XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindPipelineDelta(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_PIPELINE_DELTA delta)
848{
849 nextTable.CmdBindPipelineDelta(cmdBuffer, pipelineBindPoint, delta);
850 printf("xglCmdBindPipelineDelta(cmdBuffer = %p, pipelineBindPoint = %i, delta = %p)\n", (void*)cmdBuffer, pipelineBindPoint, (void*)delta);
851}
852
853XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindStateObject(XGL_CMD_BUFFER cmdBuffer, XGL_STATE_BIND_POINT stateBindPoint, XGL_STATE_OBJECT state)
854{
855 nextTable.CmdBindStateObject(cmdBuffer, stateBindPoint, state);
856 printf("xglCmdBindStateObject(cmdBuffer = %p, stateBindPoint = %i, state = %p)\n", (void*)cmdBuffer, stateBindPoint, (void*)state);
857}
858
859XGL_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)
860{
861 nextTable.CmdBindDescriptorSet(cmdBuffer, pipelineBindPoint, index, descriptorSet, slotOffset);
862 printf("xglCmdBindDescriptorSet(cmdBuffer = %p, pipelineBindPoint = %i, index = %i, descriptorSet = %p, slotOffset = %i)\n", (void*)cmdBuffer, pipelineBindPoint, index, (void*)descriptorSet, slotOffset);
863}
864
865XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindDynamicMemoryView(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, const XGL_MEMORY_VIEW_ATTACH_INFO* pMemView)
866{
867 nextTable.CmdBindDynamicMemoryView(cmdBuffer, pipelineBindPoint, pMemView);
868 printf("xglCmdBindDynamicMemoryView(cmdBuffer = %p, pipelineBindPoint = %i, pMemView = %p)\n", (void*)cmdBuffer, pipelineBindPoint, (void*)pMemView);
869}
870
871XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindIndexData(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_INDEX_TYPE indexType)
872{
873 nextTable.CmdBindIndexData(cmdBuffer, mem, offset, indexType);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600874 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 -0600875}
876
877XGL_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)
878{
879 nextTable.CmdBindAttachments(cmdBuffer, colorAttachmentCount, pColorAttachments, pDepthStencilAttachment);
880 printf("xglCmdBindAttachments(cmdBuffer = %p, colorAttachmentCount = %i, pColorAttachments = %p, pDepthStencilAttachment = %p)\n", (void*)cmdBuffer, colorAttachmentCount, (void*)pColorAttachments, (void*)pDepthStencilAttachment);
881}
882
883XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdPrepareMemoryRegions(XGL_CMD_BUFFER cmdBuffer, XGL_UINT transitionCount, const XGL_MEMORY_STATE_TRANSITION* pStateTransitions)
884{
885 nextTable.CmdPrepareMemoryRegions(cmdBuffer, transitionCount, pStateTransitions);
886 printf("xglCmdPrepareMemoryRegions(cmdBuffer = %p, transitionCount = %i, pStateTransitions = %p)\n", (void*)cmdBuffer, transitionCount, (void*)pStateTransitions);
887}
888
889XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdPrepareImages(XGL_CMD_BUFFER cmdBuffer, XGL_UINT transitionCount, const XGL_IMAGE_STATE_TRANSITION* pStateTransitions)
890{
891 nextTable.CmdPrepareImages(cmdBuffer, transitionCount, pStateTransitions);
892 printf("xglCmdPrepareImages(cmdBuffer = %p, transitionCount = %i, pStateTransitions = %p)\n", (void*)cmdBuffer, transitionCount, (void*)pStateTransitions);
893}
894
895XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDraw(XGL_CMD_BUFFER cmdBuffer, XGL_UINT firstVertex, XGL_UINT vertexCount, XGL_UINT firstInstance, XGL_UINT instanceCount)
896{
897 nextTable.CmdDraw(cmdBuffer, firstVertex, vertexCount, firstInstance, instanceCount);
898 printf("xglCmdDraw(cmdBuffer = %p, firstVertex = %i, vertexCount = %i, firstInstance = %i, instanceCount = %i)\n", (void*)cmdBuffer, firstVertex, vertexCount, firstInstance, instanceCount);
899}
900
901XGL_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)
902{
903 nextTable.CmdDrawIndexed(cmdBuffer, firstIndex, indexCount, vertexOffset, firstInstance, instanceCount);
904 printf("xglCmdDrawIndexed(cmdBuffer = %p, firstIndex = %i, indexCount = %i, vertexOffset = %i, firstInstance = %i, instanceCount = %i)\n", (void*)cmdBuffer, firstIndex, indexCount, vertexOffset, firstInstance, instanceCount);
905}
906
907XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDrawIndirect(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT32 count, XGL_UINT32 stride)
908{
909 nextTable.CmdDrawIndirect(cmdBuffer, mem, offset, count, stride);
910 printf("xglCmdDrawIndirect(cmdBuffer = %p, mem = %p, offset = %i, count = %i, stride = %i)\n", (void*)cmdBuffer, (void*)mem, offset, count, stride);
911}
912
913XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDrawIndexedIndirect(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT32 count, XGL_UINT32 stride)
914{
915 nextTable.CmdDrawIndexedIndirect(cmdBuffer, mem, offset, count, stride);
916 printf("xglCmdDrawIndexedIndirect(cmdBuffer = %p, mem = %p, offset = %i, count = %i, stride = %i)\n", (void*)cmdBuffer, (void*)mem, offset, count, stride);
917}
918
919XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDispatch(XGL_CMD_BUFFER cmdBuffer, XGL_UINT x, XGL_UINT y, XGL_UINT z)
920{
921 nextTable.CmdDispatch(cmdBuffer, x, y, z);
922 printf("xglCmdDispatch(cmdBuffer = %p, x = %i, y = %i, z = %i)\n", (void*)cmdBuffer, x, y, z);
923}
924
925XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDispatchIndirect(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset)
926{
927 nextTable.CmdDispatchIndirect(cmdBuffer, mem, offset);
928 printf("xglCmdDispatchIndirect(cmdBuffer = %p, mem = %p, offset = %i)\n", (void*)cmdBuffer, (void*)mem, offset);
929}
930
931XGL_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)
932{
933 nextTable.CmdCopyMemory(cmdBuffer, srcMem, destMem, regionCount, pRegions);
934 printf("xglCmdCopyMemory(cmdBuffer = %p, srcMem = %p, destMem = %p, regionCount = %i, pRegions = %p)\n", (void*)cmdBuffer, (void*)srcMem, (void*)destMem, regionCount, (void*)pRegions);
935}
936
937XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdCopyImage(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE destImage, XGL_UINT regionCount, const XGL_IMAGE_COPY* pRegions)
938{
939 nextTable.CmdCopyImage(cmdBuffer, srcImage, destImage, regionCount, pRegions);
940 printf("xglCmdCopyImage(cmdBuffer = %p, srcImage = %p, destImage = %p, regionCount = %i, pRegions = %p)\n", (void*)cmdBuffer, (void*)srcImage, (void*)destImage, regionCount, (void*)pRegions);
941}
942
943XGL_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)
944{
945 nextTable.CmdCopyMemoryToImage(cmdBuffer, srcMem, destImage, regionCount, pRegions);
946 printf("xglCmdCopyMemoryToImage(cmdBuffer = %p, srcMem = %p, destImage = %p, regionCount = %i, pRegions = %p)\n", (void*)cmdBuffer, (void*)srcMem, (void*)destImage, regionCount, (void*)pRegions);
947}
948
949XGL_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)
950{
951 nextTable.CmdCopyImageToMemory(cmdBuffer, srcImage, destMem, regionCount, pRegions);
952 printf("xglCmdCopyImageToMemory(cmdBuffer = %p, srcImage = %p, destMem = %p, regionCount = %i, pRegions = %p)\n", (void*)cmdBuffer, (void*)srcImage, (void*)destMem, regionCount, (void*)pRegions);
953}
954
955XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdCloneImageData(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE_STATE srcImageState, XGL_IMAGE destImage, XGL_IMAGE_STATE destImageState)
956{
957 nextTable.CmdCloneImageData(cmdBuffer, srcImage, srcImageState, destImage, destImageState);
958 printf("xglCmdCloneImageData(cmdBuffer = %p, srcImage = %p, srcImageState = %p, destImage = %p, destImageState = %p)\n", (void*)cmdBuffer, (void*)srcImage, (void*)srcImageState, (void*)destImage, (void*)destImageState);
959}
960
961XGL_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)
962{
963 nextTable.CmdUpdateMemory(cmdBuffer, destMem, destOffset, dataSize, pData);
964 printf("xglCmdUpdateMemory(cmdBuffer = %p, destMem = %p, destOffset = %i, dataSize = %i, pData = %i)\n", (void*)cmdBuffer, (void*)destMem, destOffset, dataSize, *pData);
965}
966
967XGL_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)
968{
969 nextTable.CmdFillMemory(cmdBuffer, destMem, destOffset, fillSize, data);
970 printf("xglCmdFillMemory(cmdBuffer = %p, destMem = %p, destOffset = %i, fillSize = %i, data = %i)\n", (void*)cmdBuffer, (void*)destMem, destOffset, fillSize, data);
971}
972
973XGL_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)
974{
975 nextTable.CmdClearColorImage(cmdBuffer, image, color, rangeCount, pRanges);
976 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);
977}
978
979XGL_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)
980{
981 nextTable.CmdClearColorImageRaw(cmdBuffer, image, color, rangeCount, pRanges);
982 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);
983}
984
985XGL_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)
986{
987 nextTable.CmdClearDepthStencil(cmdBuffer, image, depth, stencil, rangeCount, pRanges);
988 printf("xglCmdClearDepthStencil(cmdBuffer = %p, image = %p, depth = %f, stencil = %i, rangeCount = %i, pRanges = %p)\n", (void*)cmdBuffer, (void*)image, depth, stencil, rangeCount, (void*)pRanges);
989}
990
991XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdResolveImage(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE destImage, XGL_UINT rectCount, const XGL_IMAGE_RESOLVE* pRects)
992{
993 nextTable.CmdResolveImage(cmdBuffer, srcImage, destImage, rectCount, pRects);
994 printf("xglCmdResolveImage(cmdBuffer = %p, srcImage = %p, destImage = %p, rectCount = %i, pRects = %p)\n", (void*)cmdBuffer, (void*)srcImage, (void*)destImage, rectCount, (void*)pRects);
995}
996
997XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdSetEvent(XGL_CMD_BUFFER cmdBuffer, XGL_EVENT event)
998{
999 nextTable.CmdSetEvent(cmdBuffer, event);
1000 printf("xglCmdSetEvent(cmdBuffer = %p, event = %p)\n", (void*)cmdBuffer, (void*)event);
1001}
1002
1003XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdResetEvent(XGL_CMD_BUFFER cmdBuffer, XGL_EVENT event)
1004{
1005 nextTable.CmdResetEvent(cmdBuffer, event);
1006 printf("xglCmdResetEvent(cmdBuffer = %p, event = %p)\n", (void*)cmdBuffer, (void*)event);
1007}
1008
1009XGL_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)
1010{
1011 nextTable.CmdMemoryAtomic(cmdBuffer, destMem, destOffset, srcData, atomicOp);
1012 printf("xglCmdMemoryAtomic(cmdBuffer = %p, destMem = %p, destOffset = %i, srcData = %lu, atomicOp = %p)\n", (void*)cmdBuffer, (void*)destMem, destOffset, srcData, (void*)atomicOp);
1013}
1014
1015XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBeginQuery(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT slot, XGL_FLAGS flags)
1016{
1017 nextTable.CmdBeginQuery(cmdBuffer, queryPool, slot, flags);
1018 printf("xglCmdBeginQuery(cmdBuffer = %p, queryPool = %p, slot = %i, flags = %i)\n", (void*)cmdBuffer, (void*)queryPool, slot, flags);
1019}
1020
1021XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdEndQuery(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT slot)
1022{
1023 nextTable.CmdEndQuery(cmdBuffer, queryPool, slot);
1024 printf("xglCmdEndQuery(cmdBuffer = %p, queryPool = %p, slot = %i)\n", (void*)cmdBuffer, (void*)queryPool, slot);
1025}
1026
1027XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdResetQueryPool(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT startQuery, XGL_UINT queryCount)
1028{
1029 nextTable.CmdResetQueryPool(cmdBuffer, queryPool, startQuery, queryCount);
1030 printf("xglCmdResetQueryPool(cmdBuffer = %p, queryPool = %p, startQuery = %i, queryCount = %i)\n", (void*)cmdBuffer, (void*)queryPool, startQuery, queryCount);
1031}
1032
1033XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdWriteTimestamp(XGL_CMD_BUFFER cmdBuffer, XGL_TIMESTAMP_TYPE timestampType, XGL_GPU_MEMORY destMem, XGL_GPU_SIZE destOffset)
1034{
1035 nextTable.CmdWriteTimestamp(cmdBuffer, timestampType, destMem, destOffset);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001036 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 -06001037}
1038
1039XGL_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)
1040{
1041 nextTable.CmdInitAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, pData);
1042 printf("xglCmdInitAtomicCounters(cmdBuffer = %p, pipelineBindPoint = %i, startCounter = %i, counterCount = %i, pData = %i)\n", (void*)cmdBuffer, pipelineBindPoint, startCounter, counterCount, *pData);
1043}
1044
1045XGL_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)
1046{
1047 nextTable.CmdLoadAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, srcMem, srcOffset);
1048 printf("xglCmdLoadAtomicCounters(cmdBuffer = %p, pipelineBindPoint = %i, startCounter = %i, counterCount = %i, srcMem = %p, srcOffset = %i)\n", (void*)cmdBuffer, pipelineBindPoint, startCounter, counterCount, (void*)srcMem, srcOffset);
1049}
1050
1051XGL_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)
1052{
1053 nextTable.CmdSaveAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, destMem, destOffset);
1054 printf("xglCmdSaveAtomicCounters(cmdBuffer = %p, pipelineBindPoint = %i, startCounter = %i, counterCount = %i, destMem = %p, destOffset = %i)\n", (void*)cmdBuffer, pipelineBindPoint, startCounter, counterCount, (void*)destMem, destOffset);
1055}
1056
1057XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetValidationLevel(XGL_DEVICE device, XGL_VALIDATION_LEVEL validationLevel)
1058{
1059 XGL_RESULT result = nextTable.DbgSetValidationLevel(device, validationLevel);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001060 printf("xglDbgSetValidationLevel(device = %p, validationLevel = %p) = %s\n", (void*)device, (void*)validationLevel, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001061 return result;
1062}
1063
1064XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgRegisterMsgCallback(XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback, XGL_VOID* pUserData)
1065{
1066 XGL_RESULT result = nextTable.DbgRegisterMsgCallback(pfnMsgCallback, pUserData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001067 printf("xglDbgRegisterMsgCallback(pfnMsgCallback = %p, pUserData = %p) = %s\n", (void*)pfnMsgCallback, (void*)pUserData, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001068 return result;
1069}
1070
1071XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgUnregisterMsgCallback(XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback)
1072{
1073 XGL_RESULT result = nextTable.DbgUnregisterMsgCallback(pfnMsgCallback);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001074 printf("xglDbgUnregisterMsgCallback(pfnMsgCallback = %p) = %s\n", (void*)pfnMsgCallback, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001075 return result;
1076}
1077
1078XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetMessageFilter(XGL_DEVICE device, XGL_INT msgCode, XGL_DBG_MSG_FILTER filter)
1079{
1080 XGL_RESULT result = nextTable.DbgSetMessageFilter(device, msgCode, filter);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001081 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 -06001082 return result;
1083}
1084
1085XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetObjectTag(XGL_BASE_OBJECT object, XGL_SIZE tagSize, const XGL_VOID* pTag)
1086{
1087 XGL_RESULT result = nextTable.DbgSetObjectTag(object, tagSize, pTag);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001088 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 -06001089 return result;
1090}
1091
1092XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetGlobalOption(XGL_DBG_GLOBAL_OPTION dbgOption, XGL_SIZE dataSize, const XGL_VOID* pData)
1093{
1094 XGL_RESULT result = nextTable.DbgSetGlobalOption(dbgOption, dataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001095 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 -06001096 return result;
1097}
1098
1099XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetDeviceOption(XGL_DEVICE device, XGL_DBG_DEVICE_OPTION dbgOption, XGL_SIZE dataSize, const XGL_VOID* pData)
1100{
1101 XGL_RESULT result = nextTable.DbgSetDeviceOption(device, dbgOption, dataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001102 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 -06001103 return result;
1104}
1105
1106XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDbgMarkerBegin(XGL_CMD_BUFFER cmdBuffer, const XGL_CHAR* pMarker)
1107{
1108 nextTable.CmdDbgMarkerBegin(cmdBuffer, pMarker);
1109 printf("xglCmdDbgMarkerBegin(cmdBuffer = %p, pMarker = %p)\n", (void*)cmdBuffer, (void*)pMarker);
1110}
1111
1112XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDbgMarkerEnd(XGL_CMD_BUFFER cmdBuffer)
1113{
1114 nextTable.CmdDbgMarkerEnd(cmdBuffer);
1115 printf("xglCmdDbgMarkerEnd(cmdBuffer = %p)\n", (void*)cmdBuffer);
1116}
1117
1118XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11AssociateConnection(XGL_PHYSICAL_GPU gpu, const XGL_WSI_X11_CONNECTION_INFO* pConnectionInfo)
1119{
1120 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -06001121 pCurObj = gpuw;
1122 pthread_once(&tabOnce, initLayerTable);
1123 XGL_RESULT result = nextTable.WsiX11AssociateConnection((XGL_PHYSICAL_GPU)gpuw->nextObject, pConnectionInfo);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001124 printf("xglWsiX11AssociateConnection(gpu = %p, pConnectionInfo = %p) = %s\n", (void*)gpu, (void*)pConnectionInfo, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001125 return result;
1126}
1127
1128XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11GetMSC(XGL_DEVICE device, xcb_randr_crtc_t crtc, XGL_UINT64* pMsc)
1129{
1130 XGL_RESULT result = nextTable.WsiX11GetMSC(device, crtc, pMsc);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001131 printf("xglWsiX11GetMSC(device = %p, crtc = %i, pMsc = %lu) = %s\n", (void*)device, crtc, *pMsc, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001132 return result;
1133}
1134
1135XGL_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)
1136{
1137 XGL_RESULT result = nextTable.WsiX11CreatePresentableImage(device, pCreateInfo, pImage, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001138 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 -06001139 return result;
1140}
1141
1142XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11QueuePresent(XGL_QUEUE queue, const XGL_WSI_X11_PRESENT_INFO* pPresentInfo, XGL_FENCE fence)
1143{
1144 XGL_RESULT result = nextTable.WsiX11QueuePresent(queue, pPresentInfo, fence);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001145 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 -06001146 return result;
1147}
1148
1149XGL_LAYER_EXPORT XGL_VOID* XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* funcName)
1150{
1151 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
1152 if (gpu == NULL)
1153 return NULL;
1154 pCurObj = gpuw;
1155 pthread_once(&tabOnce, initLayerTable);
1156
1157 if (!strncmp("xglGetProcAddr", (const char *) funcName, sizeof("xglGetProcAddr")))
1158 return xglGetProcAddr;
1159 else if (!strncmp("xglInitAndEnumerateGpus", (const char *) funcName, sizeof("xglInitAndEnumerateGpus")))
1160 return nextTable.InitAndEnumerateGpus;
1161 else if (!strncmp("xglGetGpuInfo", (const char *) funcName, sizeof("xglGetGpuInfo")))
1162 return xglGetGpuInfo;
1163 else if (!strncmp("xglCreateDevice", (const char *) funcName, sizeof("xglCreateDevice")))
1164 return xglCreateDevice;
1165 else if (!strncmp("xglDestroyDevice", (const char *) funcName, sizeof("xglDestroyDevice")))
1166 return xglDestroyDevice;
1167 else if (!strncmp("xglGetExtensionSupport", (const char *) funcName, sizeof("xglGetExtensionSupport")))
1168 return xglGetExtensionSupport;
1169 else if (!strncmp("xglEnumerateLayers", (const char *) funcName, sizeof("xglEnumerateLayers")))
1170 return xglEnumerateLayers;
1171 else if (!strncmp("xglGetDeviceQueue", (const char *) funcName, sizeof("xglGetDeviceQueue")))
1172 return xglGetDeviceQueue;
1173 else if (!strncmp("xglQueueSubmit", (const char *) funcName, sizeof("xglQueueSubmit")))
1174 return xglQueueSubmit;
1175 else if (!strncmp("xglQueueSetGlobalMemReferences", (const char *) funcName, sizeof("xglQueueSetGlobalMemReferences")))
1176 return xglQueueSetGlobalMemReferences;
1177 else if (!strncmp("xglQueueWaitIdle", (const char *) funcName, sizeof("xglQueueWaitIdle")))
1178 return xglQueueWaitIdle;
1179 else if (!strncmp("xglDeviceWaitIdle", (const char *) funcName, sizeof("xglDeviceWaitIdle")))
1180 return xglDeviceWaitIdle;
1181 else if (!strncmp("xglGetMemoryHeapCount", (const char *) funcName, sizeof("xglGetMemoryHeapCount")))
1182 return xglGetMemoryHeapCount;
1183 else if (!strncmp("xglGetMemoryHeapInfo", (const char *) funcName, sizeof("xglGetMemoryHeapInfo")))
1184 return xglGetMemoryHeapInfo;
1185 else if (!strncmp("xglAllocMemory", (const char *) funcName, sizeof("xglAllocMemory")))
1186 return xglAllocMemory;
1187 else if (!strncmp("xglFreeMemory", (const char *) funcName, sizeof("xglFreeMemory")))
1188 return xglFreeMemory;
1189 else if (!strncmp("xglSetMemoryPriority", (const char *) funcName, sizeof("xglSetMemoryPriority")))
1190 return xglSetMemoryPriority;
1191 else if (!strncmp("xglMapMemory", (const char *) funcName, sizeof("xglMapMemory")))
1192 return xglMapMemory;
1193 else if (!strncmp("xglUnmapMemory", (const char *) funcName, sizeof("xglUnmapMemory")))
1194 return xglUnmapMemory;
1195 else if (!strncmp("xglPinSystemMemory", (const char *) funcName, sizeof("xglPinSystemMemory")))
1196 return xglPinSystemMemory;
1197 else if (!strncmp("xglRemapVirtualMemoryPages", (const char *) funcName, sizeof("xglRemapVirtualMemoryPages")))
1198 return xglRemapVirtualMemoryPages;
1199 else if (!strncmp("xglGetMultiGpuCompatibility", (const char *) funcName, sizeof("xglGetMultiGpuCompatibility")))
1200 return xglGetMultiGpuCompatibility;
1201 else if (!strncmp("xglOpenSharedMemory", (const char *) funcName, sizeof("xglOpenSharedMemory")))
1202 return xglOpenSharedMemory;
1203 else if (!strncmp("xglOpenSharedQueueSemaphore", (const char *) funcName, sizeof("xglOpenSharedQueueSemaphore")))
1204 return xglOpenSharedQueueSemaphore;
1205 else if (!strncmp("xglOpenPeerMemory", (const char *) funcName, sizeof("xglOpenPeerMemory")))
1206 return xglOpenPeerMemory;
1207 else if (!strncmp("xglOpenPeerImage", (const char *) funcName, sizeof("xglOpenPeerImage")))
1208 return xglOpenPeerImage;
1209 else if (!strncmp("xglDestroyObject", (const char *) funcName, sizeof("xglDestroyObject")))
1210 return xglDestroyObject;
1211 else if (!strncmp("xglGetObjectInfo", (const char *) funcName, sizeof("xglGetObjectInfo")))
1212 return xglGetObjectInfo;
1213 else if (!strncmp("xglBindObjectMemory", (const char *) funcName, sizeof("xglBindObjectMemory")))
1214 return xglBindObjectMemory;
1215 else if (!strncmp("xglCreateFence", (const char *) funcName, sizeof("xglCreateFence")))
1216 return xglCreateFence;
1217 else if (!strncmp("xglGetFenceStatus", (const char *) funcName, sizeof("xglGetFenceStatus")))
1218 return xglGetFenceStatus;
1219 else if (!strncmp("xglWaitForFences", (const char *) funcName, sizeof("xglWaitForFences")))
1220 return xglWaitForFences;
1221 else if (!strncmp("xglCreateQueueSemaphore", (const char *) funcName, sizeof("xglCreateQueueSemaphore")))
1222 return xglCreateQueueSemaphore;
1223 else if (!strncmp("xglSignalQueueSemaphore", (const char *) funcName, sizeof("xglSignalQueueSemaphore")))
1224 return xglSignalQueueSemaphore;
1225 else if (!strncmp("xglWaitQueueSemaphore", (const char *) funcName, sizeof("xglWaitQueueSemaphore")))
1226 return xglWaitQueueSemaphore;
1227 else if (!strncmp("xglCreateEvent", (const char *) funcName, sizeof("xglCreateEvent")))
1228 return xglCreateEvent;
1229 else if (!strncmp("xglGetEventStatus", (const char *) funcName, sizeof("xglGetEventStatus")))
1230 return xglGetEventStatus;
1231 else if (!strncmp("xglSetEvent", (const char *) funcName, sizeof("xglSetEvent")))
1232 return xglSetEvent;
1233 else if (!strncmp("xglResetEvent", (const char *) funcName, sizeof("xglResetEvent")))
1234 return xglResetEvent;
1235 else if (!strncmp("xglCreateQueryPool", (const char *) funcName, sizeof("xglCreateQueryPool")))
1236 return xglCreateQueryPool;
1237 else if (!strncmp("xglGetQueryPoolResults", (const char *) funcName, sizeof("xglGetQueryPoolResults")))
1238 return xglGetQueryPoolResults;
1239 else if (!strncmp("xglGetFormatInfo", (const char *) funcName, sizeof("xglGetFormatInfo")))
1240 return xglGetFormatInfo;
1241 else if (!strncmp("xglCreateImage", (const char *) funcName, sizeof("xglCreateImage")))
1242 return xglCreateImage;
1243 else if (!strncmp("xglGetImageSubresourceInfo", (const char *) funcName, sizeof("xglGetImageSubresourceInfo")))
1244 return xglGetImageSubresourceInfo;
1245 else if (!strncmp("xglCreateImageView", (const char *) funcName, sizeof("xglCreateImageView")))
1246 return xglCreateImageView;
1247 else if (!strncmp("xglCreateColorAttachmentView", (const char *) funcName, sizeof("xglCreateColorAttachmentView")))
1248 return xglCreateColorAttachmentView;
1249 else if (!strncmp("xglCreateDepthStencilView", (const char *) funcName, sizeof("xglCreateDepthStencilView")))
1250 return xglCreateDepthStencilView;
1251 else if (!strncmp("xglCreateShader", (const char *) funcName, sizeof("xglCreateShader")))
1252 return xglCreateShader;
1253 else if (!strncmp("xglCreateGraphicsPipeline", (const char *) funcName, sizeof("xglCreateGraphicsPipeline")))
1254 return xglCreateGraphicsPipeline;
1255 else if (!strncmp("xglCreateComputePipeline", (const char *) funcName, sizeof("xglCreateComputePipeline")))
1256 return xglCreateComputePipeline;
1257 else if (!strncmp("xglStorePipeline", (const char *) funcName, sizeof("xglStorePipeline")))
1258 return xglStorePipeline;
1259 else if (!strncmp("xglLoadPipeline", (const char *) funcName, sizeof("xglLoadPipeline")))
1260 return xglLoadPipeline;
1261 else if (!strncmp("xglCreatePipelineDelta", (const char *) funcName, sizeof("xglCreatePipelineDelta")))
1262 return xglCreatePipelineDelta;
1263 else if (!strncmp("xglCreateSampler", (const char *) funcName, sizeof("xglCreateSampler")))
1264 return xglCreateSampler;
1265 else if (!strncmp("xglCreateDescriptorSet", (const char *) funcName, sizeof("xglCreateDescriptorSet")))
1266 return xglCreateDescriptorSet;
1267 else if (!strncmp("xglBeginDescriptorSetUpdate", (const char *) funcName, sizeof("xglBeginDescriptorSetUpdate")))
1268 return xglBeginDescriptorSetUpdate;
1269 else if (!strncmp("xglEndDescriptorSetUpdate", (const char *) funcName, sizeof("xglEndDescriptorSetUpdate")))
1270 return xglEndDescriptorSetUpdate;
1271 else if (!strncmp("xglAttachSamplerDescriptors", (const char *) funcName, sizeof("xglAttachSamplerDescriptors")))
1272 return xglAttachSamplerDescriptors;
1273 else if (!strncmp("xglAttachImageViewDescriptors", (const char *) funcName, sizeof("xglAttachImageViewDescriptors")))
1274 return xglAttachImageViewDescriptors;
1275 else if (!strncmp("xglAttachMemoryViewDescriptors", (const char *) funcName, sizeof("xglAttachMemoryViewDescriptors")))
1276 return xglAttachMemoryViewDescriptors;
1277 else if (!strncmp("xglAttachNestedDescriptors", (const char *) funcName, sizeof("xglAttachNestedDescriptors")))
1278 return xglAttachNestedDescriptors;
1279 else if (!strncmp("xglClearDescriptorSetSlots", (const char *) funcName, sizeof("xglClearDescriptorSetSlots")))
1280 return xglClearDescriptorSetSlots;
1281 else if (!strncmp("xglCreateViewportState", (const char *) funcName, sizeof("xglCreateViewportState")))
1282 return xglCreateViewportState;
1283 else if (!strncmp("xglCreateRasterState", (const char *) funcName, sizeof("xglCreateRasterState")))
1284 return xglCreateRasterState;
1285 else if (!strncmp("xglCreateMsaaState", (const char *) funcName, sizeof("xglCreateMsaaState")))
1286 return xglCreateMsaaState;
1287 else if (!strncmp("xglCreateColorBlendState", (const char *) funcName, sizeof("xglCreateColorBlendState")))
1288 return xglCreateColorBlendState;
1289 else if (!strncmp("xglCreateDepthStencilState", (const char *) funcName, sizeof("xglCreateDepthStencilState")))
1290 return xglCreateDepthStencilState;
1291 else if (!strncmp("xglCreateCommandBuffer", (const char *) funcName, sizeof("xglCreateCommandBuffer")))
1292 return xglCreateCommandBuffer;
1293 else if (!strncmp("xglBeginCommandBuffer", (const char *) funcName, sizeof("xglBeginCommandBuffer")))
1294 return xglBeginCommandBuffer;
1295 else if (!strncmp("xglEndCommandBuffer", (const char *) funcName, sizeof("xglEndCommandBuffer")))
1296 return xglEndCommandBuffer;
1297 else if (!strncmp("xglResetCommandBuffer", (const char *) funcName, sizeof("xglResetCommandBuffer")))
1298 return xglResetCommandBuffer;
1299 else if (!strncmp("xglCmdBindPipeline", (const char *) funcName, sizeof("xglCmdBindPipeline")))
1300 return xglCmdBindPipeline;
1301 else if (!strncmp("xglCmdBindPipelineDelta", (const char *) funcName, sizeof("xglCmdBindPipelineDelta")))
1302 return xglCmdBindPipelineDelta;
1303 else if (!strncmp("xglCmdBindStateObject", (const char *) funcName, sizeof("xglCmdBindStateObject")))
1304 return xglCmdBindStateObject;
1305 else if (!strncmp("xglCmdBindDescriptorSet", (const char *) funcName, sizeof("xglCmdBindDescriptorSet")))
1306 return xglCmdBindDescriptorSet;
1307 else if (!strncmp("xglCmdBindDynamicMemoryView", (const char *) funcName, sizeof("xglCmdBindDynamicMemoryView")))
1308 return xglCmdBindDynamicMemoryView;
1309 else if (!strncmp("xglCmdBindIndexData", (const char *) funcName, sizeof("xglCmdBindIndexData")))
1310 return xglCmdBindIndexData;
1311 else if (!strncmp("xglCmdBindAttachments", (const char *) funcName, sizeof("xglCmdBindAttachments")))
1312 return xglCmdBindAttachments;
1313 else if (!strncmp("xglCmdPrepareMemoryRegions", (const char *) funcName, sizeof("xglCmdPrepareMemoryRegions")))
1314 return xglCmdPrepareMemoryRegions;
1315 else if (!strncmp("xglCmdPrepareImages", (const char *) funcName, sizeof("xglCmdPrepareImages")))
1316 return xglCmdPrepareImages;
1317 else if (!strncmp("xglCmdDraw", (const char *) funcName, sizeof("xglCmdDraw")))
1318 return xglCmdDraw;
1319 else if (!strncmp("xglCmdDrawIndexed", (const char *) funcName, sizeof("xglCmdDrawIndexed")))
1320 return xglCmdDrawIndexed;
1321 else if (!strncmp("xglCmdDrawIndirect", (const char *) funcName, sizeof("xglCmdDrawIndirect")))
1322 return xglCmdDrawIndirect;
1323 else if (!strncmp("xglCmdDrawIndexedIndirect", (const char *) funcName, sizeof("xglCmdDrawIndexedIndirect")))
1324 return xglCmdDrawIndexedIndirect;
1325 else if (!strncmp("xglCmdDispatch", (const char *) funcName, sizeof("xglCmdDispatch")))
1326 return xglCmdDispatch;
1327 else if (!strncmp("xglCmdDispatchIndirect", (const char *) funcName, sizeof("xglCmdDispatchIndirect")))
1328 return xglCmdDispatchIndirect;
1329 else if (!strncmp("xglCmdCopyMemory", (const char *) funcName, sizeof("xglCmdCopyMemory")))
1330 return xglCmdCopyMemory;
1331 else if (!strncmp("xglCmdCopyImage", (const char *) funcName, sizeof("xglCmdCopyImage")))
1332 return xglCmdCopyImage;
1333 else if (!strncmp("xglCmdCopyMemoryToImage", (const char *) funcName, sizeof("xglCmdCopyMemoryToImage")))
1334 return xglCmdCopyMemoryToImage;
1335 else if (!strncmp("xglCmdCopyImageToMemory", (const char *) funcName, sizeof("xglCmdCopyImageToMemory")))
1336 return xglCmdCopyImageToMemory;
1337 else if (!strncmp("xglCmdCloneImageData", (const char *) funcName, sizeof("xglCmdCloneImageData")))
1338 return xglCmdCloneImageData;
1339 else if (!strncmp("xglCmdUpdateMemory", (const char *) funcName, sizeof("xglCmdUpdateMemory")))
1340 return xglCmdUpdateMemory;
1341 else if (!strncmp("xglCmdFillMemory", (const char *) funcName, sizeof("xglCmdFillMemory")))
1342 return xglCmdFillMemory;
1343 else if (!strncmp("xglCmdClearColorImage", (const char *) funcName, sizeof("xglCmdClearColorImage")))
1344 return xglCmdClearColorImage;
1345 else if (!strncmp("xglCmdClearColorImageRaw", (const char *) funcName, sizeof("xglCmdClearColorImageRaw")))
1346 return xglCmdClearColorImageRaw;
1347 else if (!strncmp("xglCmdClearDepthStencil", (const char *) funcName, sizeof("xglCmdClearDepthStencil")))
1348 return xglCmdClearDepthStencil;
1349 else if (!strncmp("xglCmdResolveImage", (const char *) funcName, sizeof("xglCmdResolveImage")))
1350 return xglCmdResolveImage;
1351 else if (!strncmp("xglCmdSetEvent", (const char *) funcName, sizeof("xglCmdSetEvent")))
1352 return xglCmdSetEvent;
1353 else if (!strncmp("xglCmdResetEvent", (const char *) funcName, sizeof("xglCmdResetEvent")))
1354 return xglCmdResetEvent;
1355 else if (!strncmp("xglCmdMemoryAtomic", (const char *) funcName, sizeof("xglCmdMemoryAtomic")))
1356 return xglCmdMemoryAtomic;
1357 else if (!strncmp("xglCmdBeginQuery", (const char *) funcName, sizeof("xglCmdBeginQuery")))
1358 return xglCmdBeginQuery;
1359 else if (!strncmp("xglCmdEndQuery", (const char *) funcName, sizeof("xglCmdEndQuery")))
1360 return xglCmdEndQuery;
1361 else if (!strncmp("xglCmdResetQueryPool", (const char *) funcName, sizeof("xglCmdResetQueryPool")))
1362 return xglCmdResetQueryPool;
1363 else if (!strncmp("xglCmdWriteTimestamp", (const char *) funcName, sizeof("xglCmdWriteTimestamp")))
1364 return xglCmdWriteTimestamp;
1365 else if (!strncmp("xglCmdInitAtomicCounters", (const char *) funcName, sizeof("xglCmdInitAtomicCounters")))
1366 return xglCmdInitAtomicCounters;
1367 else if (!strncmp("xglCmdLoadAtomicCounters", (const char *) funcName, sizeof("xglCmdLoadAtomicCounters")))
1368 return xglCmdLoadAtomicCounters;
1369 else if (!strncmp("xglCmdSaveAtomicCounters", (const char *) funcName, sizeof("xglCmdSaveAtomicCounters")))
1370 return xglCmdSaveAtomicCounters;
1371 else if (!strncmp("xglDbgSetValidationLevel", (const char *) funcName, sizeof("xglDbgSetValidationLevel")))
1372 return xglDbgSetValidationLevel;
1373 else if (!strncmp("xglDbgRegisterMsgCallback", (const char *) funcName, sizeof("xglDbgRegisterMsgCallback")))
1374 return xglDbgRegisterMsgCallback;
1375 else if (!strncmp("xglDbgUnregisterMsgCallback", (const char *) funcName, sizeof("xglDbgUnregisterMsgCallback")))
1376 return xglDbgUnregisterMsgCallback;
1377 else if (!strncmp("xglDbgSetMessageFilter", (const char *) funcName, sizeof("xglDbgSetMessageFilter")))
1378 return xglDbgSetMessageFilter;
1379 else if (!strncmp("xglDbgSetObjectTag", (const char *) funcName, sizeof("xglDbgSetObjectTag")))
1380 return xglDbgSetObjectTag;
1381 else if (!strncmp("xglDbgSetGlobalOption", (const char *) funcName, sizeof("xglDbgSetGlobalOption")))
1382 return xglDbgSetGlobalOption;
1383 else if (!strncmp("xglDbgSetDeviceOption", (const char *) funcName, sizeof("xglDbgSetDeviceOption")))
1384 return xglDbgSetDeviceOption;
1385 else if (!strncmp("xglCmdDbgMarkerBegin", (const char *) funcName, sizeof("xglCmdDbgMarkerBegin")))
1386 return xglCmdDbgMarkerBegin;
1387 else if (!strncmp("xglCmdDbgMarkerEnd", (const char *) funcName, sizeof("xglCmdDbgMarkerEnd")))
1388 return xglCmdDbgMarkerEnd;
1389 else if (!strncmp("xglWsiX11AssociateConnection", (const char *) funcName, sizeof("xglWsiX11AssociateConnection")))
1390 return xglWsiX11AssociateConnection;
1391 else if (!strncmp("xglWsiX11GetMSC", (const char *) funcName, sizeof("xglWsiX11GetMSC")))
1392 return xglWsiX11GetMSC;
1393 else if (!strncmp("xglWsiX11CreatePresentableImage", (const char *) funcName, sizeof("xglWsiX11CreatePresentableImage")))
1394 return xglWsiX11CreatePresentableImage;
1395 else if (!strncmp("xglWsiX11QueuePresent", (const char *) funcName, sizeof("xglWsiX11QueuePresent")))
1396 return xglWsiX11QueuePresent;
1397 else {
1398 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
1399 if (gpuw->pGPA == NULL)
1400 return NULL;
1401 return gpuw->pGPA(gpuw->nextObject, funcName);
1402 }
1403}
1404