blob: 421a40c317de1c378fbbe6e1b9f79ae269bfea31 [file] [log] [blame]
Tobin Ehlis817736c2014-10-21 10:47:45 -06001/*
2 * XGL
3 *
4 * Copyright (C) 2014 LunarG, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#include <stdio.h>
26#include <stdlib.h>
27#include <string.h>
28#include <assert.h>
29#include <pthread.h>
30#include "xglLayer.h"
Tobin Ehlis92dbf802014-10-22 09:06:33 -060031#include "xgl_struct_string_helper.h"
Tobin Ehlis817736c2014-10-21 10:47:45 -060032
33static XGL_LAYER_DISPATCH_TABLE nextTable;
34static XGL_BASE_LAYER_OBJECT *pCurObj;
35static pthread_once_t tabOnce = PTHREAD_ONCE_INIT;
36
37
38static void initLayerTable()
39{
40 GetProcAddrType fpNextGPA;
41 fpNextGPA = pCurObj->pGPA;
42 assert(fpNextGPA);
43
44 GetProcAddrType fpGetProcAddr = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetProcAddr");
45 nextTable.GetProcAddr = fpGetProcAddr;
46 InitAndEnumerateGpusType fpInitAndEnumerateGpus = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglInitAndEnumerateGpus");
47 nextTable.InitAndEnumerateGpus = fpInitAndEnumerateGpus;
48 GetGpuInfoType fpGetGpuInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetGpuInfo");
49 nextTable.GetGpuInfo = fpGetGpuInfo;
50 CreateDeviceType fpCreateDevice = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDevice");
51 nextTable.CreateDevice = fpCreateDevice;
52 DestroyDeviceType fpDestroyDevice = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDestroyDevice");
53 nextTable.DestroyDevice = fpDestroyDevice;
54 GetExtensionSupportType fpGetExtensionSupport = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetExtensionSupport");
55 nextTable.GetExtensionSupport = fpGetExtensionSupport;
56 EnumerateLayersType fpEnumerateLayers = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglEnumerateLayers");
57 nextTable.EnumerateLayers = fpEnumerateLayers;
58 GetDeviceQueueType fpGetDeviceQueue = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetDeviceQueue");
59 nextTable.GetDeviceQueue = fpGetDeviceQueue;
60 QueueSubmitType fpQueueSubmit = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglQueueSubmit");
61 nextTable.QueueSubmit = fpQueueSubmit;
62 QueueSetGlobalMemReferencesType fpQueueSetGlobalMemReferences = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglQueueSetGlobalMemReferences");
63 nextTable.QueueSetGlobalMemReferences = fpQueueSetGlobalMemReferences;
64 QueueWaitIdleType fpQueueWaitIdle = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglQueueWaitIdle");
65 nextTable.QueueWaitIdle = fpQueueWaitIdle;
66 DeviceWaitIdleType fpDeviceWaitIdle = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDeviceWaitIdle");
67 nextTable.DeviceWaitIdle = fpDeviceWaitIdle;
68 GetMemoryHeapCountType fpGetMemoryHeapCount = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetMemoryHeapCount");
69 nextTable.GetMemoryHeapCount = fpGetMemoryHeapCount;
70 GetMemoryHeapInfoType fpGetMemoryHeapInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetMemoryHeapInfo");
71 nextTable.GetMemoryHeapInfo = fpGetMemoryHeapInfo;
72 AllocMemoryType fpAllocMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAllocMemory");
73 nextTable.AllocMemory = fpAllocMemory;
74 FreeMemoryType fpFreeMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglFreeMemory");
75 nextTable.FreeMemory = fpFreeMemory;
76 SetMemoryPriorityType fpSetMemoryPriority = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglSetMemoryPriority");
77 nextTable.SetMemoryPriority = fpSetMemoryPriority;
78 MapMemoryType fpMapMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglMapMemory");
79 nextTable.MapMemory = fpMapMemory;
80 UnmapMemoryType fpUnmapMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglUnmapMemory");
81 nextTable.UnmapMemory = fpUnmapMemory;
82 PinSystemMemoryType fpPinSystemMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglPinSystemMemory");
83 nextTable.PinSystemMemory = fpPinSystemMemory;
84 RemapVirtualMemoryPagesType fpRemapVirtualMemoryPages = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglRemapVirtualMemoryPages");
85 nextTable.RemapVirtualMemoryPages = fpRemapVirtualMemoryPages;
86 GetMultiGpuCompatibilityType fpGetMultiGpuCompatibility = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetMultiGpuCompatibility");
87 nextTable.GetMultiGpuCompatibility = fpGetMultiGpuCompatibility;
88 OpenSharedMemoryType fpOpenSharedMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenSharedMemory");
89 nextTable.OpenSharedMemory = fpOpenSharedMemory;
90 OpenSharedQueueSemaphoreType fpOpenSharedQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenSharedQueueSemaphore");
91 nextTable.OpenSharedQueueSemaphore = fpOpenSharedQueueSemaphore;
92 OpenPeerMemoryType fpOpenPeerMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenPeerMemory");
93 nextTable.OpenPeerMemory = fpOpenPeerMemory;
94 OpenPeerImageType fpOpenPeerImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglOpenPeerImage");
95 nextTable.OpenPeerImage = fpOpenPeerImage;
96 DestroyObjectType fpDestroyObject = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDestroyObject");
97 nextTable.DestroyObject = fpDestroyObject;
98 GetObjectInfoType fpGetObjectInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetObjectInfo");
99 nextTable.GetObjectInfo = fpGetObjectInfo;
100 BindObjectMemoryType fpBindObjectMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglBindObjectMemory");
101 nextTable.BindObjectMemory = fpBindObjectMemory;
102 CreateFenceType fpCreateFence = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateFence");
103 nextTable.CreateFence = fpCreateFence;
104 GetFenceStatusType fpGetFenceStatus = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetFenceStatus");
105 nextTable.GetFenceStatus = fpGetFenceStatus;
106 WaitForFencesType fpWaitForFences = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWaitForFences");
107 nextTable.WaitForFences = fpWaitForFences;
108 CreateQueueSemaphoreType fpCreateQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateQueueSemaphore");
109 nextTable.CreateQueueSemaphore = fpCreateQueueSemaphore;
110 SignalQueueSemaphoreType fpSignalQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglSignalQueueSemaphore");
111 nextTable.SignalQueueSemaphore = fpSignalQueueSemaphore;
112 WaitQueueSemaphoreType fpWaitQueueSemaphore = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWaitQueueSemaphore");
113 nextTable.WaitQueueSemaphore = fpWaitQueueSemaphore;
114 CreateEventType fpCreateEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateEvent");
115 nextTable.CreateEvent = fpCreateEvent;
116 GetEventStatusType fpGetEventStatus = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetEventStatus");
117 nextTable.GetEventStatus = fpGetEventStatus;
118 SetEventType fpSetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglSetEvent");
119 nextTable.SetEvent = fpSetEvent;
120 ResetEventType fpResetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglResetEvent");
121 nextTable.ResetEvent = fpResetEvent;
122 CreateQueryPoolType fpCreateQueryPool = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateQueryPool");
123 nextTable.CreateQueryPool = fpCreateQueryPool;
124 GetQueryPoolResultsType fpGetQueryPoolResults = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetQueryPoolResults");
125 nextTable.GetQueryPoolResults = fpGetQueryPoolResults;
126 GetFormatInfoType fpGetFormatInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetFormatInfo");
127 nextTable.GetFormatInfo = fpGetFormatInfo;
128 CreateImageType fpCreateImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateImage");
129 nextTable.CreateImage = fpCreateImage;
130 GetImageSubresourceInfoType fpGetImageSubresourceInfo = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglGetImageSubresourceInfo");
131 nextTable.GetImageSubresourceInfo = fpGetImageSubresourceInfo;
132 CreateImageViewType fpCreateImageView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateImageView");
133 nextTable.CreateImageView = fpCreateImageView;
134 CreateColorAttachmentViewType fpCreateColorAttachmentView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateColorAttachmentView");
135 nextTable.CreateColorAttachmentView = fpCreateColorAttachmentView;
136 CreateDepthStencilViewType fpCreateDepthStencilView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDepthStencilView");
137 nextTable.CreateDepthStencilView = fpCreateDepthStencilView;
138 CreateShaderType fpCreateShader = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateShader");
139 nextTable.CreateShader = fpCreateShader;
140 CreateGraphicsPipelineType fpCreateGraphicsPipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateGraphicsPipeline");
141 nextTable.CreateGraphicsPipeline = fpCreateGraphicsPipeline;
142 CreateComputePipelineType fpCreateComputePipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateComputePipeline");
143 nextTable.CreateComputePipeline = fpCreateComputePipeline;
144 StorePipelineType fpStorePipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglStorePipeline");
145 nextTable.StorePipeline = fpStorePipeline;
146 LoadPipelineType fpLoadPipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglLoadPipeline");
147 nextTable.LoadPipeline = fpLoadPipeline;
148 CreatePipelineDeltaType fpCreatePipelineDelta = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreatePipelineDelta");
149 nextTable.CreatePipelineDelta = fpCreatePipelineDelta;
150 CreateSamplerType fpCreateSampler = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateSampler");
151 nextTable.CreateSampler = fpCreateSampler;
152 CreateDescriptorSetType fpCreateDescriptorSet = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDescriptorSet");
153 nextTable.CreateDescriptorSet = fpCreateDescriptorSet;
154 BeginDescriptorSetUpdateType fpBeginDescriptorSetUpdate = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglBeginDescriptorSetUpdate");
155 nextTable.BeginDescriptorSetUpdate = fpBeginDescriptorSetUpdate;
156 EndDescriptorSetUpdateType fpEndDescriptorSetUpdate = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglEndDescriptorSetUpdate");
157 nextTable.EndDescriptorSetUpdate = fpEndDescriptorSetUpdate;
158 AttachSamplerDescriptorsType fpAttachSamplerDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachSamplerDescriptors");
159 nextTable.AttachSamplerDescriptors = fpAttachSamplerDescriptors;
160 AttachImageViewDescriptorsType fpAttachImageViewDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachImageViewDescriptors");
161 nextTable.AttachImageViewDescriptors = fpAttachImageViewDescriptors;
162 AttachMemoryViewDescriptorsType fpAttachMemoryViewDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachMemoryViewDescriptors");
163 nextTable.AttachMemoryViewDescriptors = fpAttachMemoryViewDescriptors;
164 AttachNestedDescriptorsType fpAttachNestedDescriptors = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglAttachNestedDescriptors");
165 nextTable.AttachNestedDescriptors = fpAttachNestedDescriptors;
166 ClearDescriptorSetSlotsType fpClearDescriptorSetSlots = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglClearDescriptorSetSlots");
167 nextTable.ClearDescriptorSetSlots = fpClearDescriptorSetSlots;
168 CreateViewportStateType fpCreateViewportState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateViewportState");
169 nextTable.CreateViewportState = fpCreateViewportState;
170 CreateRasterStateType fpCreateRasterState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateRasterState");
171 nextTable.CreateRasterState = fpCreateRasterState;
172 CreateMsaaStateType fpCreateMsaaState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateMsaaState");
173 nextTable.CreateMsaaState = fpCreateMsaaState;
174 CreateColorBlendStateType fpCreateColorBlendState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateColorBlendState");
175 nextTable.CreateColorBlendState = fpCreateColorBlendState;
176 CreateDepthStencilStateType fpCreateDepthStencilState = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateDepthStencilState");
177 nextTable.CreateDepthStencilState = fpCreateDepthStencilState;
178 CreateCommandBufferType fpCreateCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCreateCommandBuffer");
179 nextTable.CreateCommandBuffer = fpCreateCommandBuffer;
180 BeginCommandBufferType fpBeginCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglBeginCommandBuffer");
181 nextTable.BeginCommandBuffer = fpBeginCommandBuffer;
182 EndCommandBufferType fpEndCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglEndCommandBuffer");
183 nextTable.EndCommandBuffer = fpEndCommandBuffer;
184 ResetCommandBufferType fpResetCommandBuffer = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglResetCommandBuffer");
185 nextTable.ResetCommandBuffer = fpResetCommandBuffer;
186 CmdBindPipelineType fpCmdBindPipeline = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindPipeline");
187 nextTable.CmdBindPipeline = fpCmdBindPipeline;
188 CmdBindPipelineDeltaType fpCmdBindPipelineDelta = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindPipelineDelta");
189 nextTable.CmdBindPipelineDelta = fpCmdBindPipelineDelta;
190 CmdBindStateObjectType fpCmdBindStateObject = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindStateObject");
191 nextTable.CmdBindStateObject = fpCmdBindStateObject;
192 CmdBindDescriptorSetType fpCmdBindDescriptorSet = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindDescriptorSet");
193 nextTable.CmdBindDescriptorSet = fpCmdBindDescriptorSet;
194 CmdBindDynamicMemoryViewType fpCmdBindDynamicMemoryView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindDynamicMemoryView");
195 nextTable.CmdBindDynamicMemoryView = fpCmdBindDynamicMemoryView;
Chia-I Wu3b04af52014-11-08 10:48:20 +0800196 CmdBindVertexDataType fpCmdBindVertexData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindVertexData");
197 nextTable.CmdBindVertexData = fpCmdBindVertexData;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600198 CmdBindIndexDataType fpCmdBindIndexData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindIndexData");
199 nextTable.CmdBindIndexData = fpCmdBindIndexData;
200 CmdBindAttachmentsType fpCmdBindAttachments = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindAttachments");
201 nextTable.CmdBindAttachments = fpCmdBindAttachments;
202 CmdPrepareMemoryRegionsType fpCmdPrepareMemoryRegions = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdPrepareMemoryRegions");
203 nextTable.CmdPrepareMemoryRegions = fpCmdPrepareMemoryRegions;
204 CmdPrepareImagesType fpCmdPrepareImages = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdPrepareImages");
205 nextTable.CmdPrepareImages = fpCmdPrepareImages;
206 CmdDrawType fpCmdDraw = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDraw");
207 nextTable.CmdDraw = fpCmdDraw;
208 CmdDrawIndexedType fpCmdDrawIndexed = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDrawIndexed");
209 nextTable.CmdDrawIndexed = fpCmdDrawIndexed;
210 CmdDrawIndirectType fpCmdDrawIndirect = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDrawIndirect");
211 nextTable.CmdDrawIndirect = fpCmdDrawIndirect;
212 CmdDrawIndexedIndirectType fpCmdDrawIndexedIndirect = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDrawIndexedIndirect");
213 nextTable.CmdDrawIndexedIndirect = fpCmdDrawIndexedIndirect;
214 CmdDispatchType fpCmdDispatch = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDispatch");
215 nextTable.CmdDispatch = fpCmdDispatch;
216 CmdDispatchIndirectType fpCmdDispatchIndirect = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDispatchIndirect");
217 nextTable.CmdDispatchIndirect = fpCmdDispatchIndirect;
218 CmdCopyMemoryType fpCmdCopyMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyMemory");
219 nextTable.CmdCopyMemory = fpCmdCopyMemory;
220 CmdCopyImageType fpCmdCopyImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyImage");
221 nextTable.CmdCopyImage = fpCmdCopyImage;
222 CmdCopyMemoryToImageType fpCmdCopyMemoryToImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyMemoryToImage");
223 nextTable.CmdCopyMemoryToImage = fpCmdCopyMemoryToImage;
224 CmdCopyImageToMemoryType fpCmdCopyImageToMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCopyImageToMemory");
225 nextTable.CmdCopyImageToMemory = fpCmdCopyImageToMemory;
226 CmdCloneImageDataType fpCmdCloneImageData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdCloneImageData");
227 nextTable.CmdCloneImageData = fpCmdCloneImageData;
228 CmdUpdateMemoryType fpCmdUpdateMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdUpdateMemory");
229 nextTable.CmdUpdateMemory = fpCmdUpdateMemory;
230 CmdFillMemoryType fpCmdFillMemory = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdFillMemory");
231 nextTable.CmdFillMemory = fpCmdFillMemory;
232 CmdClearColorImageType fpCmdClearColorImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdClearColorImage");
233 nextTable.CmdClearColorImage = fpCmdClearColorImage;
234 CmdClearColorImageRawType fpCmdClearColorImageRaw = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdClearColorImageRaw");
235 nextTable.CmdClearColorImageRaw = fpCmdClearColorImageRaw;
236 CmdClearDepthStencilType fpCmdClearDepthStencil = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdClearDepthStencil");
237 nextTable.CmdClearDepthStencil = fpCmdClearDepthStencil;
238 CmdResolveImageType fpCmdResolveImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdResolveImage");
239 nextTable.CmdResolveImage = fpCmdResolveImage;
240 CmdSetEventType fpCmdSetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdSetEvent");
241 nextTable.CmdSetEvent = fpCmdSetEvent;
242 CmdResetEventType fpCmdResetEvent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdResetEvent");
243 nextTable.CmdResetEvent = fpCmdResetEvent;
244 CmdMemoryAtomicType fpCmdMemoryAtomic = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdMemoryAtomic");
245 nextTable.CmdMemoryAtomic = fpCmdMemoryAtomic;
246 CmdBeginQueryType fpCmdBeginQuery = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBeginQuery");
247 nextTable.CmdBeginQuery = fpCmdBeginQuery;
248 CmdEndQueryType fpCmdEndQuery = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdEndQuery");
249 nextTable.CmdEndQuery = fpCmdEndQuery;
250 CmdResetQueryPoolType fpCmdResetQueryPool = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdResetQueryPool");
251 nextTable.CmdResetQueryPool = fpCmdResetQueryPool;
252 CmdWriteTimestampType fpCmdWriteTimestamp = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdWriteTimestamp");
253 nextTable.CmdWriteTimestamp = fpCmdWriteTimestamp;
254 CmdInitAtomicCountersType fpCmdInitAtomicCounters = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdInitAtomicCounters");
255 nextTable.CmdInitAtomicCounters = fpCmdInitAtomicCounters;
256 CmdLoadAtomicCountersType fpCmdLoadAtomicCounters = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdLoadAtomicCounters");
257 nextTable.CmdLoadAtomicCounters = fpCmdLoadAtomicCounters;
258 CmdSaveAtomicCountersType fpCmdSaveAtomicCounters = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdSaveAtomicCounters");
259 nextTable.CmdSaveAtomicCounters = fpCmdSaveAtomicCounters;
260 DbgSetValidationLevelType fpDbgSetValidationLevel = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetValidationLevel");
261 nextTable.DbgSetValidationLevel = fpDbgSetValidationLevel;
262 DbgRegisterMsgCallbackType fpDbgRegisterMsgCallback = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgRegisterMsgCallback");
263 nextTable.DbgRegisterMsgCallback = fpDbgRegisterMsgCallback;
264 DbgUnregisterMsgCallbackType fpDbgUnregisterMsgCallback = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgUnregisterMsgCallback");
265 nextTable.DbgUnregisterMsgCallback = fpDbgUnregisterMsgCallback;
266 DbgSetMessageFilterType fpDbgSetMessageFilter = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetMessageFilter");
267 nextTable.DbgSetMessageFilter = fpDbgSetMessageFilter;
268 DbgSetObjectTagType fpDbgSetObjectTag = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetObjectTag");
269 nextTable.DbgSetObjectTag = fpDbgSetObjectTag;
270 DbgSetGlobalOptionType fpDbgSetGlobalOption = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetGlobalOption");
271 nextTable.DbgSetGlobalOption = fpDbgSetGlobalOption;
272 DbgSetDeviceOptionType fpDbgSetDeviceOption = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglDbgSetDeviceOption");
273 nextTable.DbgSetDeviceOption = fpDbgSetDeviceOption;
274 CmdDbgMarkerBeginType fpCmdDbgMarkerBegin = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDbgMarkerBegin");
275 nextTable.CmdDbgMarkerBegin = fpCmdDbgMarkerBegin;
276 CmdDbgMarkerEndType fpCmdDbgMarkerEnd = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdDbgMarkerEnd");
277 nextTable.CmdDbgMarkerEnd = fpCmdDbgMarkerEnd;
278 WsiX11AssociateConnectionType fpWsiX11AssociateConnection = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11AssociateConnection");
279 nextTable.WsiX11AssociateConnection = fpWsiX11AssociateConnection;
280 WsiX11GetMSCType fpWsiX11GetMSC = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11GetMSC");
281 nextTable.WsiX11GetMSC = fpWsiX11GetMSC;
282 WsiX11CreatePresentableImageType fpWsiX11CreatePresentableImage = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11CreatePresentableImage");
283 nextTable.WsiX11CreatePresentableImage = fpWsiX11CreatePresentableImage;
284 WsiX11QueuePresentType fpWsiX11QueuePresent = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglWsiX11QueuePresent");
285 nextTable.WsiX11QueuePresent = fpWsiX11QueuePresent;
286}
287
288
289XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetGpuInfo(XGL_PHYSICAL_GPU gpu, XGL_PHYSICAL_GPU_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
290{
291 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600292 pCurObj = gpuw;
293 pthread_once(&tabOnce, initLayerTable);
294 XGL_RESULT result = nextTable.GetGpuInfo((XGL_PHYSICAL_GPU)gpuw->nextObject, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600295 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 -0600296 return result;
297}
298
299XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDevice(XGL_PHYSICAL_GPU gpu, const XGL_DEVICE_CREATE_INFO* pCreateInfo, XGL_DEVICE* pDevice)
300{
301 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600302 pCurObj = gpuw;
303 pthread_once(&tabOnce, initLayerTable);
304 XGL_RESULT result = nextTable.CreateDevice((XGL_PHYSICAL_GPU)gpuw->nextObject, pCreateInfo, pDevice);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600305 printf("xglCreateDevice(gpu = %p, pCreateInfo = %p, pDevice = %p) = %s\n", (void*)gpu, (void*)pCreateInfo, (void*)*pDevice, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600306 char *pTmpStr;
307 if (pCreateInfo) {
308 pTmpStr = xgl_print_xgl_device_create_info(pCreateInfo, " ");
309 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
310 free(pTmpStr);
311 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600312 return result;
313}
314
315XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDestroyDevice(XGL_DEVICE device)
316{
317 XGL_RESULT result = nextTable.DestroyDevice(device);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600318 printf("xglDestroyDevice(device = %p) = %s\n", (void*)device, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600319 return result;
320}
321
322XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetExtensionSupport(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* pExtName)
323{
324 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600325 pCurObj = gpuw;
326 pthread_once(&tabOnce, initLayerTable);
327 XGL_RESULT result = nextTable.GetExtensionSupport((XGL_PHYSICAL_GPU)gpuw->nextObject, pExtName);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600328 printf("xglGetExtensionSupport(gpu = %p, pExtName = %p) = %s\n", (void*)gpu, (void*)pExtName, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600329 return result;
330}
331
332XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglEnumerateLayers(XGL_PHYSICAL_GPU gpu, XGL_SIZE maxLayerCount, XGL_SIZE maxStringSize, XGL_CHAR* const* pOutLayers, XGL_SIZE * pOutLayerCount)
333{
334 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600335 pCurObj = gpuw;
336 pthread_once(&tabOnce, initLayerTable);
337 XGL_RESULT result = nextTable.EnumerateLayers((XGL_PHYSICAL_GPU)gpuw->nextObject, maxLayerCount, maxStringSize, pOutLayers, pOutLayerCount);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600338 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 -0600339 return result;
340}
341
342XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetDeviceQueue(XGL_DEVICE device, XGL_QUEUE_TYPE queueType, XGL_UINT queueIndex, XGL_QUEUE* pQueue)
343{
344 XGL_RESULT result = nextTable.GetDeviceQueue(device, queueType, queueIndex, pQueue);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600345 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 -0600346 return result;
347}
348
349XGL_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)
350{
351 XGL_RESULT result = nextTable.QueueSubmit(queue, cmdBufferCount, pCmdBuffers, memRefCount, pMemRefs, fence);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600352 printf("xglQueueSubmit(queue = %p, cmdBufferCount = %i, pCmdBuffers = %p, memRefCount = %i, pMemRefs = %p, fence = %p) = %s\n", (void*)queue, cmdBufferCount, (void*)pCmdBuffers, memRefCount, (void*)pMemRefs, (void*)fence, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600353 char *pTmpStr;
354 if (pMemRefs) {
355 pTmpStr = xgl_print_xgl_memory_ref(pMemRefs, " ");
356 printf(" pMemRefs (%p)\n%s\n", (void*)pMemRefs, pTmpStr);
357 free(pTmpStr);
358 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600359 return result;
360}
361
362XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglQueueSetGlobalMemReferences(XGL_QUEUE queue, XGL_UINT memRefCount, const XGL_MEMORY_REF* pMemRefs)
363{
364 XGL_RESULT result = nextTable.QueueSetGlobalMemReferences(queue, memRefCount, pMemRefs);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600365 printf("xglQueueSetGlobalMemReferences(queue = %p, memRefCount = %i, pMemRefs = %p) = %s\n", (void*)queue, memRefCount, (void*)pMemRefs, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600366 char *pTmpStr;
367 if (pMemRefs) {
368 pTmpStr = xgl_print_xgl_memory_ref(pMemRefs, " ");
369 printf(" pMemRefs (%p)\n%s\n", (void*)pMemRefs, pTmpStr);
370 free(pTmpStr);
371 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600372 return result;
373}
374
375XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglQueueWaitIdle(XGL_QUEUE queue)
376{
377 XGL_RESULT result = nextTable.QueueWaitIdle(queue);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600378 printf("xglQueueWaitIdle(queue = %p) = %s\n", (void*)queue, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600379 return result;
380}
381
382XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDeviceWaitIdle(XGL_DEVICE device)
383{
384 XGL_RESULT result = nextTable.DeviceWaitIdle(device);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600385 printf("xglDeviceWaitIdle(device = %p) = %s\n", (void*)device, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600386 return result;
387}
388
389XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetMemoryHeapCount(XGL_DEVICE device, XGL_UINT* pCount)
390{
391 XGL_RESULT result = nextTable.GetMemoryHeapCount(device, pCount);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600392 printf("xglGetMemoryHeapCount(device = %p, pCount = %i) = %s\n", (void*)device, *pCount, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600393 return result;
394}
395
396XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetMemoryHeapInfo(XGL_DEVICE device, XGL_UINT heapId, XGL_MEMORY_HEAP_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
397{
398 XGL_RESULT result = nextTable.GetMemoryHeapInfo(device, heapId, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600399 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 -0600400 return result;
401}
402
403XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglAllocMemory(XGL_DEVICE device, const XGL_MEMORY_ALLOC_INFO* pAllocInfo, XGL_GPU_MEMORY* pMem)
404{
405 XGL_RESULT result = nextTable.AllocMemory(device, pAllocInfo, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600406 printf("xglAllocMemory(device = %p, pAllocInfo = %p, pMem = %p) = %s\n", (void*)device, (void*)pAllocInfo, (void*)pMem, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600407 char *pTmpStr;
408 if (pAllocInfo) {
409 pTmpStr = xgl_print_xgl_memory_alloc_info(pAllocInfo, " ");
410 printf(" pAllocInfo (%p)\n%s\n", (void*)pAllocInfo, pTmpStr);
411 free(pTmpStr);
412 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600413 return result;
414}
415
416XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglFreeMemory(XGL_GPU_MEMORY mem)
417{
418 XGL_RESULT result = nextTable.FreeMemory(mem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600419 printf("xglFreeMemory(mem = %p) = %s\n", (void*)mem, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600420 return result;
421}
422
423XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglSetMemoryPriority(XGL_GPU_MEMORY mem, XGL_MEMORY_PRIORITY priority)
424{
425 XGL_RESULT result = nextTable.SetMemoryPriority(mem, priority);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600426 printf("xglSetMemoryPriority(mem = %p, priority = %p) = %s\n", (void*)mem, (void*)priority, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600427 return result;
428}
429
430XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglMapMemory(XGL_GPU_MEMORY mem, XGL_FLAGS flags, XGL_VOID** ppData)
431{
432 XGL_RESULT result = nextTable.MapMemory(mem, flags, ppData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600433 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 -0600434 return result;
435}
436
437XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglUnmapMemory(XGL_GPU_MEMORY mem)
438{
439 XGL_RESULT result = nextTable.UnmapMemory(mem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600440 printf("xglUnmapMemory(mem = %p) = %s\n", (void*)mem, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600441 return result;
442}
443
444XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglPinSystemMemory(XGL_DEVICE device, const XGL_VOID* pSysMem, XGL_SIZE memSize, XGL_GPU_MEMORY* pMem)
445{
446 XGL_RESULT result = nextTable.PinSystemMemory(device, pSysMem, memSize, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600447 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 -0600448 return result;
449}
450
451XGL_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)
452{
453 XGL_RESULT result = nextTable.RemapVirtualMemoryPages(device, rangeCount, pRanges, preWaitSemaphoreCount, pPreWaitSemaphores, postSignalSemaphoreCount, pPostSignalSemaphores);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600454 printf("xglRemapVirtualMemoryPages(device = %p, rangeCount = %i, pRanges = %p, preWaitSemaphoreCount = %i, pPreWaitSemaphores = %p, postSignalSemaphoreCount = %i, pPostSignalSemaphores = %p) = %s\n", (void*)device, rangeCount, (void*)pRanges, preWaitSemaphoreCount, (void*)pPreWaitSemaphores, postSignalSemaphoreCount, (void*)pPostSignalSemaphores, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600455 char *pTmpStr;
456 if (pRanges) {
457 pTmpStr = xgl_print_xgl_virtual_memory_remap_range(pRanges, " ");
458 printf(" pRanges (%p)\n%s\n", (void*)pRanges, pTmpStr);
459 free(pTmpStr);
460 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600461 return result;
462}
463
464XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetMultiGpuCompatibility(XGL_PHYSICAL_GPU gpu0, XGL_PHYSICAL_GPU gpu1, XGL_GPU_COMPATIBILITY_INFO* pInfo)
465{
466 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu0;
Tobin Ehlis817736c2014-10-21 10:47:45 -0600467 pCurObj = gpuw;
468 pthread_once(&tabOnce, initLayerTable);
469 XGL_RESULT result = nextTable.GetMultiGpuCompatibility((XGL_PHYSICAL_GPU)gpuw->nextObject, gpu1, pInfo);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600470 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 -0600471 return result;
472}
473
474XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenSharedMemory(XGL_DEVICE device, const XGL_MEMORY_OPEN_INFO* pOpenInfo, XGL_GPU_MEMORY* pMem)
475{
476 XGL_RESULT result = nextTable.OpenSharedMemory(device, pOpenInfo, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600477 printf("xglOpenSharedMemory(device = %p, pOpenInfo = %p, pMem = %p) = %s\n", (void*)device, (void*)pOpenInfo, (void*)pMem, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600478 char *pTmpStr;
479 if (pOpenInfo) {
480 pTmpStr = xgl_print_xgl_memory_open_info(pOpenInfo, " ");
481 printf(" pOpenInfo (%p)\n%s\n", (void*)pOpenInfo, pTmpStr);
482 free(pTmpStr);
483 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600484 return result;
485}
486
487XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenSharedQueueSemaphore(XGL_DEVICE device, const XGL_QUEUE_SEMAPHORE_OPEN_INFO* pOpenInfo, XGL_QUEUE_SEMAPHORE* pSemaphore)
488{
489 XGL_RESULT result = nextTable.OpenSharedQueueSemaphore(device, pOpenInfo, pSemaphore);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600490 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 -0600491 return result;
492}
493
494XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenPeerMemory(XGL_DEVICE device, const XGL_PEER_MEMORY_OPEN_INFO* pOpenInfo, XGL_GPU_MEMORY* pMem)
495{
496 XGL_RESULT result = nextTable.OpenPeerMemory(device, pOpenInfo, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600497 printf("xglOpenPeerMemory(device = %p, pOpenInfo = %p, pMem = %p) = %s\n", (void*)device, (void*)pOpenInfo, (void*)pMem, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600498 char *pTmpStr;
499 if (pOpenInfo) {
500 pTmpStr = xgl_print_xgl_peer_memory_open_info(pOpenInfo, " ");
501 printf(" pOpenInfo (%p)\n%s\n", (void*)pOpenInfo, pTmpStr);
502 free(pTmpStr);
503 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600504 return result;
505}
506
507XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglOpenPeerImage(XGL_DEVICE device, const XGL_PEER_IMAGE_OPEN_INFO* pOpenInfo, XGL_IMAGE* pImage, XGL_GPU_MEMORY* pMem)
508{
509 XGL_RESULT result = nextTable.OpenPeerImage(device, pOpenInfo, pImage, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600510 printf("xglOpenPeerImage(device = %p, pOpenInfo = %p, pImage = %p, pMem = %p) = %s\n", (void*)device, (void*)pOpenInfo, (void*)pImage, (void*)pMem, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600511 char *pTmpStr;
512 if (pOpenInfo) {
513 pTmpStr = xgl_print_xgl_peer_image_open_info(pOpenInfo, " ");
514 printf(" pOpenInfo (%p)\n%s\n", (void*)pOpenInfo, pTmpStr);
515 free(pTmpStr);
516 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600517 return result;
518}
519
520XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDestroyObject(XGL_OBJECT object)
521{
522 XGL_RESULT result = nextTable.DestroyObject(object);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600523 printf("xglDestroyObject(object = %p) = %s\n", (void*)object, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600524 return result;
525}
526
527XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetObjectInfo(XGL_BASE_OBJECT object, XGL_OBJECT_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
528{
529 XGL_RESULT result = nextTable.GetObjectInfo(object, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600530 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 -0600531 return result;
532}
533
534XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglBindObjectMemory(XGL_OBJECT object, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset)
535{
536 XGL_RESULT result = nextTable.BindObjectMemory(object, mem, offset);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600537 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 -0600538 return result;
539}
540
541XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateFence(XGL_DEVICE device, const XGL_FENCE_CREATE_INFO* pCreateInfo, XGL_FENCE* pFence)
542{
543 XGL_RESULT result = nextTable.CreateFence(device, pCreateInfo, pFence);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600544 printf("xglCreateFence(device = %p, pCreateInfo = %p, pFence = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pFence, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600545 char *pTmpStr;
546 if (pCreateInfo) {
547 pTmpStr = xgl_print_xgl_fence_create_info(pCreateInfo, " ");
548 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
549 free(pTmpStr);
550 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600551 return result;
552}
553
554XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetFenceStatus(XGL_FENCE fence)
555{
556 XGL_RESULT result = nextTable.GetFenceStatus(fence);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600557 printf("xglGetFenceStatus(fence = %p) = %s\n", (void*)fence, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600558 return result;
559}
560
561XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWaitForFences(XGL_DEVICE device, XGL_UINT fenceCount, const XGL_FENCE* pFences, XGL_BOOL waitAll, XGL_UINT64 timeout)
562{
563 XGL_RESULT result = nextTable.WaitForFences(device, fenceCount, pFences, waitAll, timeout);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600564 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 -0600565 return result;
566}
567
568XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateQueueSemaphore(XGL_DEVICE device, const XGL_QUEUE_SEMAPHORE_CREATE_INFO* pCreateInfo, XGL_QUEUE_SEMAPHORE* pSemaphore)
569{
570 XGL_RESULT result = nextTable.CreateQueueSemaphore(device, pCreateInfo, pSemaphore);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600571 printf("xglCreateQueueSemaphore(device = %p, pCreateInfo = %p, pSemaphore = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pSemaphore, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600572 char *pTmpStr;
573 if (pCreateInfo) {
574 pTmpStr = xgl_print_xgl_queue_semaphore_create_info(pCreateInfo, " ");
575 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
576 free(pTmpStr);
577 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600578 return result;
579}
580
581XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglSignalQueueSemaphore(XGL_QUEUE queue, XGL_QUEUE_SEMAPHORE semaphore)
582{
583 XGL_RESULT result = nextTable.SignalQueueSemaphore(queue, semaphore);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600584 printf("xglSignalQueueSemaphore(queue = %p, semaphore = %p) = %s\n", (void*)queue, (void*)semaphore, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600585 return result;
586}
587
588XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWaitQueueSemaphore(XGL_QUEUE queue, XGL_QUEUE_SEMAPHORE semaphore)
589{
590 XGL_RESULT result = nextTable.WaitQueueSemaphore(queue, semaphore);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600591 printf("xglWaitQueueSemaphore(queue = %p, semaphore = %p) = %s\n", (void*)queue, (void*)semaphore, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600592 return result;
593}
594
595XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateEvent(XGL_DEVICE device, const XGL_EVENT_CREATE_INFO* pCreateInfo, XGL_EVENT* pEvent)
596{
597 XGL_RESULT result = nextTable.CreateEvent(device, pCreateInfo, pEvent);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600598 printf("xglCreateEvent(device = %p, pCreateInfo = %p, pEvent = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pEvent, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600599 char *pTmpStr;
600 if (pCreateInfo) {
601 pTmpStr = xgl_print_xgl_event_create_info(pCreateInfo, " ");
602 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
603 free(pTmpStr);
604 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600605 return result;
606}
607
608XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetEventStatus(XGL_EVENT event)
609{
610 XGL_RESULT result = nextTable.GetEventStatus(event);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600611 printf("xglGetEventStatus(event = %p) = %s\n", (void*)event, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600612 return result;
613}
614
615XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglSetEvent(XGL_EVENT event)
616{
617 XGL_RESULT result = nextTable.SetEvent(event);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600618 printf("xglSetEvent(event = %p) = %s\n", (void*)event, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600619 return result;
620}
621
622XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglResetEvent(XGL_EVENT event)
623{
624 XGL_RESULT result = nextTable.ResetEvent(event);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600625 printf("xglResetEvent(event = %p) = %s\n", (void*)event, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600626 return result;
627}
628
629XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateQueryPool(XGL_DEVICE device, const XGL_QUERY_POOL_CREATE_INFO* pCreateInfo, XGL_QUERY_POOL* pQueryPool)
630{
631 XGL_RESULT result = nextTable.CreateQueryPool(device, pCreateInfo, pQueryPool);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600632 printf("xglCreateQueryPool(device = %p, pCreateInfo = %p, pQueryPool = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pQueryPool, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600633 char *pTmpStr;
634 if (pCreateInfo) {
635 pTmpStr = xgl_print_xgl_query_pool_create_info(pCreateInfo, " ");
636 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
637 free(pTmpStr);
638 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600639 return result;
640}
641
642XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetQueryPoolResults(XGL_QUERY_POOL queryPool, XGL_UINT startQuery, XGL_UINT queryCount, XGL_SIZE* pDataSize, XGL_VOID* pData)
643{
644 XGL_RESULT result = nextTable.GetQueryPoolResults(queryPool, startQuery, queryCount, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600645 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 -0600646 return result;
647}
648
649XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetFormatInfo(XGL_DEVICE device, XGL_FORMAT format, XGL_FORMAT_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData)
650{
651 XGL_RESULT result = nextTable.GetFormatInfo(device, format, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600652 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 -0600653 return result;
654}
655
656XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateImage(XGL_DEVICE device, const XGL_IMAGE_CREATE_INFO* pCreateInfo, XGL_IMAGE* pImage)
657{
658 XGL_RESULT result = nextTable.CreateImage(device, pCreateInfo, pImage);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600659 printf("xglCreateImage(device = %p, pCreateInfo = %p, pImage = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pImage, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600660 char *pTmpStr;
661 if (pCreateInfo) {
662 pTmpStr = xgl_print_xgl_image_create_info(pCreateInfo, " ");
663 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
664 free(pTmpStr);
665 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600666 return result;
667}
668
669XGL_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)
670{
671 XGL_RESULT result = nextTable.GetImageSubresourceInfo(image, pSubresource, infoType, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600672 printf("xglGetImageSubresourceInfo(image = %p, pSubresource = %p, infoType = %s, pDataSize = %i, pData = %p) = %s\n", (void*)image, (void*)pSubresource, string_XGL_SUBRESOURCE_INFO_TYPE(infoType), *pDataSize, (void*)pData, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600673 char *pTmpStr;
674 if (pSubresource) {
675 pTmpStr = xgl_print_xgl_image_subresource(pSubresource, " ");
676 printf(" pSubresource (%p)\n%s\n", (void*)pSubresource, pTmpStr);
677 free(pTmpStr);
678 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600679 return result;
680}
681
682XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateImageView(XGL_DEVICE device, const XGL_IMAGE_VIEW_CREATE_INFO* pCreateInfo, XGL_IMAGE_VIEW* pView)
683{
684 XGL_RESULT result = nextTable.CreateImageView(device, pCreateInfo, pView);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600685 printf("xglCreateImageView(device = %p, pCreateInfo = %p, pView = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pView, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600686 char *pTmpStr;
687 if (pCreateInfo) {
688 pTmpStr = xgl_print_xgl_image_view_create_info(pCreateInfo, " ");
689 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
690 free(pTmpStr);
691 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600692 return result;
693}
694
695XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateColorAttachmentView(XGL_DEVICE device, const XGL_COLOR_ATTACHMENT_VIEW_CREATE_INFO* pCreateInfo, XGL_COLOR_ATTACHMENT_VIEW* pView)
696{
697 XGL_RESULT result = nextTable.CreateColorAttachmentView(device, pCreateInfo, pView);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600698 printf("xglCreateColorAttachmentView(device = %p, pCreateInfo = %p, pView = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pView, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600699 char *pTmpStr;
700 if (pCreateInfo) {
701 pTmpStr = xgl_print_xgl_color_attachment_view_create_info(pCreateInfo, " ");
702 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
703 free(pTmpStr);
704 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600705 return result;
706}
707
708XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDepthStencilView(XGL_DEVICE device, const XGL_DEPTH_STENCIL_VIEW_CREATE_INFO* pCreateInfo, XGL_DEPTH_STENCIL_VIEW* pView)
709{
710 XGL_RESULT result = nextTable.CreateDepthStencilView(device, pCreateInfo, pView);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600711 printf("xglCreateDepthStencilView(device = %p, pCreateInfo = %p, pView = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pView, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600712 char *pTmpStr;
713 if (pCreateInfo) {
714 pTmpStr = xgl_print_xgl_depth_stencil_view_create_info(pCreateInfo, " ");
715 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
716 free(pTmpStr);
717 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600718 return result;
719}
720
721XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateShader(XGL_DEVICE device, const XGL_SHADER_CREATE_INFO* pCreateInfo, XGL_SHADER* pShader)
722{
723 XGL_RESULT result = nextTable.CreateShader(device, pCreateInfo, pShader);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600724 printf("xglCreateShader(device = %p, pCreateInfo = %p, pShader = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pShader, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600725 char *pTmpStr;
726 if (pCreateInfo) {
727 pTmpStr = xgl_print_xgl_shader_create_info(pCreateInfo, " ");
728 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
729 free(pTmpStr);
730 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600731 return result;
732}
733
734XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateGraphicsPipeline(XGL_DEVICE device, const XGL_GRAPHICS_PIPELINE_CREATE_INFO* pCreateInfo, XGL_PIPELINE* pPipeline)
735{
736 XGL_RESULT result = nextTable.CreateGraphicsPipeline(device, pCreateInfo, pPipeline);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600737 printf("xglCreateGraphicsPipeline(device = %p, pCreateInfo = %p, pPipeline = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pPipeline, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600738 char *pTmpStr;
739 if (pCreateInfo) {
740 pTmpStr = xgl_print_xgl_graphics_pipeline_create_info(pCreateInfo, " ");
741 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
742 free(pTmpStr);
743 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600744 return result;
745}
746
747XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateComputePipeline(XGL_DEVICE device, const XGL_COMPUTE_PIPELINE_CREATE_INFO* pCreateInfo, XGL_PIPELINE* pPipeline)
748{
749 XGL_RESULT result = nextTable.CreateComputePipeline(device, pCreateInfo, pPipeline);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600750 printf("xglCreateComputePipeline(device = %p, pCreateInfo = %p, pPipeline = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pPipeline, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600751 char *pTmpStr;
752 if (pCreateInfo) {
753 pTmpStr = xgl_print_xgl_compute_pipeline_create_info(pCreateInfo, " ");
754 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
755 free(pTmpStr);
756 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600757 return result;
758}
759
760XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglStorePipeline(XGL_PIPELINE pipeline, XGL_SIZE* pDataSize, XGL_VOID* pData)
761{
762 XGL_RESULT result = nextTable.StorePipeline(pipeline, pDataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600763 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 -0600764 return result;
765}
766
767XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglLoadPipeline(XGL_DEVICE device, XGL_SIZE dataSize, const XGL_VOID* pData, XGL_PIPELINE* pPipeline)
768{
769 XGL_RESULT result = nextTable.LoadPipeline(device, dataSize, pData, pPipeline);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600770 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 -0600771 return result;
772}
773
774XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreatePipelineDelta(XGL_DEVICE device, XGL_PIPELINE p1, XGL_PIPELINE p2, XGL_PIPELINE_DELTA* delta)
775{
776 XGL_RESULT result = nextTable.CreatePipelineDelta(device, p1, p2, delta);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600777 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 -0600778 return result;
779}
780
781XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateSampler(XGL_DEVICE device, const XGL_SAMPLER_CREATE_INFO* pCreateInfo, XGL_SAMPLER* pSampler)
782{
783 XGL_RESULT result = nextTable.CreateSampler(device, pCreateInfo, pSampler);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600784 printf("xglCreateSampler(device = %p, pCreateInfo = %p, pSampler = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pSampler, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600785 char *pTmpStr;
786 if (pCreateInfo) {
787 pTmpStr = xgl_print_xgl_sampler_create_info(pCreateInfo, " ");
788 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
789 free(pTmpStr);
790 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600791 return result;
792}
793
794XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDescriptorSet(XGL_DEVICE device, const XGL_DESCRIPTOR_SET_CREATE_INFO* pCreateInfo, XGL_DESCRIPTOR_SET* pDescriptorSet)
795{
796 XGL_RESULT result = nextTable.CreateDescriptorSet(device, pCreateInfo, pDescriptorSet);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600797 printf("xglCreateDescriptorSet(device = %p, pCreateInfo = %p, pDescriptorSet = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pDescriptorSet, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600798 char *pTmpStr;
799 if (pCreateInfo) {
800 pTmpStr = xgl_print_xgl_descriptor_set_create_info(pCreateInfo, " ");
801 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
802 free(pTmpStr);
803 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600804 return result;
805}
806
807XGL_LAYER_EXPORT XGL_VOID XGLAPI xglBeginDescriptorSetUpdate(XGL_DESCRIPTOR_SET descriptorSet)
808{
809 nextTable.BeginDescriptorSetUpdate(descriptorSet);
810 printf("xglBeginDescriptorSetUpdate(descriptorSet = %p)\n", (void*)descriptorSet);
811}
812
813XGL_LAYER_EXPORT XGL_VOID XGLAPI xglEndDescriptorSetUpdate(XGL_DESCRIPTOR_SET descriptorSet)
814{
815 nextTable.EndDescriptorSetUpdate(descriptorSet);
816 printf("xglEndDescriptorSetUpdate(descriptorSet = %p)\n", (void*)descriptorSet);
817}
818
819XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachSamplerDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_SAMPLER* pSamplers)
820{
821 nextTable.AttachSamplerDescriptors(descriptorSet, startSlot, slotCount, pSamplers);
822 printf("xglAttachSamplerDescriptors(descriptorSet = %p, startSlot = %i, slotCount = %i, pSamplers = %p)\n", (void*)descriptorSet, startSlot, slotCount, (void*)pSamplers);
823}
824
825XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachImageViewDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_IMAGE_VIEW_ATTACH_INFO* pImageViews)
826{
827 nextTable.AttachImageViewDescriptors(descriptorSet, startSlot, slotCount, pImageViews);
828 printf("xglAttachImageViewDescriptors(descriptorSet = %p, startSlot = %i, slotCount = %i, pImageViews = %p)\n", (void*)descriptorSet, startSlot, slotCount, (void*)pImageViews);
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600829 char *pTmpStr;
830 if (pImageViews) {
831 pTmpStr = xgl_print_xgl_image_view_attach_info(pImageViews, " ");
832 printf(" pImageViews (%p)\n%s\n", (void*)pImageViews, pTmpStr);
833 free(pTmpStr);
834 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600835}
836
837XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachMemoryViewDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_MEMORY_VIEW_ATTACH_INFO* pMemViews)
838{
839 nextTable.AttachMemoryViewDescriptors(descriptorSet, startSlot, slotCount, pMemViews);
840 printf("xglAttachMemoryViewDescriptors(descriptorSet = %p, startSlot = %i, slotCount = %i, pMemViews = %p)\n", (void*)descriptorSet, startSlot, slotCount, (void*)pMemViews);
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600841 char *pTmpStr;
842 if (pMemViews) {
843 pTmpStr = xgl_print_xgl_memory_view_attach_info(pMemViews, " ");
844 printf(" pMemViews (%p)\n%s\n", (void*)pMemViews, pTmpStr);
845 free(pTmpStr);
846 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600847}
848
849XGL_LAYER_EXPORT XGL_VOID XGLAPI xglAttachNestedDescriptors(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_DESCRIPTOR_SET_ATTACH_INFO* pNestedDescriptorSets)
850{
851 nextTable.AttachNestedDescriptors(descriptorSet, startSlot, slotCount, pNestedDescriptorSets);
852 printf("xglAttachNestedDescriptors(descriptorSet = %p, startSlot = %i, slotCount = %i, pNestedDescriptorSets = %p)\n", (void*)descriptorSet, startSlot, slotCount, (void*)pNestedDescriptorSets);
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600853 char *pTmpStr;
854 if (pNestedDescriptorSets) {
855 pTmpStr = xgl_print_xgl_descriptor_set_attach_info(pNestedDescriptorSets, " ");
856 printf(" pNestedDescriptorSets (%p)\n%s\n", (void*)pNestedDescriptorSets, pTmpStr);
857 free(pTmpStr);
858 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600859}
860
861XGL_LAYER_EXPORT XGL_VOID XGLAPI xglClearDescriptorSetSlots(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount)
862{
863 nextTable.ClearDescriptorSetSlots(descriptorSet, startSlot, slotCount);
864 printf("xglClearDescriptorSetSlots(descriptorSet = %p, startSlot = %i, slotCount = %i)\n", (void*)descriptorSet, startSlot, slotCount);
865}
866
867XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateViewportState(XGL_DEVICE device, const XGL_VIEWPORT_STATE_CREATE_INFO* pCreateInfo, XGL_VIEWPORT_STATE_OBJECT* pState)
868{
869 XGL_RESULT result = nextTable.CreateViewportState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600870 printf("xglCreateViewportState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600871 char *pTmpStr;
872 if (pCreateInfo) {
873 pTmpStr = xgl_print_xgl_viewport_state_create_info(pCreateInfo, " ");
874 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
875 free(pTmpStr);
876 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600877 return result;
878}
879
880XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateRasterState(XGL_DEVICE device, const XGL_RASTER_STATE_CREATE_INFO* pCreateInfo, XGL_RASTER_STATE_OBJECT* pState)
881{
882 XGL_RESULT result = nextTable.CreateRasterState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600883 printf("xglCreateRasterState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600884 char *pTmpStr;
885 if (pCreateInfo) {
886 pTmpStr = xgl_print_xgl_raster_state_create_info(pCreateInfo, " ");
887 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
888 free(pTmpStr);
889 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600890 return result;
891}
892
893XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateMsaaState(XGL_DEVICE device, const XGL_MSAA_STATE_CREATE_INFO* pCreateInfo, XGL_MSAA_STATE_OBJECT* pState)
894{
895 XGL_RESULT result = nextTable.CreateMsaaState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600896 printf("xglCreateMsaaState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600897 char *pTmpStr;
898 if (pCreateInfo) {
899 pTmpStr = xgl_print_xgl_msaa_state_create_info(pCreateInfo, " ");
900 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
901 free(pTmpStr);
902 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600903 return result;
904}
905
906XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateColorBlendState(XGL_DEVICE device, const XGL_COLOR_BLEND_STATE_CREATE_INFO* pCreateInfo, XGL_COLOR_BLEND_STATE_OBJECT* pState)
907{
908 XGL_RESULT result = nextTable.CreateColorBlendState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600909 printf("xglCreateColorBlendState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600910 char *pTmpStr;
911 if (pCreateInfo) {
912 pTmpStr = xgl_print_xgl_color_blend_state_create_info(pCreateInfo, " ");
913 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
914 free(pTmpStr);
915 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600916 return result;
917}
918
919XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateDepthStencilState(XGL_DEVICE device, const XGL_DEPTH_STENCIL_STATE_CREATE_INFO* pCreateInfo, XGL_DEPTH_STENCIL_STATE_OBJECT* pState)
920{
921 XGL_RESULT result = nextTable.CreateDepthStencilState(device, pCreateInfo, pState);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600922 printf("xglCreateDepthStencilState(device = %p, pCreateInfo = %p, pState = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pState, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600923 char *pTmpStr;
924 if (pCreateInfo) {
925 pTmpStr = xgl_print_xgl_depth_stencil_state_create_info(pCreateInfo, " ");
926 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
927 free(pTmpStr);
928 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600929 return result;
930}
931
932XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglCreateCommandBuffer(XGL_DEVICE device, const XGL_CMD_BUFFER_CREATE_INFO* pCreateInfo, XGL_CMD_BUFFER* pCmdBuffer)
933{
934 XGL_RESULT result = nextTable.CreateCommandBuffer(device, pCreateInfo, pCmdBuffer);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600935 printf("xglCreateCommandBuffer(device = %p, pCreateInfo = %p, pCmdBuffer = %p) = %s\n", (void*)device, (void*)pCreateInfo, (void*)*pCmdBuffer, string_XGL_RESULT(result));
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600936 char *pTmpStr;
937 if (pCreateInfo) {
938 pTmpStr = xgl_print_xgl_cmd_buffer_create_info(pCreateInfo, " ");
939 printf(" pCreateInfo (%p)\n%s\n", (void*)pCreateInfo, pTmpStr);
940 free(pTmpStr);
941 }
Tobin Ehlis817736c2014-10-21 10:47:45 -0600942 return result;
943}
944
945XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglBeginCommandBuffer(XGL_CMD_BUFFER cmdBuffer, XGL_FLAGS flags)
946{
947 XGL_RESULT result = nextTable.BeginCommandBuffer(cmdBuffer, flags);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600948 printf("xglBeginCommandBuffer(cmdBuffer = %p, flags = %i) = %s\n", (void*)cmdBuffer, flags, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600949 return result;
950}
951
952XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglEndCommandBuffer(XGL_CMD_BUFFER cmdBuffer)
953{
954 XGL_RESULT result = nextTable.EndCommandBuffer(cmdBuffer);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600955 printf("xglEndCommandBuffer(cmdBuffer = %p) = %s\n", (void*)cmdBuffer, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600956 return result;
957}
958
959XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglResetCommandBuffer(XGL_CMD_BUFFER cmdBuffer)
960{
961 XGL_RESULT result = nextTable.ResetCommandBuffer(cmdBuffer);
Tobin Ehlis92dbf802014-10-22 09:06:33 -0600962 printf("xglResetCommandBuffer(cmdBuffer = %p) = %s\n", (void*)cmdBuffer, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -0600963 return result;
964}
965
966XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindPipeline(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_PIPELINE pipeline)
967{
968 nextTable.CmdBindPipeline(cmdBuffer, pipelineBindPoint, pipeline);
969 printf("xglCmdBindPipeline(cmdBuffer = %p, pipelineBindPoint = %i, pipeline = %p)\n", (void*)cmdBuffer, pipelineBindPoint, (void*)pipeline);
970}
971
972XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindPipelineDelta(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_PIPELINE_DELTA delta)
973{
974 nextTable.CmdBindPipelineDelta(cmdBuffer, pipelineBindPoint, delta);
975 printf("xglCmdBindPipelineDelta(cmdBuffer = %p, pipelineBindPoint = %i, delta = %p)\n", (void*)cmdBuffer, pipelineBindPoint, (void*)delta);
976}
977
978XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindStateObject(XGL_CMD_BUFFER cmdBuffer, XGL_STATE_BIND_POINT stateBindPoint, XGL_STATE_OBJECT state)
979{
980 nextTable.CmdBindStateObject(cmdBuffer, stateBindPoint, state);
981 printf("xglCmdBindStateObject(cmdBuffer = %p, stateBindPoint = %i, state = %p)\n", (void*)cmdBuffer, stateBindPoint, (void*)state);
982}
983
984XGL_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)
985{
986 nextTable.CmdBindDescriptorSet(cmdBuffer, pipelineBindPoint, index, descriptorSet, slotOffset);
987 printf("xglCmdBindDescriptorSet(cmdBuffer = %p, pipelineBindPoint = %i, index = %i, descriptorSet = %p, slotOffset = %i)\n", (void*)cmdBuffer, pipelineBindPoint, index, (void*)descriptorSet, slotOffset);
988}
989
990XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindDynamicMemoryView(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, const XGL_MEMORY_VIEW_ATTACH_INFO* pMemView)
991{
992 nextTable.CmdBindDynamicMemoryView(cmdBuffer, pipelineBindPoint, pMemView);
993 printf("xglCmdBindDynamicMemoryView(cmdBuffer = %p, pipelineBindPoint = %i, pMemView = %p)\n", (void*)cmdBuffer, pipelineBindPoint, (void*)pMemView);
Tobin Ehlis73ff5672014-10-23 08:19:47 -0600994 char *pTmpStr;
995 if (pMemView) {
996 pTmpStr = xgl_print_xgl_memory_view_attach_info(pMemView, " ");
997 printf(" pMemView (%p)\n%s\n", (void*)pMemView, pTmpStr);
998 free(pTmpStr);
999 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001000}
1001
Chia-I Wu3b04af52014-11-08 10:48:20 +08001002XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindVertexData(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT binding)
1003{
1004 nextTable.CmdBindVertexData(cmdBuffer, mem, offset, binding);
1005 printf("xglCmdBindVertexData(cmdBuffer = %p, mem = %p, offset = %i, binding = %d)\n", (void*)cmdBuffer, (void*)mem, offset, binding);
1006}
1007
Tobin Ehlis817736c2014-10-21 10:47:45 -06001008XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindIndexData(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_INDEX_TYPE indexType)
1009{
1010 nextTable.CmdBindIndexData(cmdBuffer, mem, offset, indexType);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001011 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 -06001012}
1013
1014XGL_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)
1015{
1016 nextTable.CmdBindAttachments(cmdBuffer, colorAttachmentCount, pColorAttachments, pDepthStencilAttachment);
1017 printf("xglCmdBindAttachments(cmdBuffer = %p, colorAttachmentCount = %i, pColorAttachments = %p, pDepthStencilAttachment = %p)\n", (void*)cmdBuffer, colorAttachmentCount, (void*)pColorAttachments, (void*)pDepthStencilAttachment);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001018 char *pTmpStr;
1019 if (pColorAttachments) {
1020 pTmpStr = xgl_print_xgl_color_attachment_bind_info(pColorAttachments, " ");
1021 printf(" pColorAttachments (%p)\n%s\n", (void*)pColorAttachments, pTmpStr);
1022 free(pTmpStr);
1023 }
1024 if (pDepthStencilAttachment) {
1025 pTmpStr = xgl_print_xgl_depth_stencil_bind_info(pDepthStencilAttachment, " ");
1026 printf(" pDepthStencilAttachment (%p)\n%s\n", (void*)pDepthStencilAttachment, pTmpStr);
1027 free(pTmpStr);
1028 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001029}
1030
1031XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdPrepareMemoryRegions(XGL_CMD_BUFFER cmdBuffer, XGL_UINT transitionCount, const XGL_MEMORY_STATE_TRANSITION* pStateTransitions)
1032{
1033 nextTable.CmdPrepareMemoryRegions(cmdBuffer, transitionCount, pStateTransitions);
1034 printf("xglCmdPrepareMemoryRegions(cmdBuffer = %p, transitionCount = %i, pStateTransitions = %p)\n", (void*)cmdBuffer, transitionCount, (void*)pStateTransitions);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001035 char *pTmpStr;
1036 if (pStateTransitions) {
1037 pTmpStr = xgl_print_xgl_memory_state_transition(pStateTransitions, " ");
1038 printf(" pStateTransitions (%p)\n%s\n", (void*)pStateTransitions, pTmpStr);
1039 free(pTmpStr);
1040 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001041}
1042
1043XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdPrepareImages(XGL_CMD_BUFFER cmdBuffer, XGL_UINT transitionCount, const XGL_IMAGE_STATE_TRANSITION* pStateTransitions)
1044{
1045 nextTable.CmdPrepareImages(cmdBuffer, transitionCount, pStateTransitions);
1046 printf("xglCmdPrepareImages(cmdBuffer = %p, transitionCount = %i, pStateTransitions = %p)\n", (void*)cmdBuffer, transitionCount, (void*)pStateTransitions);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001047 char *pTmpStr;
1048 if (pStateTransitions) {
1049 pTmpStr = xgl_print_xgl_image_state_transition(pStateTransitions, " ");
1050 printf(" pStateTransitions (%p)\n%s\n", (void*)pStateTransitions, pTmpStr);
1051 free(pTmpStr);
1052 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001053}
1054
1055XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDraw(XGL_CMD_BUFFER cmdBuffer, XGL_UINT firstVertex, XGL_UINT vertexCount, XGL_UINT firstInstance, XGL_UINT instanceCount)
1056{
1057 nextTable.CmdDraw(cmdBuffer, firstVertex, vertexCount, firstInstance, instanceCount);
1058 printf("xglCmdDraw(cmdBuffer = %p, firstVertex = %i, vertexCount = %i, firstInstance = %i, instanceCount = %i)\n", (void*)cmdBuffer, firstVertex, vertexCount, firstInstance, instanceCount);
1059}
1060
1061XGL_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)
1062{
1063 nextTable.CmdDrawIndexed(cmdBuffer, firstIndex, indexCount, vertexOffset, firstInstance, instanceCount);
1064 printf("xglCmdDrawIndexed(cmdBuffer = %p, firstIndex = %i, indexCount = %i, vertexOffset = %i, firstInstance = %i, instanceCount = %i)\n", (void*)cmdBuffer, firstIndex, indexCount, vertexOffset, firstInstance, instanceCount);
1065}
1066
1067XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDrawIndirect(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT32 count, XGL_UINT32 stride)
1068{
1069 nextTable.CmdDrawIndirect(cmdBuffer, mem, offset, count, stride);
1070 printf("xglCmdDrawIndirect(cmdBuffer = %p, mem = %p, offset = %i, count = %i, stride = %i)\n", (void*)cmdBuffer, (void*)mem, offset, count, stride);
1071}
1072
1073XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDrawIndexedIndirect(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT32 count, XGL_UINT32 stride)
1074{
1075 nextTable.CmdDrawIndexedIndirect(cmdBuffer, mem, offset, count, stride);
1076 printf("xglCmdDrawIndexedIndirect(cmdBuffer = %p, mem = %p, offset = %i, count = %i, stride = %i)\n", (void*)cmdBuffer, (void*)mem, offset, count, stride);
1077}
1078
1079XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDispatch(XGL_CMD_BUFFER cmdBuffer, XGL_UINT x, XGL_UINT y, XGL_UINT z)
1080{
1081 nextTable.CmdDispatch(cmdBuffer, x, y, z);
1082 printf("xglCmdDispatch(cmdBuffer = %p, x = %i, y = %i, z = %i)\n", (void*)cmdBuffer, x, y, z);
1083}
1084
1085XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDispatchIndirect(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset)
1086{
1087 nextTable.CmdDispatchIndirect(cmdBuffer, mem, offset);
1088 printf("xglCmdDispatchIndirect(cmdBuffer = %p, mem = %p, offset = %i)\n", (void*)cmdBuffer, (void*)mem, offset);
1089}
1090
1091XGL_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)
1092{
1093 nextTable.CmdCopyMemory(cmdBuffer, srcMem, destMem, regionCount, pRegions);
1094 printf("xglCmdCopyMemory(cmdBuffer = %p, srcMem = %p, destMem = %p, regionCount = %i, pRegions = %p)\n", (void*)cmdBuffer, (void*)srcMem, (void*)destMem, regionCount, (void*)pRegions);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001095 char *pTmpStr;
1096 if (pRegions) {
1097 pTmpStr = xgl_print_xgl_memory_copy(pRegions, " ");
1098 printf(" pRegions (%p)\n%s\n", (void*)pRegions, pTmpStr);
1099 free(pTmpStr);
1100 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001101}
1102
1103XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdCopyImage(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE destImage, XGL_UINT regionCount, const XGL_IMAGE_COPY* pRegions)
1104{
1105 nextTable.CmdCopyImage(cmdBuffer, srcImage, destImage, regionCount, pRegions);
1106 printf("xglCmdCopyImage(cmdBuffer = %p, srcImage = %p, destImage = %p, regionCount = %i, pRegions = %p)\n", (void*)cmdBuffer, (void*)srcImage, (void*)destImage, regionCount, (void*)pRegions);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001107 char *pTmpStr;
1108 if (pRegions) {
1109 pTmpStr = xgl_print_xgl_image_copy(pRegions, " ");
1110 printf(" pRegions (%p)\n%s\n", (void*)pRegions, pTmpStr);
1111 free(pTmpStr);
1112 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001113}
1114
1115XGL_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)
1116{
1117 nextTable.CmdCopyMemoryToImage(cmdBuffer, srcMem, destImage, regionCount, pRegions);
1118 printf("xglCmdCopyMemoryToImage(cmdBuffer = %p, srcMem = %p, destImage = %p, regionCount = %i, pRegions = %p)\n", (void*)cmdBuffer, (void*)srcMem, (void*)destImage, regionCount, (void*)pRegions);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001119 char *pTmpStr;
1120 if (pRegions) {
1121 pTmpStr = xgl_print_xgl_memory_image_copy(pRegions, " ");
1122 printf(" pRegions (%p)\n%s\n", (void*)pRegions, pTmpStr);
1123 free(pTmpStr);
1124 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001125}
1126
1127XGL_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)
1128{
1129 nextTable.CmdCopyImageToMemory(cmdBuffer, srcImage, destMem, regionCount, pRegions);
1130 printf("xglCmdCopyImageToMemory(cmdBuffer = %p, srcImage = %p, destMem = %p, regionCount = %i, pRegions = %p)\n", (void*)cmdBuffer, (void*)srcImage, (void*)destMem, regionCount, (void*)pRegions);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001131 char *pTmpStr;
1132 if (pRegions) {
1133 pTmpStr = xgl_print_xgl_memory_image_copy(pRegions, " ");
1134 printf(" pRegions (%p)\n%s\n", (void*)pRegions, pTmpStr);
1135 free(pTmpStr);
1136 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001137}
1138
1139XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdCloneImageData(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE_STATE srcImageState, XGL_IMAGE destImage, XGL_IMAGE_STATE destImageState)
1140{
1141 nextTable.CmdCloneImageData(cmdBuffer, srcImage, srcImageState, destImage, destImageState);
1142 printf("xglCmdCloneImageData(cmdBuffer = %p, srcImage = %p, srcImageState = %p, destImage = %p, destImageState = %p)\n", (void*)cmdBuffer, (void*)srcImage, (void*)srcImageState, (void*)destImage, (void*)destImageState);
1143}
1144
1145XGL_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)
1146{
1147 nextTable.CmdUpdateMemory(cmdBuffer, destMem, destOffset, dataSize, pData);
1148 printf("xglCmdUpdateMemory(cmdBuffer = %p, destMem = %p, destOffset = %i, dataSize = %i, pData = %i)\n", (void*)cmdBuffer, (void*)destMem, destOffset, dataSize, *pData);
1149}
1150
1151XGL_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)
1152{
1153 nextTable.CmdFillMemory(cmdBuffer, destMem, destOffset, fillSize, data);
1154 printf("xglCmdFillMemory(cmdBuffer = %p, destMem = %p, destOffset = %i, fillSize = %i, data = %i)\n", (void*)cmdBuffer, (void*)destMem, destOffset, fillSize, data);
1155}
1156
1157XGL_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)
1158{
1159 nextTable.CmdClearColorImage(cmdBuffer, image, color, rangeCount, pRanges);
1160 printf("xglCmdClearColorImage(cmdBuffer = %p, image = %p, color = [%f, %f, %f, %f], rangeCount = %i, pRanges = %p)\n", (void*)cmdBuffer, (void*)image, color[0], color[1], color[2], color[3], rangeCount, (void*)pRanges);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001161 char *pTmpStr;
1162 if (pRanges) {
1163 pTmpStr = xgl_print_xgl_image_subresource_range(pRanges, " ");
1164 printf(" pRanges (%p)\n%s\n", (void*)pRanges, pTmpStr);
1165 free(pTmpStr);
1166 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001167}
1168
1169XGL_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)
1170{
1171 nextTable.CmdClearColorImageRaw(cmdBuffer, image, color, rangeCount, pRanges);
1172 printf("xglCmdClearColorImageRaw(cmdBuffer = %p, image = %p, color = [%i, %i, %i, %i], rangeCount = %i, pRanges = %p)\n", (void*)cmdBuffer, (void*)image, color[0], color[1], color[2], color[3], rangeCount, (void*)pRanges);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001173 char *pTmpStr;
1174 if (pRanges) {
1175 pTmpStr = xgl_print_xgl_image_subresource_range(pRanges, " ");
1176 printf(" pRanges (%p)\n%s\n", (void*)pRanges, pTmpStr);
1177 free(pTmpStr);
1178 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001179}
1180
1181XGL_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)
1182{
1183 nextTable.CmdClearDepthStencil(cmdBuffer, image, depth, stencil, rangeCount, pRanges);
1184 printf("xglCmdClearDepthStencil(cmdBuffer = %p, image = %p, depth = %f, stencil = %i, rangeCount = %i, pRanges = %p)\n", (void*)cmdBuffer, (void*)image, depth, stencil, rangeCount, (void*)pRanges);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001185 char *pTmpStr;
1186 if (pRanges) {
1187 pTmpStr = xgl_print_xgl_image_subresource_range(pRanges, " ");
1188 printf(" pRanges (%p)\n%s\n", (void*)pRanges, pTmpStr);
1189 free(pTmpStr);
1190 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001191}
1192
1193XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdResolveImage(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE destImage, XGL_UINT rectCount, const XGL_IMAGE_RESOLVE* pRects)
1194{
1195 nextTable.CmdResolveImage(cmdBuffer, srcImage, destImage, rectCount, pRects);
1196 printf("xglCmdResolveImage(cmdBuffer = %p, srcImage = %p, destImage = %p, rectCount = %i, pRects = %p)\n", (void*)cmdBuffer, (void*)srcImage, (void*)destImage, rectCount, (void*)pRects);
Tobin Ehlis73ff5672014-10-23 08:19:47 -06001197 char *pTmpStr;
1198 if (pRects) {
1199 pTmpStr = xgl_print_xgl_image_resolve(pRects, " ");
1200 printf(" pRects (%p)\n%s\n", (void*)pRects, pTmpStr);
1201 free(pTmpStr);
1202 }
Tobin Ehlis817736c2014-10-21 10:47:45 -06001203}
1204
1205XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdSetEvent(XGL_CMD_BUFFER cmdBuffer, XGL_EVENT event)
1206{
1207 nextTable.CmdSetEvent(cmdBuffer, event);
1208 printf("xglCmdSetEvent(cmdBuffer = %p, event = %p)\n", (void*)cmdBuffer, (void*)event);
1209}
1210
1211XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdResetEvent(XGL_CMD_BUFFER cmdBuffer, XGL_EVENT event)
1212{
1213 nextTable.CmdResetEvent(cmdBuffer, event);
1214 printf("xglCmdResetEvent(cmdBuffer = %p, event = %p)\n", (void*)cmdBuffer, (void*)event);
1215}
1216
1217XGL_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)
1218{
1219 nextTable.CmdMemoryAtomic(cmdBuffer, destMem, destOffset, srcData, atomicOp);
1220 printf("xglCmdMemoryAtomic(cmdBuffer = %p, destMem = %p, destOffset = %i, srcData = %lu, atomicOp = %p)\n", (void*)cmdBuffer, (void*)destMem, destOffset, srcData, (void*)atomicOp);
1221}
1222
1223XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBeginQuery(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT slot, XGL_FLAGS flags)
1224{
1225 nextTable.CmdBeginQuery(cmdBuffer, queryPool, slot, flags);
1226 printf("xglCmdBeginQuery(cmdBuffer = %p, queryPool = %p, slot = %i, flags = %i)\n", (void*)cmdBuffer, (void*)queryPool, slot, flags);
1227}
1228
1229XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdEndQuery(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT slot)
1230{
1231 nextTable.CmdEndQuery(cmdBuffer, queryPool, slot);
1232 printf("xglCmdEndQuery(cmdBuffer = %p, queryPool = %p, slot = %i)\n", (void*)cmdBuffer, (void*)queryPool, slot);
1233}
1234
1235XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdResetQueryPool(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT startQuery, XGL_UINT queryCount)
1236{
1237 nextTable.CmdResetQueryPool(cmdBuffer, queryPool, startQuery, queryCount);
1238 printf("xglCmdResetQueryPool(cmdBuffer = %p, queryPool = %p, startQuery = %i, queryCount = %i)\n", (void*)cmdBuffer, (void*)queryPool, startQuery, queryCount);
1239}
1240
1241XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdWriteTimestamp(XGL_CMD_BUFFER cmdBuffer, XGL_TIMESTAMP_TYPE timestampType, XGL_GPU_MEMORY destMem, XGL_GPU_SIZE destOffset)
1242{
1243 nextTable.CmdWriteTimestamp(cmdBuffer, timestampType, destMem, destOffset);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001244 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 -06001245}
1246
1247XGL_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)
1248{
1249 nextTable.CmdInitAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, pData);
1250 printf("xglCmdInitAtomicCounters(cmdBuffer = %p, pipelineBindPoint = %i, startCounter = %i, counterCount = %i, pData = %i)\n", (void*)cmdBuffer, pipelineBindPoint, startCounter, counterCount, *pData);
1251}
1252
1253XGL_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)
1254{
1255 nextTable.CmdLoadAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, srcMem, srcOffset);
1256 printf("xglCmdLoadAtomicCounters(cmdBuffer = %p, pipelineBindPoint = %i, startCounter = %i, counterCount = %i, srcMem = %p, srcOffset = %i)\n", (void*)cmdBuffer, pipelineBindPoint, startCounter, counterCount, (void*)srcMem, srcOffset);
1257}
1258
1259XGL_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)
1260{
1261 nextTable.CmdSaveAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, destMem, destOffset);
1262 printf("xglCmdSaveAtomicCounters(cmdBuffer = %p, pipelineBindPoint = %i, startCounter = %i, counterCount = %i, destMem = %p, destOffset = %i)\n", (void*)cmdBuffer, pipelineBindPoint, startCounter, counterCount, (void*)destMem, destOffset);
1263}
1264
1265XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetValidationLevel(XGL_DEVICE device, XGL_VALIDATION_LEVEL validationLevel)
1266{
1267 XGL_RESULT result = nextTable.DbgSetValidationLevel(device, validationLevel);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001268 printf("xglDbgSetValidationLevel(device = %p, validationLevel = %p) = %s\n", (void*)device, (void*)validationLevel, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001269 return result;
1270}
1271
1272XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgRegisterMsgCallback(XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback, XGL_VOID* pUserData)
1273{
1274 XGL_RESULT result = nextTable.DbgRegisterMsgCallback(pfnMsgCallback, pUserData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001275 printf("xglDbgRegisterMsgCallback(pfnMsgCallback = %p, pUserData = %p) = %s\n", (void*)pfnMsgCallback, (void*)pUserData, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001276 return result;
1277}
1278
1279XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgUnregisterMsgCallback(XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback)
1280{
1281 XGL_RESULT result = nextTable.DbgUnregisterMsgCallback(pfnMsgCallback);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001282 printf("xglDbgUnregisterMsgCallback(pfnMsgCallback = %p) = %s\n", (void*)pfnMsgCallback, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001283 return result;
1284}
1285
1286XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetMessageFilter(XGL_DEVICE device, XGL_INT msgCode, XGL_DBG_MSG_FILTER filter)
1287{
1288 XGL_RESULT result = nextTable.DbgSetMessageFilter(device, msgCode, filter);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001289 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 -06001290 return result;
1291}
1292
1293XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetObjectTag(XGL_BASE_OBJECT object, XGL_SIZE tagSize, const XGL_VOID* pTag)
1294{
1295 XGL_RESULT result = nextTable.DbgSetObjectTag(object, tagSize, pTag);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001296 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 -06001297 return result;
1298}
1299
1300XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetGlobalOption(XGL_DBG_GLOBAL_OPTION dbgOption, XGL_SIZE dataSize, const XGL_VOID* pData)
1301{
1302 XGL_RESULT result = nextTable.DbgSetGlobalOption(dbgOption, dataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001303 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 -06001304 return result;
1305}
1306
1307XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDbgSetDeviceOption(XGL_DEVICE device, XGL_DBG_DEVICE_OPTION dbgOption, XGL_SIZE dataSize, const XGL_VOID* pData)
1308{
1309 XGL_RESULT result = nextTable.DbgSetDeviceOption(device, dbgOption, dataSize, pData);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001310 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 -06001311 return result;
1312}
1313
1314XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDbgMarkerBegin(XGL_CMD_BUFFER cmdBuffer, const XGL_CHAR* pMarker)
1315{
1316 nextTable.CmdDbgMarkerBegin(cmdBuffer, pMarker);
1317 printf("xglCmdDbgMarkerBegin(cmdBuffer = %p, pMarker = %p)\n", (void*)cmdBuffer, (void*)pMarker);
1318}
1319
1320XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdDbgMarkerEnd(XGL_CMD_BUFFER cmdBuffer)
1321{
1322 nextTable.CmdDbgMarkerEnd(cmdBuffer);
1323 printf("xglCmdDbgMarkerEnd(cmdBuffer = %p)\n", (void*)cmdBuffer);
1324}
1325
1326XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11AssociateConnection(XGL_PHYSICAL_GPU gpu, const XGL_WSI_X11_CONNECTION_INFO* pConnectionInfo)
1327{
1328 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
Tobin Ehlis817736c2014-10-21 10:47:45 -06001329 pCurObj = gpuw;
1330 pthread_once(&tabOnce, initLayerTable);
1331 XGL_RESULT result = nextTable.WsiX11AssociateConnection((XGL_PHYSICAL_GPU)gpuw->nextObject, pConnectionInfo);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001332 printf("xglWsiX11AssociateConnection(gpu = %p, pConnectionInfo = %p) = %s\n", (void*)gpu, (void*)pConnectionInfo, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001333 return result;
1334}
1335
Chia-I Wu6204f342014-11-07 13:33:45 +08001336XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11GetMSC(XGL_DEVICE device, xcb_window_t window, xcb_randr_crtc_t crtc, XGL_UINT64* pMsc)
Tobin Ehlis817736c2014-10-21 10:47:45 -06001337{
Chia-I Wu6204f342014-11-07 13:33:45 +08001338 XGL_RESULT result = nextTable.WsiX11GetMSC(device, window, crtc, pMsc);
Tobin Ehlis4a5d7e22014-11-11 08:00:58 -07001339 printf("xglWsiX11GetMSC(device = %p, window = %i, crtc = %u, pMsc = %lu) = %s\n", (void*)device, window, crtc, *pMsc, string_XGL_RESULT(result));
Tobin Ehlis817736c2014-10-21 10:47:45 -06001340 return result;
1341}
1342
1343XGL_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)
1344{
1345 XGL_RESULT result = nextTable.WsiX11CreatePresentableImage(device, pCreateInfo, pImage, pMem);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001346 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 -06001347 return result;
1348}
1349
1350XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11QueuePresent(XGL_QUEUE queue, const XGL_WSI_X11_PRESENT_INFO* pPresentInfo, XGL_FENCE fence)
1351{
1352 XGL_RESULT result = nextTable.WsiX11QueuePresent(queue, pPresentInfo, fence);
Tobin Ehlis92dbf802014-10-22 09:06:33 -06001353 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 -06001354 return result;
1355}
1356
1357XGL_LAYER_EXPORT XGL_VOID* XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* funcName)
1358{
1359 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
1360 if (gpu == NULL)
1361 return NULL;
1362 pCurObj = gpuw;
1363 pthread_once(&tabOnce, initLayerTable);
1364
1365 if (!strncmp("xglGetProcAddr", (const char *) funcName, sizeof("xglGetProcAddr")))
1366 return xglGetProcAddr;
1367 else if (!strncmp("xglInitAndEnumerateGpus", (const char *) funcName, sizeof("xglInitAndEnumerateGpus")))
1368 return nextTable.InitAndEnumerateGpus;
1369 else if (!strncmp("xglGetGpuInfo", (const char *) funcName, sizeof("xglGetGpuInfo")))
1370 return xglGetGpuInfo;
1371 else if (!strncmp("xglCreateDevice", (const char *) funcName, sizeof("xglCreateDevice")))
1372 return xglCreateDevice;
1373 else if (!strncmp("xglDestroyDevice", (const char *) funcName, sizeof("xglDestroyDevice")))
1374 return xglDestroyDevice;
1375 else if (!strncmp("xglGetExtensionSupport", (const char *) funcName, sizeof("xglGetExtensionSupport")))
1376 return xglGetExtensionSupport;
1377 else if (!strncmp("xglEnumerateLayers", (const char *) funcName, sizeof("xglEnumerateLayers")))
1378 return xglEnumerateLayers;
1379 else if (!strncmp("xglGetDeviceQueue", (const char *) funcName, sizeof("xglGetDeviceQueue")))
1380 return xglGetDeviceQueue;
1381 else if (!strncmp("xglQueueSubmit", (const char *) funcName, sizeof("xglQueueSubmit")))
1382 return xglQueueSubmit;
1383 else if (!strncmp("xglQueueSetGlobalMemReferences", (const char *) funcName, sizeof("xglQueueSetGlobalMemReferences")))
1384 return xglQueueSetGlobalMemReferences;
1385 else if (!strncmp("xglQueueWaitIdle", (const char *) funcName, sizeof("xglQueueWaitIdle")))
1386 return xglQueueWaitIdle;
1387 else if (!strncmp("xglDeviceWaitIdle", (const char *) funcName, sizeof("xglDeviceWaitIdle")))
1388 return xglDeviceWaitIdle;
1389 else if (!strncmp("xglGetMemoryHeapCount", (const char *) funcName, sizeof("xglGetMemoryHeapCount")))
1390 return xglGetMemoryHeapCount;
1391 else if (!strncmp("xglGetMemoryHeapInfo", (const char *) funcName, sizeof("xglGetMemoryHeapInfo")))
1392 return xglGetMemoryHeapInfo;
1393 else if (!strncmp("xglAllocMemory", (const char *) funcName, sizeof("xglAllocMemory")))
1394 return xglAllocMemory;
1395 else if (!strncmp("xglFreeMemory", (const char *) funcName, sizeof("xglFreeMemory")))
1396 return xglFreeMemory;
1397 else if (!strncmp("xglSetMemoryPriority", (const char *) funcName, sizeof("xglSetMemoryPriority")))
1398 return xglSetMemoryPriority;
1399 else if (!strncmp("xglMapMemory", (const char *) funcName, sizeof("xglMapMemory")))
1400 return xglMapMemory;
1401 else if (!strncmp("xglUnmapMemory", (const char *) funcName, sizeof("xglUnmapMemory")))
1402 return xglUnmapMemory;
1403 else if (!strncmp("xglPinSystemMemory", (const char *) funcName, sizeof("xglPinSystemMemory")))
1404 return xglPinSystemMemory;
1405 else if (!strncmp("xglRemapVirtualMemoryPages", (const char *) funcName, sizeof("xglRemapVirtualMemoryPages")))
1406 return xglRemapVirtualMemoryPages;
1407 else if (!strncmp("xglGetMultiGpuCompatibility", (const char *) funcName, sizeof("xglGetMultiGpuCompatibility")))
1408 return xglGetMultiGpuCompatibility;
1409 else if (!strncmp("xglOpenSharedMemory", (const char *) funcName, sizeof("xglOpenSharedMemory")))
1410 return xglOpenSharedMemory;
1411 else if (!strncmp("xglOpenSharedQueueSemaphore", (const char *) funcName, sizeof("xglOpenSharedQueueSemaphore")))
1412 return xglOpenSharedQueueSemaphore;
1413 else if (!strncmp("xglOpenPeerMemory", (const char *) funcName, sizeof("xglOpenPeerMemory")))
1414 return xglOpenPeerMemory;
1415 else if (!strncmp("xglOpenPeerImage", (const char *) funcName, sizeof("xglOpenPeerImage")))
1416 return xglOpenPeerImage;
1417 else if (!strncmp("xglDestroyObject", (const char *) funcName, sizeof("xglDestroyObject")))
1418 return xglDestroyObject;
1419 else if (!strncmp("xglGetObjectInfo", (const char *) funcName, sizeof("xglGetObjectInfo")))
1420 return xglGetObjectInfo;
1421 else if (!strncmp("xglBindObjectMemory", (const char *) funcName, sizeof("xglBindObjectMemory")))
1422 return xglBindObjectMemory;
1423 else if (!strncmp("xglCreateFence", (const char *) funcName, sizeof("xglCreateFence")))
1424 return xglCreateFence;
1425 else if (!strncmp("xglGetFenceStatus", (const char *) funcName, sizeof("xglGetFenceStatus")))
1426 return xglGetFenceStatus;
1427 else if (!strncmp("xglWaitForFences", (const char *) funcName, sizeof("xglWaitForFences")))
1428 return xglWaitForFences;
1429 else if (!strncmp("xglCreateQueueSemaphore", (const char *) funcName, sizeof("xglCreateQueueSemaphore")))
1430 return xglCreateQueueSemaphore;
1431 else if (!strncmp("xglSignalQueueSemaphore", (const char *) funcName, sizeof("xglSignalQueueSemaphore")))
1432 return xglSignalQueueSemaphore;
1433 else if (!strncmp("xglWaitQueueSemaphore", (const char *) funcName, sizeof("xglWaitQueueSemaphore")))
1434 return xglWaitQueueSemaphore;
1435 else if (!strncmp("xglCreateEvent", (const char *) funcName, sizeof("xglCreateEvent")))
1436 return xglCreateEvent;
1437 else if (!strncmp("xglGetEventStatus", (const char *) funcName, sizeof("xglGetEventStatus")))
1438 return xglGetEventStatus;
1439 else if (!strncmp("xglSetEvent", (const char *) funcName, sizeof("xglSetEvent")))
1440 return xglSetEvent;
1441 else if (!strncmp("xglResetEvent", (const char *) funcName, sizeof("xglResetEvent")))
1442 return xglResetEvent;
1443 else if (!strncmp("xglCreateQueryPool", (const char *) funcName, sizeof("xglCreateQueryPool")))
1444 return xglCreateQueryPool;
1445 else if (!strncmp("xglGetQueryPoolResults", (const char *) funcName, sizeof("xglGetQueryPoolResults")))
1446 return xglGetQueryPoolResults;
1447 else if (!strncmp("xglGetFormatInfo", (const char *) funcName, sizeof("xglGetFormatInfo")))
1448 return xglGetFormatInfo;
1449 else if (!strncmp("xglCreateImage", (const char *) funcName, sizeof("xglCreateImage")))
1450 return xglCreateImage;
1451 else if (!strncmp("xglGetImageSubresourceInfo", (const char *) funcName, sizeof("xglGetImageSubresourceInfo")))
1452 return xglGetImageSubresourceInfo;
1453 else if (!strncmp("xglCreateImageView", (const char *) funcName, sizeof("xglCreateImageView")))
1454 return xglCreateImageView;
1455 else if (!strncmp("xglCreateColorAttachmentView", (const char *) funcName, sizeof("xglCreateColorAttachmentView")))
1456 return xglCreateColorAttachmentView;
1457 else if (!strncmp("xglCreateDepthStencilView", (const char *) funcName, sizeof("xglCreateDepthStencilView")))
1458 return xglCreateDepthStencilView;
1459 else if (!strncmp("xglCreateShader", (const char *) funcName, sizeof("xglCreateShader")))
1460 return xglCreateShader;
1461 else if (!strncmp("xglCreateGraphicsPipeline", (const char *) funcName, sizeof("xglCreateGraphicsPipeline")))
1462 return xglCreateGraphicsPipeline;
1463 else if (!strncmp("xglCreateComputePipeline", (const char *) funcName, sizeof("xglCreateComputePipeline")))
1464 return xglCreateComputePipeline;
1465 else if (!strncmp("xglStorePipeline", (const char *) funcName, sizeof("xglStorePipeline")))
1466 return xglStorePipeline;
1467 else if (!strncmp("xglLoadPipeline", (const char *) funcName, sizeof("xglLoadPipeline")))
1468 return xglLoadPipeline;
1469 else if (!strncmp("xglCreatePipelineDelta", (const char *) funcName, sizeof("xglCreatePipelineDelta")))
1470 return xglCreatePipelineDelta;
1471 else if (!strncmp("xglCreateSampler", (const char *) funcName, sizeof("xglCreateSampler")))
1472 return xglCreateSampler;
1473 else if (!strncmp("xglCreateDescriptorSet", (const char *) funcName, sizeof("xglCreateDescriptorSet")))
1474 return xglCreateDescriptorSet;
1475 else if (!strncmp("xglBeginDescriptorSetUpdate", (const char *) funcName, sizeof("xglBeginDescriptorSetUpdate")))
1476 return xglBeginDescriptorSetUpdate;
1477 else if (!strncmp("xglEndDescriptorSetUpdate", (const char *) funcName, sizeof("xglEndDescriptorSetUpdate")))
1478 return xglEndDescriptorSetUpdate;
1479 else if (!strncmp("xglAttachSamplerDescriptors", (const char *) funcName, sizeof("xglAttachSamplerDescriptors")))
1480 return xglAttachSamplerDescriptors;
1481 else if (!strncmp("xglAttachImageViewDescriptors", (const char *) funcName, sizeof("xglAttachImageViewDescriptors")))
1482 return xglAttachImageViewDescriptors;
1483 else if (!strncmp("xglAttachMemoryViewDescriptors", (const char *) funcName, sizeof("xglAttachMemoryViewDescriptors")))
1484 return xglAttachMemoryViewDescriptors;
1485 else if (!strncmp("xglAttachNestedDescriptors", (const char *) funcName, sizeof("xglAttachNestedDescriptors")))
1486 return xglAttachNestedDescriptors;
1487 else if (!strncmp("xglClearDescriptorSetSlots", (const char *) funcName, sizeof("xglClearDescriptorSetSlots")))
1488 return xglClearDescriptorSetSlots;
1489 else if (!strncmp("xglCreateViewportState", (const char *) funcName, sizeof("xglCreateViewportState")))
1490 return xglCreateViewportState;
1491 else if (!strncmp("xglCreateRasterState", (const char *) funcName, sizeof("xglCreateRasterState")))
1492 return xglCreateRasterState;
1493 else if (!strncmp("xglCreateMsaaState", (const char *) funcName, sizeof("xglCreateMsaaState")))
1494 return xglCreateMsaaState;
1495 else if (!strncmp("xglCreateColorBlendState", (const char *) funcName, sizeof("xglCreateColorBlendState")))
1496 return xglCreateColorBlendState;
1497 else if (!strncmp("xglCreateDepthStencilState", (const char *) funcName, sizeof("xglCreateDepthStencilState")))
1498 return xglCreateDepthStencilState;
1499 else if (!strncmp("xglCreateCommandBuffer", (const char *) funcName, sizeof("xglCreateCommandBuffer")))
1500 return xglCreateCommandBuffer;
1501 else if (!strncmp("xglBeginCommandBuffer", (const char *) funcName, sizeof("xglBeginCommandBuffer")))
1502 return xglBeginCommandBuffer;
1503 else if (!strncmp("xglEndCommandBuffer", (const char *) funcName, sizeof("xglEndCommandBuffer")))
1504 return xglEndCommandBuffer;
1505 else if (!strncmp("xglResetCommandBuffer", (const char *) funcName, sizeof("xglResetCommandBuffer")))
1506 return xglResetCommandBuffer;
1507 else if (!strncmp("xglCmdBindPipeline", (const char *) funcName, sizeof("xglCmdBindPipeline")))
1508 return xglCmdBindPipeline;
1509 else if (!strncmp("xglCmdBindPipelineDelta", (const char *) funcName, sizeof("xglCmdBindPipelineDelta")))
1510 return xglCmdBindPipelineDelta;
1511 else if (!strncmp("xglCmdBindStateObject", (const char *) funcName, sizeof("xglCmdBindStateObject")))
1512 return xglCmdBindStateObject;
1513 else if (!strncmp("xglCmdBindDescriptorSet", (const char *) funcName, sizeof("xglCmdBindDescriptorSet")))
1514 return xglCmdBindDescriptorSet;
1515 else if (!strncmp("xglCmdBindDynamicMemoryView", (const char *) funcName, sizeof("xglCmdBindDynamicMemoryView")))
1516 return xglCmdBindDynamicMemoryView;
Chia-I Wu3b04af52014-11-08 10:48:20 +08001517 else if (!strncmp("xglCmdBindVertexData", (const char *) funcName, sizeof("xglCmdBindVertexData")))
1518 return xglCmdBindVertexData;
Tobin Ehlis817736c2014-10-21 10:47:45 -06001519 else if (!strncmp("xglCmdBindIndexData", (const char *) funcName, sizeof("xglCmdBindIndexData")))
1520 return xglCmdBindIndexData;
1521 else if (!strncmp("xglCmdBindAttachments", (const char *) funcName, sizeof("xglCmdBindAttachments")))
1522 return xglCmdBindAttachments;
1523 else if (!strncmp("xglCmdPrepareMemoryRegions", (const char *) funcName, sizeof("xglCmdPrepareMemoryRegions")))
1524 return xglCmdPrepareMemoryRegions;
1525 else if (!strncmp("xglCmdPrepareImages", (const char *) funcName, sizeof("xglCmdPrepareImages")))
1526 return xglCmdPrepareImages;
1527 else if (!strncmp("xglCmdDraw", (const char *) funcName, sizeof("xglCmdDraw")))
1528 return xglCmdDraw;
1529 else if (!strncmp("xglCmdDrawIndexed", (const char *) funcName, sizeof("xglCmdDrawIndexed")))
1530 return xglCmdDrawIndexed;
1531 else if (!strncmp("xglCmdDrawIndirect", (const char *) funcName, sizeof("xglCmdDrawIndirect")))
1532 return xglCmdDrawIndirect;
1533 else if (!strncmp("xglCmdDrawIndexedIndirect", (const char *) funcName, sizeof("xglCmdDrawIndexedIndirect")))
1534 return xglCmdDrawIndexedIndirect;
1535 else if (!strncmp("xglCmdDispatch", (const char *) funcName, sizeof("xglCmdDispatch")))
1536 return xglCmdDispatch;
1537 else if (!strncmp("xglCmdDispatchIndirect", (const char *) funcName, sizeof("xglCmdDispatchIndirect")))
1538 return xglCmdDispatchIndirect;
1539 else if (!strncmp("xglCmdCopyMemory", (const char *) funcName, sizeof("xglCmdCopyMemory")))
1540 return xglCmdCopyMemory;
1541 else if (!strncmp("xglCmdCopyImage", (const char *) funcName, sizeof("xglCmdCopyImage")))
1542 return xglCmdCopyImage;
1543 else if (!strncmp("xglCmdCopyMemoryToImage", (const char *) funcName, sizeof("xglCmdCopyMemoryToImage")))
1544 return xglCmdCopyMemoryToImage;
1545 else if (!strncmp("xglCmdCopyImageToMemory", (const char *) funcName, sizeof("xglCmdCopyImageToMemory")))
1546 return xglCmdCopyImageToMemory;
1547 else if (!strncmp("xglCmdCloneImageData", (const char *) funcName, sizeof("xglCmdCloneImageData")))
1548 return xglCmdCloneImageData;
1549 else if (!strncmp("xglCmdUpdateMemory", (const char *) funcName, sizeof("xglCmdUpdateMemory")))
1550 return xglCmdUpdateMemory;
1551 else if (!strncmp("xglCmdFillMemory", (const char *) funcName, sizeof("xglCmdFillMemory")))
1552 return xglCmdFillMemory;
1553 else if (!strncmp("xglCmdClearColorImage", (const char *) funcName, sizeof("xglCmdClearColorImage")))
1554 return xglCmdClearColorImage;
1555 else if (!strncmp("xglCmdClearColorImageRaw", (const char *) funcName, sizeof("xglCmdClearColorImageRaw")))
1556 return xglCmdClearColorImageRaw;
1557 else if (!strncmp("xglCmdClearDepthStencil", (const char *) funcName, sizeof("xglCmdClearDepthStencil")))
1558 return xglCmdClearDepthStencil;
1559 else if (!strncmp("xglCmdResolveImage", (const char *) funcName, sizeof("xglCmdResolveImage")))
1560 return xglCmdResolveImage;
1561 else if (!strncmp("xglCmdSetEvent", (const char *) funcName, sizeof("xglCmdSetEvent")))
1562 return xglCmdSetEvent;
1563 else if (!strncmp("xglCmdResetEvent", (const char *) funcName, sizeof("xglCmdResetEvent")))
1564 return xglCmdResetEvent;
1565 else if (!strncmp("xglCmdMemoryAtomic", (const char *) funcName, sizeof("xglCmdMemoryAtomic")))
1566 return xglCmdMemoryAtomic;
1567 else if (!strncmp("xglCmdBeginQuery", (const char *) funcName, sizeof("xglCmdBeginQuery")))
1568 return xglCmdBeginQuery;
1569 else if (!strncmp("xglCmdEndQuery", (const char *) funcName, sizeof("xglCmdEndQuery")))
1570 return xglCmdEndQuery;
1571 else if (!strncmp("xglCmdResetQueryPool", (const char *) funcName, sizeof("xglCmdResetQueryPool")))
1572 return xglCmdResetQueryPool;
1573 else if (!strncmp("xglCmdWriteTimestamp", (const char *) funcName, sizeof("xglCmdWriteTimestamp")))
1574 return xglCmdWriteTimestamp;
1575 else if (!strncmp("xglCmdInitAtomicCounters", (const char *) funcName, sizeof("xglCmdInitAtomicCounters")))
1576 return xglCmdInitAtomicCounters;
1577 else if (!strncmp("xglCmdLoadAtomicCounters", (const char *) funcName, sizeof("xglCmdLoadAtomicCounters")))
1578 return xglCmdLoadAtomicCounters;
1579 else if (!strncmp("xglCmdSaveAtomicCounters", (const char *) funcName, sizeof("xglCmdSaveAtomicCounters")))
1580 return xglCmdSaveAtomicCounters;
1581 else if (!strncmp("xglDbgSetValidationLevel", (const char *) funcName, sizeof("xglDbgSetValidationLevel")))
1582 return xglDbgSetValidationLevel;
1583 else if (!strncmp("xglDbgRegisterMsgCallback", (const char *) funcName, sizeof("xglDbgRegisterMsgCallback")))
1584 return xglDbgRegisterMsgCallback;
1585 else if (!strncmp("xglDbgUnregisterMsgCallback", (const char *) funcName, sizeof("xglDbgUnregisterMsgCallback")))
1586 return xglDbgUnregisterMsgCallback;
1587 else if (!strncmp("xglDbgSetMessageFilter", (const char *) funcName, sizeof("xglDbgSetMessageFilter")))
1588 return xglDbgSetMessageFilter;
1589 else if (!strncmp("xglDbgSetObjectTag", (const char *) funcName, sizeof("xglDbgSetObjectTag")))
1590 return xglDbgSetObjectTag;
1591 else if (!strncmp("xglDbgSetGlobalOption", (const char *) funcName, sizeof("xglDbgSetGlobalOption")))
1592 return xglDbgSetGlobalOption;
1593 else if (!strncmp("xglDbgSetDeviceOption", (const char *) funcName, sizeof("xglDbgSetDeviceOption")))
1594 return xglDbgSetDeviceOption;
1595 else if (!strncmp("xglCmdDbgMarkerBegin", (const char *) funcName, sizeof("xglCmdDbgMarkerBegin")))
1596 return xglCmdDbgMarkerBegin;
1597 else if (!strncmp("xglCmdDbgMarkerEnd", (const char *) funcName, sizeof("xglCmdDbgMarkerEnd")))
1598 return xglCmdDbgMarkerEnd;
1599 else if (!strncmp("xglWsiX11AssociateConnection", (const char *) funcName, sizeof("xglWsiX11AssociateConnection")))
1600 return xglWsiX11AssociateConnection;
1601 else if (!strncmp("xglWsiX11GetMSC", (const char *) funcName, sizeof("xglWsiX11GetMSC")))
1602 return xglWsiX11GetMSC;
1603 else if (!strncmp("xglWsiX11CreatePresentableImage", (const char *) funcName, sizeof("xglWsiX11CreatePresentableImage")))
1604 return xglWsiX11CreatePresentableImage;
1605 else if (!strncmp("xglWsiX11QueuePresent", (const char *) funcName, sizeof("xglWsiX11QueuePresent")))
1606 return xglWsiX11QueuePresent;
1607 else {
1608 XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
1609 if (gpuw->pGPA == NULL)
1610 return NULL;
1611 return gpuw->pGPA(gpuw->nextObject, funcName);
1612 }
1613}
1614