Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 26 | #include <string.h> |
| 27 | #include <stdlib.h> |
| 28 | #include <assert.h> |
| 29 | #include <unordered_map> |
| 30 | #include "xglLayer.h" |
| 31 | |
| 32 | static void initLayerTable(const XGL_BASE_LAYER_OBJECT *gpuw, XGL_LAYER_DISPATCH_TABLE *pTable, const unsigned int layerNum); |
| 33 | |
| 34 | /******************************** Layer multi1 functions **************************/ |
| 35 | static std::unordered_map<XGL_VOID *, XGL_LAYER_DISPATCH_TABLE *> tableMap1; |
| 36 | static bool layer1_first_activated = false; |
| 37 | |
| 38 | static XGL_LAYER_DISPATCH_TABLE * getLayer1Table(const XGL_BASE_LAYER_OBJECT *gpuw) |
| 39 | { |
| 40 | XGL_LAYER_DISPATCH_TABLE *pTable; |
| 41 | |
| 42 | assert(gpuw); |
| 43 | std::unordered_map<XGL_VOID *, XGL_LAYER_DISPATCH_TABLE *>::const_iterator it = tableMap1.find((XGL_VOID *) gpuw); |
| 44 | if (it == tableMap1.end()) |
| 45 | { |
| 46 | pTable = new XGL_LAYER_DISPATCH_TABLE; |
| 47 | tableMap1[(XGL_VOID *) gpuw] = pTable; |
| 48 | initLayerTable(gpuw, pTable, 1); |
| 49 | return pTable; |
| 50 | } else |
| 51 | { |
| 52 | return it->second; |
| 53 | } |
| 54 | } |
| 55 | #ifdef __cplusplus |
| 56 | extern "C" { |
| 57 | #endif |
| 58 | |
| 59 | |
| 60 | XGL_LAYER_EXPORT XGL_RESULT XGLAPI multi1CreateDevice(XGL_PHYSICAL_GPU gpu, const XGL_DEVICE_CREATE_INFO* pCreateInfo, |
| 61 | XGL_DEVICE* pDevice) |
| 62 | { |
| 63 | XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu; |
| 64 | XGL_LAYER_DISPATCH_TABLE* pTable = getLayer1Table(gpuw); |
| 65 | |
| 66 | printf("At start of multi1 layer xglCreateDevice()\n"); |
| 67 | XGL_RESULT result = pTable->CreateDevice((XGL_PHYSICAL_GPU)gpuw->nextObject, pCreateInfo, pDevice); |
| 68 | // create a mapping for the device object into the dispatch table |
| 69 | tableMap1.emplace(*pDevice, pTable); |
| 70 | printf("Completed multi1 layer xglCreateDevice()\n"); |
| 71 | return result; |
| 72 | } |
| 73 | |
| 74 | XGL_LAYER_EXPORT XGL_RESULT XGLAPI multi1CreateGraphicsPipeline(XGL_DEVICE device, const XGL_GRAPHICS_PIPELINE_CREATE_INFO* pCreateInfo, |
| 75 | XGL_PIPELINE* pPipeline) |
| 76 | { |
| 77 | XGL_LAYER_DISPATCH_TABLE* pTable = tableMap1[device]; |
| 78 | |
| 79 | printf("At start of multi1 layer xglCreateGraphicsPipeline()\n"); |
| 80 | XGL_RESULT result = pTable->CreateGraphicsPipeline(device, pCreateInfo, pPipeline); |
| 81 | // create a mapping for the pipeline object into the dispatch table |
| 82 | tableMap1.emplace(*pPipeline, pTable); |
| 83 | printf("Completed multi1 layer xglCreateGraphicsPipeline()\n"); |
| 84 | return result; |
| 85 | } |
| 86 | |
| 87 | XGL_LAYER_EXPORT XGL_RESULT XGLAPI multi1StorePipeline(XGL_PIPELINE pipeline, XGL_SIZE* pDataSize, XGL_VOID* pData) |
| 88 | { |
| 89 | XGL_LAYER_DISPATCH_TABLE* pTable = tableMap1[pipeline]; |
| 90 | |
| 91 | printf("At start of multi1 layer xglStorePipeline()\n"); |
| 92 | XGL_RESULT result = pTable->StorePipeline(pipeline, pDataSize, pData); |
| 93 | printf("Completed multi1 layer xglStorePipeline()\n"); |
| 94 | return result; |
| 95 | } |
| 96 | |
| 97 | XGL_LAYER_EXPORT XGL_RESULT XGLAPI multi1EnumerateLayers(XGL_PHYSICAL_GPU gpu, XGL_SIZE maxLayerCount, XGL_SIZE maxStringSize, |
| 98 | XGL_CHAR* const* pOutLayers, XGL_SIZE * pOutLayerCount, |
| 99 | XGL_VOID* pReserved) |
| 100 | { |
| 101 | if (gpu == NULL) |
| 102 | return xglEnumerateLayers(gpu, maxLayerCount, maxStringSize, pOutLayers, pOutLayerCount, pReserved); |
| 103 | |
| 104 | XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu; |
| 105 | XGL_LAYER_DISPATCH_TABLE* pTable = getLayer1Table(gpuw); |
| 106 | |
| 107 | printf("At start of multi1 layer xglEnumerateLayers()\n"); |
| 108 | XGL_RESULT result = pTable->EnumerateLayers((XGL_PHYSICAL_GPU)gpuw->nextObject, maxLayerCount, maxStringSize, pOutLayers, pOutLayerCount, pReserved); |
| 109 | printf("Completed multi1 layer xglEnumerateLayers()\n"); |
| 110 | return result; |
| 111 | } |
| 112 | |
| 113 | XGL_LAYER_EXPORT XGL_VOID * XGLAPI multi1GetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* pName) |
| 114 | { |
| 115 | XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu; |
| 116 | if (gpu == NULL) |
| 117 | return NULL; |
| 118 | XGL_LAYER_DISPATCH_TABLE* pTable; |
| 119 | pTable = getLayer1Table(gpuw); |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 120 | if (!strncmp("xglInitAndEnumerateGpus", pName, sizeof("xglInitAndEnumerateGpus"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 121 | return (XGL_VOID *) pTable->InitAndEnumerateGpus; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 122 | else if (!strncmp("xglGetGpuInfo", pName, sizeof ("xglGetGpuInfo"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 123 | return (XGL_VOID *) pTable->GetGpuInfo; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 124 | else if (!strncmp("xglCreateDevice", pName, sizeof ("xglCreateDevice"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 125 | return (XGL_VOID *) multi1CreateDevice; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 126 | else if (!strncmp("xglDestroyDevice", pName, sizeof ("xglDestroyDevice"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 127 | return (XGL_VOID *) pTable->DestroyDevice; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 128 | else if (!strncmp("xglGetExtensionSupport", pName, sizeof ("xglGetExtensionSupport"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 129 | return (XGL_VOID *) pTable->GetExtensionSupport; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 130 | else if (!strncmp("xglEnumerateLayers", pName, sizeof ("xglEnumerateLayers"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 131 | return (XGL_VOID *) multi1EnumerateLayers; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 132 | else if (!strncmp("xglGetDeviceQueue", pName, sizeof ("xglGetDeviceQueue"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 133 | return (XGL_VOID *) pTable->GetDeviceQueue; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 134 | else if (!strncmp("xglQueueSubmit", pName, sizeof ("xglQueueSubmit"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 135 | return (XGL_VOID *) pTable->QueueSubmit; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 136 | else if (!strncmp("xglQueueSetGlobalMemReferences", pName, sizeof ("xglQueueSetGlobalMemReferences"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 137 | return (XGL_VOID *) pTable->QueueSetGlobalMemReferences; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 138 | else if (!strncmp("xglQueueWaitIdle", pName, sizeof ("xglQueueWaitIdle"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 139 | return (XGL_VOID *) pTable->QueueWaitIdle; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 140 | else if (!strncmp("xglDeviceWaitIdle", pName, sizeof ("xglDeviceWaitIdle"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 141 | return (XGL_VOID *) pTable->DeviceWaitIdle; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 142 | else if (!strncmp("xglGetMemoryHeapCount", pName, sizeof ("xglGetMemoryHeapCount"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 143 | return (XGL_VOID *) pTable->GetMemoryHeapCount; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 144 | else if (!strncmp("xglGetMemoryHeapInfo", pName, sizeof ("xglGetMemoryHeapInfo"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 145 | return (XGL_VOID *) pTable->GetMemoryHeapInfo; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 146 | else if (!strncmp("xglAllocMemory", pName, sizeof ("xglAllocMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 147 | return (XGL_VOID *) pTable->AllocMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 148 | else if (!strncmp("xglFreeMemory", pName, sizeof ("xglFreeMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 149 | return (XGL_VOID *) pTable->FreeMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 150 | else if (!strncmp("xglSetMemoryPriority", pName, sizeof ("xglSetMemoryPriority"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 151 | return (XGL_VOID *) pTable->SetMemoryPriority; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 152 | else if (!strncmp("xglMapMemory", pName, sizeof ("xglMapMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 153 | return (XGL_VOID *) pTable->MapMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 154 | else if (!strncmp("xglUnmapMemory", pName, sizeof ("xglUnmapMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 155 | return (XGL_VOID *) pTable->UnmapMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 156 | else if (!strncmp("xglPinSystemMemory", pName, sizeof ("xglPinSystemMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 157 | return (XGL_VOID *) pTable->PinSystemMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 158 | else if (!strncmp("xglRemapVirtualMemoryPages", pName, sizeof ("xglRemapVirtualMemoryPages"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 159 | return (XGL_VOID *) pTable->RemapVirtualMemoryPages; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 160 | else if (!strncmp("xglGetMultiGpuCompatibility", pName, sizeof ("xglGetMultiGpuCompatibility"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 161 | return (XGL_VOID *) pTable->GetMultiGpuCompatibility; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 162 | else if (!strncmp("xglOpenSharedMemory", pName, sizeof ("xglOpenSharedMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 163 | return (XGL_VOID *) pTable->OpenSharedMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 164 | else if (!strncmp("xglOpenSharedQueueSemaphore", pName, sizeof ("xglOpenSharedQueueSemaphore"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 165 | return (XGL_VOID *) pTable->OpenSharedQueueSemaphore; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 166 | else if (!strncmp("xglOpenPeerMemory", pName, sizeof ("xglOpenPeerMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 167 | return (XGL_VOID *) pTable->OpenPeerMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 168 | else if (!strncmp("xglOpenPeerImage", pName, sizeof ("xglOpenPeerImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 169 | return (XGL_VOID *) pTable->OpenPeerImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 170 | else if (!strncmp("xglDestroyObject", pName, sizeof ("xglDestroyObject"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 171 | return (XGL_VOID *) pTable->DestroyObject; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 172 | else if (!strncmp("xglGetObjectInfo", pName, sizeof ("xglGetObjectInfo"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 173 | return (XGL_VOID *) pTable->GetObjectInfo; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 174 | else if (!strncmp("xglBindObjectMemory", pName, sizeof ("xglBindObjectMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 175 | return (XGL_VOID *) pTable->BindObjectMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 176 | else if (!strncmp("xglCreateFence", pName, sizeof ("xgllCreateFence"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 177 | return (XGL_VOID *) pTable->CreateFence; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 178 | else if (!strncmp("xglGetFenceStatus", pName, sizeof ("xglGetFenceStatus"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 179 | return (XGL_VOID *) pTable->GetFenceStatus; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 180 | else if (!strncmp("xglWaitForFences", pName, sizeof ("xglWaitForFences"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 181 | return (XGL_VOID *) pTable->WaitForFences; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 182 | else if (!strncmp("xglCreateQueueSemaphore", pName, sizeof ("xgllCreateQueueSemaphore"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 183 | return (XGL_VOID *) pTable->CreateQueueSemaphore; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 184 | else if (!strncmp("xglSignalQueueSemaphore", pName, sizeof ("xglSignalQueueSemaphore"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 185 | return (XGL_VOID *) pTable->SignalQueueSemaphore; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 186 | else if (!strncmp("xglWaitQueueSemaphore", pName, sizeof ("xglWaitQueueSemaphore"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 187 | return (XGL_VOID *) pTable->WaitQueueSemaphore; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 188 | else if (!strncmp("xglCreateEvent", pName, sizeof ("xgllCreateEvent"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 189 | return (XGL_VOID *) pTable->CreateEvent; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 190 | else if (!strncmp("xglGetEventStatus", pName, sizeof ("xglGetEventStatus"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 191 | return (XGL_VOID *) pTable->GetEventStatus; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 192 | else if (!strncmp("xglSetEvent", pName, sizeof ("xglSetEvent"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 193 | return (XGL_VOID *) pTable->SetEvent; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 194 | else if (!strncmp("xglResetEvent", pName, sizeof ("xgllResetEvent"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 195 | return (XGL_VOID *) pTable->ResetEvent; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 196 | else if (!strncmp("xglCreateQueryPool", pName, sizeof ("xglCreateQueryPool"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 197 | return (XGL_VOID *) pTable->CreateQueryPool; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 198 | else if (!strncmp("xglGetQueryPoolResults", pName, sizeof ("xglGetQueryPoolResults"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 199 | return (XGL_VOID *) pTable->GetQueryPoolResults; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 200 | else if (!strncmp("xglGetFormatInfo", pName, sizeof ("xglGetFormatInfo"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 201 | return (XGL_VOID *) pTable->GetFormatInfo; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 202 | else if (!strncmp("xglCreateImage", pName, sizeof ("xglCreateImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 203 | return (XGL_VOID *) pTable->CreateImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 204 | else if (!strncmp("xglGetImageSubresourceInfo", pName, sizeof ("xglGetImageSubresourceInfo"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 205 | return (XGL_VOID *) pTable->GetImageSubresourceInfo; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 206 | else if (!strncmp("xglCreateImageView", pName, sizeof ("xglCreateImageView"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 207 | return (XGL_VOID *) pTable->CreateImageView; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 208 | else if (!strncmp("xglCreateColorAttachmentView", pName, sizeof ("xglCreateColorAttachmentView"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 209 | return (XGL_VOID *) pTable->CreateColorAttachmentView; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 210 | else if (!strncmp("xglCreateDepthStencilView", pName, sizeof ("xglCreateDepthStencilView"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 211 | return (XGL_VOID *) pTable->CreateDepthStencilView; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 212 | else if (!strncmp("xglCreateShader", pName, sizeof ("xglCreateShader"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 213 | return (XGL_VOID *) pTable->CreateShader; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 214 | else if (!strncmp("xglCreateGraphicsPipeline", pName, sizeof ("xglCreateGraphicsPipeline"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 215 | return (XGL_VOID *) multi1CreateGraphicsPipeline; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 216 | else if (!strncmp("xglCreateComputePipeline", pName, sizeof ("xglCreateComputePipeline"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 217 | return (XGL_VOID *) pTable->CreateComputePipeline; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 218 | else if (!strncmp("xglStorePipeline", pName, sizeof ("xglStorePipeline"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 219 | return (XGL_VOID *) multi1StorePipeline; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 220 | else if (!strncmp("xglLoadPipeline", pName, sizeof ("xglLoadPipeline"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 221 | return (XGL_VOID *) pTable->LoadPipeline; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 222 | else if (!strncmp("xglCreatePipelineDelta", pName, sizeof ("xglCreatePipelineDelta"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 223 | return (XGL_VOID *) pTable->CreatePipelineDelta; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 224 | else if (!strncmp("xglCreateSampler", pName, sizeof ("xglCreateSampler"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 225 | return (XGL_VOID *) pTable->CreateSampler; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 226 | else if (!strncmp("xglCreateDescriptorSet", pName, sizeof ("xglCreateDescriptorSet"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 227 | return (XGL_VOID *) pTable->CreateDescriptorSet; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 228 | else if (!strncmp("xglBeginDescriptorSetUpdate", pName, sizeof ("xglBeginDescriptorSetUpdate"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 229 | return (XGL_VOID *) pTable->BeginDescriptorSetUpdate; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 230 | else if (!strncmp("xglEndDescriptorSetUpdate", pName, sizeof ("xglEndDescriptorSetUpdate"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 231 | return (XGL_VOID *) pTable->EndDescriptorSetUpdate; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 232 | else if (!strncmp("xglAttachSamplerDescriptors", pName, sizeof ("xglAttachSamplerDescriptors"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 233 | return (XGL_VOID *) pTable->AttachSamplerDescriptors; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 234 | else if (!strncmp("xglAttachImageViewDescriptors", pName, sizeof ("xglAttachImageViewDescriptors"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 235 | return (XGL_VOID *) pTable->AttachImageViewDescriptors; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 236 | else if (!strncmp("xglAttachMemoryViewDescriptors", pName, sizeof ("xglAttachMemoryViewDescriptors"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 237 | return (XGL_VOID *) pTable->AttachMemoryViewDescriptors; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 238 | else if (!strncmp("xglAttachNestedDescriptors", pName, sizeof ("xglAttachNestedDescriptors"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 239 | return (XGL_VOID *) pTable->AttachNestedDescriptors; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 240 | else if (!strncmp("xglClearDescriptorSetSlots", pName, sizeof ("xglClearDescriptorSetSlots"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 241 | return (XGL_VOID *) pTable->ClearDescriptorSetSlots; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 242 | else if (!strncmp("xglCreateViewportState", pName, sizeof ("xglCreateViewportState"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 243 | return (XGL_VOID *) pTable->CreateViewportState; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 244 | else if (!strncmp("xglCreateRasterState", pName, sizeof ("xglCreateRasterState"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 245 | return (XGL_VOID *) pTable->CreateRasterState; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 246 | else if (!strncmp("xglCreateMsaaState", pName, sizeof ("xglCreateMsaaState"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 247 | return (XGL_VOID *) pTable->CreateMsaaState; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 248 | else if (!strncmp("xglCreateColorBlendState", pName, sizeof ("xglCreateColorBlendState"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 249 | return (XGL_VOID *) pTable->CreateColorBlendState; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 250 | else if (!strncmp("xglCreateDepthStencilState", pName, sizeof ("xglCreateDepthStencilState"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 251 | return (XGL_VOID *) pTable->CreateDepthStencilState; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 252 | else if (!strncmp("xglCreateCommandBuffer", pName, sizeof ("xglCreateCommandBuffer"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 253 | return (XGL_VOID *) pTable->CreateCommandBuffer; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 254 | else if (!strncmp("xglBeginCommandBuffer", pName, sizeof ("xglBeginCommandBuffer"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 255 | return (XGL_VOID *) pTable->BeginCommandBuffer; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 256 | else if (!strncmp("xglEndCommandBuffer", pName, sizeof ("xglEndCommandBuffer"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 257 | return (XGL_VOID *) pTable->EndCommandBuffer; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 258 | else if (!strncmp("xglResetCommandBuffer", pName, sizeof ("xglResetCommandBuffer"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 259 | return (XGL_VOID *) pTable->ResetCommandBuffer; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 260 | else if (!strncmp("xglCmdBindPipeline", pName, sizeof ("xglCmdBindPipeline"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 261 | return (XGL_VOID *) pTable->CmdBindPipeline; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 262 | else if (!strncmp("xglCmdBindPipelineDelta", pName, sizeof ("xglCmdBindPipelineDelta"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 263 | return (XGL_VOID *) pTable->CmdBindPipelineDelta; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 264 | else if (!strncmp("xglCmdBindStateObject", pName, sizeof ("xglCmdBindStateObject"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 265 | return (XGL_VOID *) pTable->CmdBindStateObject; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 266 | else if (!strncmp("xglCmdBindDescriptorSet", pName, sizeof ("xglCmdBindDescriptorSet"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 267 | return (XGL_VOID *) pTable->CmdBindDescriptorSet; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 268 | else if (!strncmp("xglCmdBindDynamicMemoryView", pName, sizeof ("xglCmdBindDynamicMemoryView"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 269 | return (XGL_VOID *) pTable->CmdBindDynamicMemoryView; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 270 | else if (!strncmp("xglCmdBindVertexData", pName, sizeof ("xglCmdBindVertexData"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 271 | return (XGL_VOID *) pTable->CmdBindVertexData; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 272 | else if (!strncmp("xglCmdBindIndexData", pName, sizeof ("xglCmdBindIndexData"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 273 | return (XGL_VOID *) pTable->CmdBindIndexData; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 274 | else if (!strncmp("xglCmdBindAttachments", pName, sizeof ("xglCmdBindAttachments"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 275 | return (XGL_VOID *) pTable->CmdBindAttachments; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 276 | else if (!strncmp("xglCmdPrepareMemoryRegions", pName, sizeof ("xglCmdPrepareMemoryRegions"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 277 | return (XGL_VOID *) pTable->CmdPrepareMemoryRegions; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 278 | else if (!strncmp("xglCmdPrepareImages", pName, sizeof ("xglCmdPrepareImages"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 279 | return (XGL_VOID *) pTable->CmdPrepareImages; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 280 | else if (!strncmp("xglCmdDraw", pName, sizeof ("xglCmdDraw"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 281 | return (XGL_VOID *) pTable->CmdDraw; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 282 | else if (!strncmp("xglCmdDrawIndexed", pName, sizeof ("xglCmdDrawIndexed"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 283 | return (XGL_VOID *) pTable->CmdDrawIndexed; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 284 | else if (!strncmp("xglCmdDrawIndirect", pName, sizeof ("xglCmdDrawIndirect"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 285 | return (XGL_VOID *) pTable->CmdDrawIndirect; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 286 | else if (!strncmp("xglCmdDrawIndexedIndirect", pName, sizeof ("xglCmdDrawIndexedIndirect"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 287 | return (XGL_VOID *) pTable->CmdDrawIndexedIndirect; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 288 | else if (!strncmp("xglCmdDispatch", pName, sizeof ("xglCmdDispatch"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 289 | return (XGL_VOID *) pTable->CmdDispatch; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 290 | else if (!strncmp("xglCmdDispatchIndirect", pName, sizeof ("xglCmdDispatchIndirect"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 291 | return (XGL_VOID *) pTable->CmdDispatchIndirect; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 292 | else if (!strncmp("xglCmdCopyMemory", pName, sizeof ("xglCmdCopyMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 293 | return (XGL_VOID *) pTable->CmdCopyMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 294 | else if (!strncmp("xglCmdCopyImage", pName, sizeof ("xglCmdCopyImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 295 | return (XGL_VOID *) pTable->CmdCopyImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 296 | else if (!strncmp("xglCmdCopyMemoryToImage", pName, sizeof ("xglCmdCopyMemoryToImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 297 | return (XGL_VOID *) pTable->CmdCopyMemoryToImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 298 | else if (!strncmp("xglCmdCopyImageToMemory", pName, sizeof ("xglCmdCopyImageToMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 299 | return (XGL_VOID *) pTable->CmdCopyImageToMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 300 | else if (!strncmp("xglCmdCloneImageData", pName, sizeof ("xglCmdCloneImageData"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 301 | return (XGL_VOID *) pTable->CmdCloneImageData; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 302 | else if (!strncmp("xglCmdUpdateMemory", pName, sizeof ("xglCmdUpdateMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 303 | return (XGL_VOID *) pTable->CmdUpdateMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 304 | else if (!strncmp("xglCmdFillMemory", pName, sizeof ("xglCmdFillMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 305 | return (XGL_VOID *) pTable->CmdFillMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 306 | else if (!strncmp("xglCmdClearColorImage", pName, sizeof ("xglCmdClearColorImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 307 | return (XGL_VOID *) pTable->CmdClearColorImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 308 | else if (!strncmp("xglCmdClearColorImageRaw", pName, sizeof ("xglCmdClearColorImageRaw"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 309 | return (XGL_VOID *) pTable->CmdClearColorImageRaw; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 310 | else if (!strncmp("xglCmdClearDepthStencil", pName, sizeof ("xglCmdClearDepthStencil"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 311 | return (XGL_VOID *) pTable->CmdClearDepthStencil; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 312 | else if (!strncmp("xglCmdResolveImage", pName, sizeof ("xglCmdResolveImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 313 | return (XGL_VOID *) pTable->CmdResolveImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 314 | else if (!strncmp("xglCmdSetEvent", pName, sizeof ("xglCmdSetEvent"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 315 | return (XGL_VOID *) pTable->CmdSetEvent; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 316 | else if (!strncmp("xglCmdResetEvent", pName, sizeof ("xglCmdResetEvent"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 317 | return (XGL_VOID *) pTable->CmdResetEvent; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 318 | else if (!strncmp("xglCmdMemoryAtomic", pName, sizeof ("xglCmdMemoryAtomic"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 319 | return (XGL_VOID *) pTable->CmdMemoryAtomic; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 320 | else if (!strncmp("xglCmdBeginQuery", pName, sizeof ("xglCmdBeginQuery"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 321 | return (XGL_VOID *) pTable->CmdBeginQuery; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 322 | else if (!strncmp("xglCmdEndQuery", pName, sizeof ("xglCmdEndQuery"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 323 | return (XGL_VOID *) pTable->CmdEndQuery; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 324 | else if (!strncmp("xglCmdResetQueryPool", pName, sizeof ("xglCmdResetQueryPool"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 325 | return (XGL_VOID *) pTable->CmdResetQueryPool; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 326 | else if (!strncmp("xglCmdWriteTimestamp", pName, sizeof ("xglCmdWriteTimestamp"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 327 | return (XGL_VOID *) pTable->CmdWriteTimestamp; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 328 | else if (!strncmp("xglCmdInitAtomicCounters", pName, sizeof ("xglCmdInitAtomicCounters"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 329 | return (XGL_VOID *) pTable->CmdInitAtomicCounters; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 330 | else if (!strncmp("xglCmdLoadAtomicCounters", pName, sizeof ("xglCmdLoadAtomicCounters"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 331 | return (XGL_VOID *) pTable->CmdLoadAtomicCounters; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 332 | else if (!strncmp("xglCmdSaveAtomicCounters", pName, sizeof ("xglCmdSaveAtomicCounters"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 333 | return (XGL_VOID *) pTable->CmdSaveAtomicCounters; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 334 | else if (!strncmp("xglDbgSetValidationLevel", pName, sizeof ("xglDbgSetValidationLevel"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 335 | return (XGL_VOID *) pTable->DbgSetValidationLevel; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 336 | else if (!strncmp("xglDbgRegisterMsgCallback", pName, sizeof ("xglDbgRegisterMsgCallback"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 337 | return (XGL_VOID *) pTable->DbgRegisterMsgCallback; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 338 | else if (!strncmp("xglDbgUnregisterMsgCallback", pName, sizeof ("xglDbgUnregisterMsgCallback"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 339 | return (XGL_VOID *) pTable->DbgUnregisterMsgCallback; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 340 | else if (!strncmp("xglDbgSetMessageFilter", pName, sizeof ("xglDbgSetMessageFilter"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 341 | return (XGL_VOID *) pTable->DbgSetMessageFilter; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 342 | else if (!strncmp("xglDbgSetObjectTag", pName, sizeof ("xglDbgSetObjectTag"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 343 | return (XGL_VOID *) pTable->DbgSetObjectTag; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 344 | else if (!strncmp("xglDbgSetGlobalOption", pName, sizeof ("xglDbgSetGlobalOption"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 345 | return (XGL_VOID *) pTable->DbgSetGlobalOption; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 346 | else if (!strncmp("xglDbgSetDeviceOption", pName, sizeof ("xglDbgSetDeviceOption"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 347 | return (XGL_VOID *) pTable->DbgSetDeviceOption; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 348 | else if (!strncmp("xglCmdDbgMarkerBegin", pName, sizeof ("xglCmdDbgMarkerBegin"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 349 | return (XGL_VOID *) pTable->CmdDbgMarkerBegin; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 350 | else if (!strncmp("xglCmdDbgMarkerEnd", pName, sizeof ("xglCmdDbgMarkerEnd"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 351 | return (XGL_VOID *) pTable->CmdDbgMarkerEnd; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 352 | else if (!strncmp("xglWsiX11AssociateConnection", pName, sizeof("xglWsiX11AssociateConnection"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 353 | return (XGL_VOID *) pTable->WsiX11AssociateConnection; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 354 | else if (!strncmp("xglWsiX11GetMSC", pName, sizeof("xglWsiX11GetMSC"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 355 | return (XGL_VOID *) pTable->WsiX11GetMSC; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 356 | else if (!strncmp("xglWsiX11CreatePresentableImage", pName, sizeof("xglWsiX11CreatePresentableImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 357 | return (XGL_VOID *) pTable->WsiX11CreatePresentableImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 358 | else if (!strncmp("xglWsiX11QueuePresent", pName, sizeof("xglWsiX11QueuePresent"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 359 | return (XGL_VOID *) pTable->WsiX11QueuePresent; |
| 360 | else { |
| 361 | XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu; |
| 362 | if (gpuw->pGPA == NULL) |
| 363 | return NULL; |
| 364 | return gpuw->pGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, pName); |
| 365 | } |
| 366 | |
| 367 | } |
| 368 | |
| 369 | /******************************** Layer multi2 functions **************************/ |
| 370 | static std::unordered_map<XGL_VOID *, XGL_LAYER_DISPATCH_TABLE *> tableMap2; |
| 371 | static bool layer2_first_activated = false; |
| 372 | |
| 373 | static XGL_LAYER_DISPATCH_TABLE * getLayer2Table(const XGL_BASE_LAYER_OBJECT *gpuw) |
| 374 | { |
| 375 | XGL_LAYER_DISPATCH_TABLE *pTable; |
| 376 | |
| 377 | assert(gpuw); |
| 378 | std::unordered_map<XGL_VOID *, XGL_LAYER_DISPATCH_TABLE *>::const_iterator it = tableMap2.find((XGL_VOID *) gpuw); |
| 379 | if (it == tableMap2.end()) |
| 380 | { |
| 381 | pTable = new XGL_LAYER_DISPATCH_TABLE; |
| 382 | tableMap2[(XGL_VOID *) gpuw] = pTable; |
| 383 | initLayerTable(gpuw, pTable, 2); |
| 384 | return pTable; |
| 385 | } else |
| 386 | { |
| 387 | return it->second; |
| 388 | } |
| 389 | } |
| 390 | |
| 391 | XGL_LAYER_EXPORT XGL_RESULT XGLAPI multi2CreateDevice(XGL_PHYSICAL_GPU gpu, const XGL_DEVICE_CREATE_INFO* pCreateInfo, |
| 392 | XGL_DEVICE* pDevice) |
| 393 | { |
| 394 | XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu; |
| 395 | XGL_LAYER_DISPATCH_TABLE* pTable = getLayer2Table(gpuw); |
| 396 | |
| 397 | printf("At start of multi2 xglCreateDevice()\n"); |
| 398 | XGL_RESULT result = pTable->CreateDevice((XGL_PHYSICAL_GPU)gpuw->nextObject, pCreateInfo, pDevice); |
| 399 | // create a mapping for the device object into the dispatch table for layer2 |
| 400 | tableMap2.emplace(*pDevice, pTable); |
| 401 | printf("Completed multi2 layer xglCreateDevice()\n"); |
| 402 | return result; |
| 403 | } |
| 404 | |
| 405 | XGL_LAYER_EXPORT XGL_RESULT XGLAPI multi2CreateCommandBuffer(XGL_DEVICE device, const XGL_CMD_BUFFER_CREATE_INFO* pCreateInfo, |
| 406 | XGL_CMD_BUFFER* pCmdBuffer) |
| 407 | { |
| 408 | XGL_LAYER_DISPATCH_TABLE* pTable = tableMap2[device]; |
| 409 | |
| 410 | printf("At start of multi2 layer xglCreateCommandBuffer()\n"); |
| 411 | XGL_RESULT result = pTable->CreateCommandBuffer(device, pCreateInfo, pCmdBuffer); |
| 412 | // create a mapping for CmdBuffer object into the dispatch table for layer 2 |
| 413 | tableMap2.emplace(*pCmdBuffer, pTable); |
| 414 | printf("Completed multi2 layer xglCreateCommandBuffer()\n"); |
| 415 | return result; |
| 416 | } |
| 417 | |
| 418 | XGL_LAYER_EXPORT XGL_RESULT XGLAPI multi2BeginCommandBuffer( XGL_CMD_BUFFER cmdBuffer, XGL_FLAGS flags) |
| 419 | { |
| 420 | XGL_LAYER_DISPATCH_TABLE* pTable = tableMap2[cmdBuffer]; |
| 421 | |
| 422 | printf("At start of multi2 layer xglBeginCommandBuffer()\n"); |
| 423 | XGL_RESULT result = pTable->BeginCommandBuffer(cmdBuffer, flags); |
| 424 | printf("Completed multi2 layer xglBeginCommandBuffer()\n"); |
| 425 | return result; |
| 426 | |
| 427 | } |
| 428 | |
| 429 | XGL_LAYER_EXPORT XGL_RESULT XGLAPI multi2EnumerateLayers(XGL_PHYSICAL_GPU gpu, XGL_SIZE maxLayerCount, XGL_SIZE maxStringSize, |
| 430 | XGL_CHAR* const* pOutLayers, XGL_SIZE * pOutLayerCount, |
| 431 | XGL_VOID* pReserved) |
| 432 | { |
| 433 | if (gpu == NULL) |
| 434 | return xglEnumerateLayers(gpu, maxLayerCount, maxStringSize, pOutLayers, pOutLayerCount, pReserved); |
| 435 | |
| 436 | XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu; |
| 437 | XGL_LAYER_DISPATCH_TABLE* pTable = getLayer2Table(gpuw); |
| 438 | |
| 439 | printf("At start of multi2 layer xglEnumerateLayers()\n"); |
| 440 | XGL_RESULT result = pTable->EnumerateLayers((XGL_PHYSICAL_GPU)gpuw->nextObject, maxLayerCount, maxStringSize, pOutLayers, pOutLayerCount, pReserved); |
| 441 | printf("Completed multi2 layer xglEnumerateLayers()\n"); |
| 442 | return result; |
| 443 | } |
| 444 | |
| 445 | XGL_LAYER_EXPORT XGL_VOID * XGLAPI multi2GetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* pName) |
| 446 | { |
| 447 | XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu; |
| 448 | if (gpu == NULL) |
| 449 | return NULL; |
| 450 | XGL_LAYER_DISPATCH_TABLE* pTable; |
| 451 | pTable = getLayer2Table(gpuw); |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 452 | if (!strncmp("xglInitAndEnumerateGpus", pName, sizeof("xglInitAndEnumerateGpus"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 453 | return (XGL_VOID *) pTable->InitAndEnumerateGpus; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 454 | else if (!strncmp("xglGetGpuInfo", pName, sizeof ("xglGetGpuInfo"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 455 | return (XGL_VOID *) pTable->GetGpuInfo; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 456 | else if (!strncmp("xglCreateDevice", pName, sizeof ("xglCreateDevice"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 457 | return (XGL_VOID *) multi2CreateDevice; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 458 | else if (!strncmp("xglDestroyDevice", pName, sizeof ("xglDestroyDevice"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 459 | return (XGL_VOID *) pTable->DestroyDevice; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 460 | else if (!strncmp("xglGetExtensionSupport", pName, sizeof ("xglGetExtensionSupport"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 461 | return (XGL_VOID *) pTable->GetExtensionSupport; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 462 | else if (!strncmp("xglEnumerateLayers", pName, sizeof ("xglEnumerateLayers"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 463 | return (XGL_VOID *) multi2EnumerateLayers; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 464 | else if (!strncmp("xglGetDeviceQueue", pName, sizeof ("xglGetDeviceQueue"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 465 | return (XGL_VOID *) pTable->GetDeviceQueue; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 466 | else if (!strncmp("xglQueueSubmit", pName, sizeof ("xglQueueSubmit"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 467 | return (XGL_VOID *) pTable->QueueSubmit; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 468 | else if (!strncmp("xglQueueSetGlobalMemReferences", pName, sizeof ("xglQueueSetGlobalMemReferences"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 469 | return (XGL_VOID *) pTable->QueueSetGlobalMemReferences; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 470 | else if (!strncmp("xglQueueWaitIdle", pName, sizeof ("xglQueueWaitIdle"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 471 | return (XGL_VOID *) pTable->QueueWaitIdle; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 472 | else if (!strncmp("xglDeviceWaitIdle", pName, sizeof ("xglDeviceWaitIdle"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 473 | return (XGL_VOID *) pTable->DeviceWaitIdle; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 474 | else if (!strncmp("xglGetMemoryHeapCount", pName, sizeof ("xglGetMemoryHeapCount"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 475 | return (XGL_VOID *) pTable->GetMemoryHeapCount; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 476 | else if (!strncmp("xglGetMemoryHeapInfo", pName, sizeof ("xglGetMemoryHeapInfo"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 477 | return (XGL_VOID *) pTable->GetMemoryHeapInfo; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 478 | else if (!strncmp("xglAllocMemory", pName, sizeof ("xglAllocMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 479 | return (XGL_VOID *) pTable->AllocMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 480 | else if (!strncmp("xglFreeMemory", pName, sizeof ("xglFreeMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 481 | return (XGL_VOID *) pTable->FreeMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 482 | else if (!strncmp("xglSetMemoryPriority", pName, sizeof ("xglSetMemoryPriority"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 483 | return (XGL_VOID *) pTable->SetMemoryPriority; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 484 | else if (!strncmp("xglMapMemory", pName, sizeof ("xglMapMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 485 | return (XGL_VOID *) pTable->MapMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 486 | else if (!strncmp("xglUnmapMemory", pName, sizeof ("xglUnmapMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 487 | return (XGL_VOID *) pTable->UnmapMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 488 | else if (!strncmp("xglPinSystemMemory", pName, sizeof ("xglPinSystemMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 489 | return (XGL_VOID *) pTable->PinSystemMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 490 | else if (!strncmp("xglRemapVirtualMemoryPages", pName, sizeof ("xglRemapVirtualMemoryPages"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 491 | return (XGL_VOID *) pTable->RemapVirtualMemoryPages; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 492 | else if (!strncmp("xglGetMultiGpuCompatibility", pName, sizeof ("xglGetMultiGpuCompatibility"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 493 | return (XGL_VOID *) pTable->GetMultiGpuCompatibility; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 494 | else if (!strncmp("xglOpenSharedMemory", pName, sizeof ("xglOpenSharedMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 495 | return (XGL_VOID *) pTable->OpenSharedMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 496 | else if (!strncmp("xglOpenSharedQueueSemaphore", pName, sizeof ("xglOpenSharedQueueSemaphore"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 497 | return (XGL_VOID *) pTable->OpenSharedQueueSemaphore; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 498 | else if (!strncmp("xglOpenPeerMemory", pName, sizeof ("xglOpenPeerMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 499 | return (XGL_VOID *) pTable->OpenPeerMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 500 | else if (!strncmp("xglOpenPeerImage", pName, sizeof ("xglOpenPeerImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 501 | return (XGL_VOID *) pTable->OpenPeerImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 502 | else if (!strncmp("xglDestroyObject", pName, sizeof ("xglDestroyObject"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 503 | return (XGL_VOID *) pTable->DestroyObject; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 504 | else if (!strncmp("xglGetObjectInfo", pName, sizeof ("xglGetObjectInfo"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 505 | return (XGL_VOID *) pTable->GetObjectInfo; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 506 | else if (!strncmp("xglBindObjectMemory", pName, sizeof ("xglBindObjectMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 507 | return (XGL_VOID *) pTable->BindObjectMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 508 | else if (!strncmp("xglCreateFence", pName, sizeof ("xgllCreateFence"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 509 | return (XGL_VOID *) pTable->CreateFence; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 510 | else if (!strncmp("xglGetFenceStatus", pName, sizeof ("xglGetFenceStatus"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 511 | return (XGL_VOID *) pTable->GetFenceStatus; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 512 | else if (!strncmp("xglWaitForFences", pName, sizeof ("xglWaitForFences"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 513 | return (XGL_VOID *) pTable->WaitForFences; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 514 | else if (!strncmp("xglCreateQueueSemaphore", pName, sizeof ("xgllCreateQueueSemaphore"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 515 | return (XGL_VOID *) pTable->CreateQueueSemaphore; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 516 | else if (!strncmp("xglSignalQueueSemaphore", pName, sizeof ("xglSignalQueueSemaphore"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 517 | return (XGL_VOID *) pTable->SignalQueueSemaphore; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 518 | else if (!strncmp("xglWaitQueueSemaphore", pName, sizeof ("xglWaitQueueSemaphore"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 519 | return (XGL_VOID *) pTable->WaitQueueSemaphore; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 520 | else if (!strncmp("xglCreateEvent", pName, sizeof ("xgllCreateEvent"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 521 | return (XGL_VOID *) pTable->CreateEvent; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 522 | else if (!strncmp("xglGetEventStatus", pName, sizeof ("xglGetEventStatus"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 523 | return (XGL_VOID *) pTable->GetEventStatus; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 524 | else if (!strncmp("xglSetEvent", pName, sizeof ("xglSetEvent"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 525 | return (XGL_VOID *) pTable->SetEvent; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 526 | else if (!strncmp("xglResetEvent", pName, sizeof ("xgllResetEvent"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 527 | return (XGL_VOID *) pTable->ResetEvent; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 528 | else if (!strncmp("xglCreateQueryPool", pName, sizeof ("xglCreateQueryPool"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 529 | return (XGL_VOID *) pTable->CreateQueryPool; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 530 | else if (!strncmp("xglGetQueryPoolResults", pName, sizeof ("xglGetQueryPoolResults"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 531 | return (XGL_VOID *) pTable->GetQueryPoolResults; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 532 | else if (!strncmp("xglGetFormatInfo", pName, sizeof ("xglGetFormatInfo"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 533 | return (XGL_VOID *) pTable->GetFormatInfo; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 534 | else if (!strncmp("xglCreateImage", pName, sizeof ("xglCreateImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 535 | return (XGL_VOID *) pTable->CreateImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 536 | else if (!strncmp("xglGetImageSubresourceInfo", pName, sizeof ("xglGetImageSubresourceInfo"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 537 | return (XGL_VOID *) pTable->GetImageSubresourceInfo; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 538 | else if (!strncmp("xglCreateImageView", pName, sizeof ("xglCreateImageView"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 539 | return (XGL_VOID *) pTable->CreateImageView; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 540 | else if (!strncmp("xglCreateColorAttachmentView", pName, sizeof ("xglCreateColorAttachmentView"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 541 | return (XGL_VOID *) pTable->CreateColorAttachmentView; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 542 | else if (!strncmp("xglCreateDepthStencilView", pName, sizeof ("xglCreateDepthStencilView"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 543 | return (XGL_VOID *) pTable->CreateDepthStencilView; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 544 | else if (!strncmp("xglCreateShader", pName, sizeof ("xglCreateShader"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 545 | return (XGL_VOID *) pTable->CreateShader; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 546 | else if (!strncmp("xglCreateGraphicsPipeline", pName, sizeof ("xglCreateGraphicsPipeline"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 547 | return (XGL_VOID *) pTable->CreateGraphicsPipeline; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 548 | else if (!strncmp("xglCreateComputePipeline", pName, sizeof ("xglCreateComputePipeline"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 549 | return (XGL_VOID *) pTable->CreateComputePipeline; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 550 | else if (!strncmp("xglStorePipeline", pName, sizeof ("xglStorePipeline"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 551 | return (XGL_VOID *) pTable->StorePipeline; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 552 | else if (!strncmp("xglLoadPipeline", pName, sizeof ("xglLoadPipeline"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 553 | return (XGL_VOID *) pTable->LoadPipeline; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 554 | else if (!strncmp("xglCreatePipelineDelta", pName, sizeof ("xglCreatePipelineDelta"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 555 | return (XGL_VOID *) pTable->CreatePipelineDelta; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 556 | else if (!strncmp("xglCreateSampler", pName, sizeof ("xglCreateSampler"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 557 | return (XGL_VOID *) pTable->CreateSampler; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 558 | else if (!strncmp("xglCreateDescriptorSet", pName, sizeof ("xglCreateDescriptorSet"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 559 | return (XGL_VOID *) pTable->CreateDescriptorSet; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 560 | else if (!strncmp("xglBeginDescriptorSetUpdate", pName, sizeof ("xglBeginDescriptorSetUpdate"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 561 | return (XGL_VOID *) pTable->BeginDescriptorSetUpdate; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 562 | else if (!strncmp("xglEndDescriptorSetUpdate", pName, sizeof ("xglEndDescriptorSetUpdate"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 563 | return (XGL_VOID *) pTable->EndDescriptorSetUpdate; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 564 | else if (!strncmp("xglAttachSamplerDescriptors", pName, sizeof ("xglAttachSamplerDescriptors"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 565 | return (XGL_VOID *) pTable->AttachSamplerDescriptors; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 566 | else if (!strncmp("xglAttachImageViewDescriptors", pName, sizeof ("xglAttachImageViewDescriptors"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 567 | return (XGL_VOID *) pTable->AttachImageViewDescriptors; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 568 | else if (!strncmp("xglAttachMemoryViewDescriptors", pName, sizeof ("xglAttachMemoryViewDescriptors"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 569 | return (XGL_VOID *) pTable->AttachMemoryViewDescriptors; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 570 | else if (!strncmp("xglAttachNestedDescriptors", pName, sizeof ("xglAttachNestedDescriptors"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 571 | return (XGL_VOID *) pTable->AttachNestedDescriptors; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 572 | else if (!strncmp("xglClearDescriptorSetSlots", pName, sizeof ("xglClearDescriptorSetSlots"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 573 | return (XGL_VOID *) pTable->ClearDescriptorSetSlots; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 574 | else if (!strncmp("xglCreateViewportState", pName, sizeof ("xglCreateViewportState"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 575 | return (XGL_VOID *) pTable->CreateViewportState; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 576 | else if (!strncmp("xglCreateRasterState", pName, sizeof ("xglCreateRasterState"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 577 | return (XGL_VOID *) pTable->CreateRasterState; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 578 | else if (!strncmp("xglCreateMsaaState", pName, sizeof ("xglCreateMsaaState"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 579 | return (XGL_VOID *) pTable->CreateMsaaState; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 580 | else if (!strncmp("xglCreateColorBlendState", pName, sizeof ("xglCreateColorBlendState"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 581 | return (XGL_VOID *) pTable->CreateColorBlendState; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 582 | else if (!strncmp("xglCreateDepthStencilState", pName, sizeof ("xglCreateDepthStencilState"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 583 | return (XGL_VOID *) pTable->CreateDepthStencilState; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 584 | else if (!strncmp("xglCreateCommandBuffer", pName, sizeof ("xglCreateCommandBuffer"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 585 | return (XGL_VOID *) multi2CreateCommandBuffer; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 586 | else if (!strncmp("xglBeginCommandBuffer", pName, sizeof ("xglBeginCommandBuffer"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 587 | return (XGL_VOID *) multi2BeginCommandBuffer; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 588 | else if (!strncmp("xglEndCommandBuffer", pName, sizeof ("xglEndCommandBuffer"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 589 | return (XGL_VOID *) pTable->EndCommandBuffer; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 590 | else if (!strncmp("xglResetCommandBuffer", pName, sizeof ("xglResetCommandBuffer"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 591 | return (XGL_VOID *) pTable->ResetCommandBuffer; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 592 | else if (!strncmp("xglCmdBindPipeline", pName, sizeof ("xglCmdBindPipeline"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 593 | return (XGL_VOID *) pTable->CmdBindPipeline; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 594 | else if (!strncmp("xglCmdBindPipelineDelta", pName, sizeof ("xglCmdBindPipelineDelta"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 595 | return (XGL_VOID *) pTable->CmdBindPipelineDelta; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 596 | else if (!strncmp("xglCmdBindStateObject", pName, sizeof ("xglCmdBindStateObject"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 597 | return (XGL_VOID *) pTable->CmdBindStateObject; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 598 | else if (!strncmp("xglCmdBindDescriptorSet", pName, sizeof ("xglCmdBindDescriptorSet"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 599 | return (XGL_VOID *) pTable->CmdBindDescriptorSet; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 600 | else if (!strncmp("xglCmdBindDynamicMemoryView", pName, sizeof ("xglCmdBindDynamicMemoryView"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 601 | return (XGL_VOID *) pTable->CmdBindDynamicMemoryView; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 602 | else if (!strncmp("xglCmdBindVertexData", pName, sizeof ("xglCmdBindVertexData"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 603 | return (XGL_VOID *) pTable->CmdBindVertexData; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 604 | else if (!strncmp("xglCmdBindIndexData", pName, sizeof ("xglCmdBindIndexData"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 605 | return (XGL_VOID *) pTable->CmdBindIndexData; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 606 | else if (!strncmp("xglCmdBindAttachments", pName, sizeof ("xglCmdBindAttachments"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 607 | return (XGL_VOID *) pTable->CmdBindAttachments; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 608 | else if (!strncmp("xglCmdPrepareMemoryRegions", pName, sizeof ("xglCmdPrepareMemoryRegions"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 609 | return (XGL_VOID *) pTable->CmdPrepareMemoryRegions; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 610 | else if (!strncmp("xglCmdPrepareImages", pName, sizeof ("xglCmdPrepareImages"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 611 | return (XGL_VOID *) pTable->CmdPrepareImages; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 612 | else if (!strncmp("xglCmdDraw", pName, sizeof ("xglCmdDraw"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 613 | return (XGL_VOID *) pTable->CmdDraw; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 614 | else if (!strncmp("xglCmdDrawIndexed", pName, sizeof ("xglCmdDrawIndexed"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 615 | return (XGL_VOID *) pTable->CmdDrawIndexed; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 616 | else if (!strncmp("xglCmdDrawIndirect", pName, sizeof ("xglCmdDrawIndirect"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 617 | return (XGL_VOID *) pTable->CmdDrawIndirect; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 618 | else if (!strncmp("xglCmdDrawIndexedIndirect", pName, sizeof ("xglCmdDrawIndexedIndirect"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 619 | return (XGL_VOID *) pTable->CmdDrawIndexedIndirect; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 620 | else if (!strncmp("xglCmdDispatch", pName, sizeof ("xglCmdDispatch"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 621 | return (XGL_VOID *) pTable->CmdDispatch; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 622 | else if (!strncmp("xglCmdDispatchIndirect", pName, sizeof ("xglCmdDispatchIndirect"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 623 | return (XGL_VOID *) pTable->CmdDispatchIndirect; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 624 | else if (!strncmp("xglCmdCopyMemory", pName, sizeof ("xglCmdCopyMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 625 | return (XGL_VOID *) pTable->CmdCopyMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 626 | else if (!strncmp("xglCmdCopyImage", pName, sizeof ("xglCmdCopyImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 627 | return (XGL_VOID *) pTable->CmdCopyImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 628 | else if (!strncmp("xglCmdCopyMemoryToImage", pName, sizeof ("xglCmdCopyMemoryToImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 629 | return (XGL_VOID *) pTable->CmdCopyMemoryToImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 630 | else if (!strncmp("xglCmdCopyImageToMemory", pName, sizeof ("xglCmdCopyImageToMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 631 | return (XGL_VOID *) pTable->CmdCopyImageToMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 632 | else if (!strncmp("xglCmdCloneImageData", pName, sizeof ("xglCmdCloneImageData"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 633 | return (XGL_VOID *) pTable->CmdCloneImageData; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 634 | else if (!strncmp("xglCmdUpdateMemory", pName, sizeof ("xglCmdUpdateMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 635 | return (XGL_VOID *) pTable->CmdUpdateMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 636 | else if (!strncmp("xglCmdFillMemory", pName, sizeof ("xglCmdFillMemory"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 637 | return (XGL_VOID *) pTable->CmdFillMemory; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 638 | else if (!strncmp("xglCmdClearColorImage", pName, sizeof ("xglCmdClearColorImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 639 | return (XGL_VOID *) pTable->CmdClearColorImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 640 | else if (!strncmp("xglCmdClearColorImageRaw", pName, sizeof ("xglCmdClearColorImageRaw"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 641 | return (XGL_VOID *) pTable->CmdClearColorImageRaw; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 642 | else if (!strncmp("xglCmdClearDepthStencil", pName, sizeof ("xglCmdClearDepthStencil"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 643 | return (XGL_VOID *) pTable->CmdClearDepthStencil; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 644 | else if (!strncmp("xglCmdResolveImage", pName, sizeof ("xglCmdResolveImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 645 | return (XGL_VOID *) pTable->CmdResolveImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 646 | else if (!strncmp("xglCmdSetEvent", pName, sizeof ("xglCmdSetEvent"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 647 | return (XGL_VOID *) pTable->CmdSetEvent; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 648 | else if (!strncmp("xglCmdResetEvent", pName, sizeof ("xglCmdResetEvent"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 649 | return (XGL_VOID *) pTable->CmdResetEvent; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 650 | else if (!strncmp("xglCmdMemoryAtomic", pName, sizeof ("xglCmdMemoryAtomic"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 651 | return (XGL_VOID *) pTable->CmdMemoryAtomic; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 652 | else if (!strncmp("xglCmdBeginQuery", pName, sizeof ("xglCmdBeginQuery"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 653 | return (XGL_VOID *) pTable->CmdBeginQuery; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 654 | else if (!strncmp("xglCmdEndQuery", pName, sizeof ("xglCmdEndQuery"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 655 | return (XGL_VOID *) pTable->CmdEndQuery; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 656 | else if (!strncmp("xglCmdResetQueryPool", pName, sizeof ("xglCmdResetQueryPool"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 657 | return (XGL_VOID *) pTable->CmdResetQueryPool; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 658 | else if (!strncmp("xglCmdWriteTimestamp", pName, sizeof ("xglCmdWriteTimestamp"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 659 | return (XGL_VOID *) pTable->CmdWriteTimestamp; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 660 | else if (!strncmp("xglCmdInitAtomicCounters", pName, sizeof ("xglCmdInitAtomicCounters"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 661 | return (XGL_VOID *) pTable->CmdInitAtomicCounters; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 662 | else if (!strncmp("xglCmdLoadAtomicCounters", pName, sizeof ("xglCmdLoadAtomicCounters"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 663 | return (XGL_VOID *) pTable->CmdLoadAtomicCounters; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 664 | else if (!strncmp("xglCmdSaveAtomicCounters", pName, sizeof ("xglCmdSaveAtomicCounters"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 665 | return (XGL_VOID *) pTable->CmdSaveAtomicCounters; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 666 | else if (!strncmp("xglDbgSetValidationLevel", pName, sizeof ("xglDbgSetValidationLevel"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 667 | return (XGL_VOID *) pTable->DbgSetValidationLevel; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 668 | else if (!strncmp("xglDbgRegisterMsgCallback", pName, sizeof ("xglDbgRegisterMsgCallback"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 669 | return (XGL_VOID *) pTable->DbgRegisterMsgCallback; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 670 | else if (!strncmp("xglDbgUnregisterMsgCallback", pName, sizeof ("xglDbgUnregisterMsgCallback"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 671 | return (XGL_VOID *) pTable->DbgUnregisterMsgCallback; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 672 | else if (!strncmp("xglDbgSetMessageFilter", pName, sizeof ("xglDbgSetMessageFilter"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 673 | return (XGL_VOID *) pTable->DbgSetMessageFilter; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 674 | else if (!strncmp("xglDbgSetObjectTag", pName, sizeof ("xglDbgSetObjectTag"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 675 | return (XGL_VOID *) pTable->DbgSetObjectTag; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 676 | else if (!strncmp("xglDbgSetGlobalOption", pName, sizeof ("xglDbgSetGlobalOption"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 677 | return (XGL_VOID *) pTable->DbgSetGlobalOption; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 678 | else if (!strncmp("xglDbgSetDeviceOption", pName, sizeof ("xglDbgSetDeviceOption"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 679 | return (XGL_VOID *) pTable->DbgSetDeviceOption; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 680 | else if (!strncmp("xglCmdDbgMarkerBegin", pName, sizeof ("xglCmdDbgMarkerBegin"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 681 | return (XGL_VOID *) pTable->CmdDbgMarkerBegin; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 682 | else if (!strncmp("xglCmdDbgMarkerEnd", pName, sizeof ("xglCmdDbgMarkerEnd"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 683 | return (XGL_VOID *) pTable->CmdDbgMarkerEnd; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 684 | else if (!strncmp("xglWsiX11AssociateConnection", pName, sizeof("xglWsiX11AssociateConnection"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 685 | return (XGL_VOID *) pTable->WsiX11AssociateConnection; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 686 | else if (!strncmp("xglWsiX11GetMSC", pName, sizeof("xglWsiX11GetMSC"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 687 | return (XGL_VOID *) pTable->WsiX11GetMSC; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 688 | else if (!strncmp("xglWsiX11CreatePresentableImage", pName, sizeof("xglWsiX11CreatePresentableImage"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 689 | return (XGL_VOID *) pTable->WsiX11CreatePresentableImage; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 690 | else if (!strncmp("xglWsiX11QueuePresent", pName, sizeof("xglWsiX11QueuePresent"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 691 | return (XGL_VOID *) pTable->WsiX11QueuePresent; |
| 692 | else { |
| 693 | XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu; |
| 694 | if (gpuw->pGPA == NULL) |
| 695 | return NULL; |
| 696 | return gpuw->pGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, pName); |
| 697 | } |
| 698 | |
| 699 | } |
| 700 | |
| 701 | /********************************* Common functions ********************************/ |
| 702 | XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglEnumerateLayers(XGL_PHYSICAL_GPU gpu, XGL_SIZE maxLayerCount, XGL_SIZE maxStringSize, |
| 703 | XGL_CHAR* const* pOutLayers, XGL_SIZE * pOutLayerCount, |
| 704 | XGL_VOID* pReserved) |
| 705 | { |
| 706 | if (pOutLayerCount == NULL || pOutLayers == NULL || pOutLayers[0] == NULL || pOutLayers[1] == NULL || pReserved == NULL) |
| 707 | return XGL_ERROR_INVALID_POINTER; |
| 708 | |
| 709 | if (maxLayerCount < 2) |
| 710 | return XGL_ERROR_INITIALIZATION_FAILED; |
| 711 | *pOutLayerCount = 2; |
| 712 | strncpy((char *) pOutLayers[0], "multi1", maxStringSize); |
| 713 | strncpy((char *) pOutLayers[1], "multi2", maxStringSize); |
| 714 | return XGL_SUCCESS; |
| 715 | } |
| 716 | |
| 717 | XGL_LAYER_EXPORT XGL_VOID * XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* pName) |
| 718 | { |
| 719 | // to find each layers GPA routine Loader will search via "<layerName>GetProcAddr" |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 720 | if (!strncmp("multi1GetProcAddr", pName, sizeof("multi1GetProcAddr"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 721 | return (XGL_VOID *) multi1GetProcAddr; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 722 | else if (!strncmp("multi2GetProcAddr", pName, sizeof("multi2GetProcAddr"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 723 | return (XGL_VOID *) multi2GetProcAddr; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 724 | else if (!strncmp("xglGetProcAddr", pName, sizeof("xglGetProcAddr"))) |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 725 | return (XGL_VOID *) xglGetProcAddr; |
| 726 | |
| 727 | // use first layer activated as GPA dispatch table activation happens in order |
| 728 | else if (layer1_first_activated) |
| 729 | return multi1GetProcAddr(gpu, pName); |
| 730 | else if (layer2_first_activated) |
| 731 | return multi2GetProcAddr(gpu, pName); |
| 732 | else |
| 733 | return NULL; |
| 734 | |
| 735 | } |
| 736 | |
| 737 | #ifdef __cplusplus |
| 738 | } //extern "C" |
| 739 | #endif |
| 740 | |
| 741 | static void initLayerTable(const XGL_BASE_LAYER_OBJECT *gpuw, XGL_LAYER_DISPATCH_TABLE *pTable, const unsigned int layerNum) |
| 742 | { |
| 743 | GetProcAddrType fpGPA; |
| 744 | fpGPA = gpuw->pGPA; |
| 745 | assert(fpGPA); |
| 746 | |
| 747 | if (layerNum == 2 && layer1_first_activated == false) |
| 748 | layer2_first_activated = true; |
| 749 | if (layerNum == 1 && layer2_first_activated == false) |
| 750 | layer1_first_activated = true; |
| 751 | |
| 752 | pTable->GetProcAddr = fpGPA; |
Chia-I Wu | f1a5a74 | 2014-12-27 15:16:07 +0800 | [diff] [blame^] | 753 | pTable->InitAndEnumerateGpus = (InitAndEnumerateGpusType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglInitAndEnumerateGpus"); |
| 754 | pTable->GetGpuInfo = (GetGpuInfoType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglGetGpuInfo"); |
| 755 | pTable->CreateDevice = (CreateDeviceType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateDevice"); |
| 756 | pTable->DestroyDevice = (DestroyDeviceType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglDestroyDevice"); |
| 757 | pTable->GetExtensionSupport = (GetExtensionSupportType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglGetExtensionSupport"); |
| 758 | pTable->EnumerateLayers = (EnumerateLayersType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglEnumerateLayers"); |
| 759 | pTable->GetDeviceQueue = (GetDeviceQueueType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglGetDeviceQueue"); |
| 760 | pTable->QueueSubmit = (QueueSubmitType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglQueueSubmit"); |
| 761 | pTable->QueueSetGlobalMemReferences = (QueueSetGlobalMemReferencesType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglQueueSetGlobalMemReferences"); |
| 762 | pTable->QueueWaitIdle = (QueueWaitIdleType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglQueueWaitIdle"); |
| 763 | pTable->DeviceWaitIdle = (DeviceWaitIdleType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglDeviceWaitIdle"); |
| 764 | pTable->GetMemoryHeapCount = (GetMemoryHeapCountType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglGetMemoryHeapCount"); |
| 765 | pTable->GetMemoryHeapInfo = (GetMemoryHeapInfoType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglGetMemoryHeapInfo"); |
| 766 | pTable->AllocMemory = (AllocMemoryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglAllocMemory"); |
| 767 | pTable->FreeMemory = (FreeMemoryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglFreeMemory"); |
| 768 | pTable->SetMemoryPriority = (SetMemoryPriorityType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglSetMemoryPriority"); |
| 769 | pTable->MapMemory = (MapMemoryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglMapMemory"); |
| 770 | pTable->UnmapMemory = (UnmapMemoryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglUnmapMemory"); |
| 771 | pTable->PinSystemMemory = (PinSystemMemoryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglPinSystemMemory"); |
| 772 | pTable->RemapVirtualMemoryPages = (RemapVirtualMemoryPagesType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglRemapVirtualMemoryPages"); |
| 773 | pTable->GetMultiGpuCompatibility = (GetMultiGpuCompatibilityType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglGetMultiGpuCompatibility"); |
| 774 | pTable->OpenSharedMemory = (OpenSharedMemoryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglOpenSharedMemory"); |
| 775 | pTable->OpenSharedQueueSemaphore = (OpenSharedQueueSemaphoreType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglOpenSharedQueueSemaphore"); |
| 776 | pTable->OpenPeerMemory = (OpenPeerMemoryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglOpenPeerMemory"); |
| 777 | pTable->OpenPeerImage = (OpenPeerImageType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglOpenPeerImage"); |
| 778 | pTable->DestroyObject = (DestroyObjectType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglDestroyObject"); |
| 779 | pTable->GetObjectInfo = (GetObjectInfoType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglGetObjectInfo"); |
| 780 | pTable->BindObjectMemory = (BindObjectMemoryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglBindObjectMemory"); |
| 781 | pTable->CreateFence = (CreateFenceType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateFence"); |
| 782 | pTable->GetFenceStatus = (GetFenceStatusType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglGetFenceStatus"); |
| 783 | pTable->WaitForFences = (WaitForFencesType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglWaitForFences"); |
| 784 | pTable->CreateQueueSemaphore = (CreateQueueSemaphoreType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateQueueSemaphore"); |
| 785 | pTable->SignalQueueSemaphore = (SignalQueueSemaphoreType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglSignalQueueSemaphore"); |
| 786 | pTable->WaitQueueSemaphore = (WaitQueueSemaphoreType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglWaitQueueSemaphore"); |
| 787 | pTable->CreateEvent = (CreateEventType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateEvent"); |
| 788 | pTable->GetEventStatus = (GetEventStatusType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglGetEventStatus"); |
| 789 | pTable->SetEvent = (SetEventType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglSetEvent"); |
| 790 | pTable->ResetEvent = (ResetEventType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglResetEvent"); |
| 791 | pTable->CreateQueryPool = (CreateQueryPoolType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateQueryPool"); |
| 792 | pTable->GetQueryPoolResults = (GetQueryPoolResultsType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglGetQueryPoolResults"); |
| 793 | pTable->GetFormatInfo = (GetFormatInfoType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglGetFormatInfo"); |
| 794 | pTable->CreateImage = (CreateImageType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateImage"); |
| 795 | pTable->GetImageSubresourceInfo = (GetImageSubresourceInfoType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglGetImageSubresourceInfo"); |
| 796 | pTable->CreateImageView = (CreateImageViewType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateImageView"); |
| 797 | pTable->CreateColorAttachmentView = (CreateColorAttachmentViewType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateColorAttachmentView"); |
| 798 | pTable->CreateDepthStencilView = (CreateDepthStencilViewType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateDepthStencilView"); |
| 799 | pTable->CreateShader = (CreateShaderType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateShader"); |
| 800 | pTable->CreateGraphicsPipeline = (CreateGraphicsPipelineType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateGraphicsPipeline"); |
| 801 | pTable->CreateComputePipeline = (CreateComputePipelineType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateComputePipeline"); |
| 802 | pTable->StorePipeline = (StorePipelineType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglStorePipeline"); |
| 803 | pTable->LoadPipeline = (LoadPipelineType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglLoadPipeline"); |
| 804 | pTable->CreatePipelineDelta = (CreatePipelineDeltaType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreatePipelineDelta"); |
| 805 | pTable->CreateSampler = (CreateSamplerType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateSampler"); |
| 806 | pTable->CreateDescriptorSet = (CreateDescriptorSetType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateDescriptorSet"); |
| 807 | pTable->BeginDescriptorSetUpdate = (BeginDescriptorSetUpdateType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglBeginDescriptorSetUpdate"); |
| 808 | pTable->EndDescriptorSetUpdate = (EndDescriptorSetUpdateType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglEndDescriptorSetUpdate"); |
| 809 | pTable->AttachSamplerDescriptors = (AttachSamplerDescriptorsType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglAttachSamplerDescriptors"); |
| 810 | pTable->AttachImageViewDescriptors = (AttachImageViewDescriptorsType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglAttachImageViewDescriptors"); |
| 811 | pTable->AttachMemoryViewDescriptors = (AttachMemoryViewDescriptorsType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglAttachMemoryViewDescriptors"); |
| 812 | pTable->AttachNestedDescriptors = (AttachNestedDescriptorsType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglAttachNestedDescriptors"); |
| 813 | pTable->ClearDescriptorSetSlots = (ClearDescriptorSetSlotsType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglClearDescriptorSetSlots"); |
| 814 | pTable->CreateViewportState = (CreateViewportStateType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateViewportState"); |
| 815 | pTable->CreateRasterState = (CreateRasterStateType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateRasterState"); |
| 816 | pTable->CreateMsaaState = (CreateMsaaStateType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateMsaaState"); |
| 817 | pTable->CreateColorBlendState = (CreateColorBlendStateType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateColorBlendState"); |
| 818 | pTable->CreateDepthStencilState = (CreateDepthStencilStateType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateDepthStencilState"); |
| 819 | pTable->CreateCommandBuffer = (CreateCommandBufferType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCreateCommandBuffer"); |
| 820 | pTable->BeginCommandBuffer = (BeginCommandBufferType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglBeginCommandBuffer"); |
| 821 | pTable->EndCommandBuffer = (EndCommandBufferType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglEndCommandBuffer"); |
| 822 | pTable->ResetCommandBuffer = (ResetCommandBufferType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglResetCommandBuffer"); |
| 823 | pTable->CmdBindPipeline = (CmdBindPipelineType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdBindPipeline"); |
| 824 | pTable->CmdBindPipelineDelta = (CmdBindPipelineDeltaType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdBindPipelineDelta"); |
| 825 | pTable->CmdBindStateObject = (CmdBindStateObjectType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdBindStateObject"); |
| 826 | pTable->CmdBindDescriptorSet = (CmdBindDescriptorSetType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdBindDescriptorSet"); |
| 827 | pTable->CmdBindDynamicMemoryView = (CmdBindDynamicMemoryViewType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdBindDynamicMemoryView"); |
| 828 | pTable->CmdBindVertexData = (CmdBindVertexDataType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdBindVertexData"); |
| 829 | pTable->CmdBindIndexData = (CmdBindIndexDataType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdBindIndexData"); |
| 830 | pTable->CmdBindAttachments = (CmdBindAttachmentsType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdBindAttachments"); |
| 831 | pTable->CmdPrepareMemoryRegions = (CmdPrepareMemoryRegionsType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdPrepareMemoryRegions"); |
| 832 | pTable->CmdPrepareImages = (CmdPrepareImagesType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdPrepareImages"); |
| 833 | pTable->CmdDraw = (CmdDrawType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdDraw"); |
| 834 | pTable->CmdDrawIndexed = (CmdDrawIndexedType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdDrawIndexed"); |
| 835 | pTable->CmdDrawIndirect = (CmdDrawIndirectType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdDrawIndirect"); |
| 836 | pTable->CmdDrawIndexedIndirect = (CmdDrawIndexedIndirectType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdDrawIndexedIndirect"); |
| 837 | pTable->CmdDispatch = (CmdDispatchType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdDispatch"); |
| 838 | pTable->CmdDispatchIndirect = (CmdDispatchIndirectType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdDispatchIndirect"); |
| 839 | pTable->CmdCopyMemory = (CmdCopyMemoryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdCopyMemory"); |
| 840 | pTable->CmdCopyImage = (CmdCopyImageType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdCopyImage"); |
| 841 | pTable->CmdCopyMemoryToImage = (CmdCopyMemoryToImageType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdCopyMemoryToImage"); |
| 842 | pTable->CmdCopyImageToMemory = (CmdCopyImageToMemoryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdCopyImageToMemory"); |
| 843 | pTable->CmdCloneImageData = (CmdCloneImageDataType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdCloneImageData"); |
| 844 | pTable->CmdUpdateMemory = (CmdUpdateMemoryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdUpdateMemory"); |
| 845 | pTable->CmdFillMemory = (CmdFillMemoryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdFillMemory"); |
| 846 | pTable->CmdClearColorImage = (CmdClearColorImageType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdClearColorImage"); |
| 847 | pTable->CmdClearColorImageRaw = (CmdClearColorImageRawType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdClearColorImageRaw"); |
| 848 | pTable->CmdClearDepthStencil = (CmdClearDepthStencilType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdClearDepthStencil"); |
| 849 | pTable->CmdResolveImage = (CmdResolveImageType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdResolveImage"); |
| 850 | pTable->CmdSetEvent = (CmdSetEventType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdSetEvent"); |
| 851 | pTable->CmdResetEvent = (CmdResetEventType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdResetEvent"); |
| 852 | pTable->CmdMemoryAtomic = (CmdMemoryAtomicType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdMemoryAtomic"); |
| 853 | pTable->CmdBeginQuery = (CmdBeginQueryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdBeginQuery"); |
| 854 | pTable->CmdEndQuery = (CmdEndQueryType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdEndQuery"); |
| 855 | pTable->CmdResetQueryPool = (CmdResetQueryPoolType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdResetQueryPool"); |
| 856 | pTable->CmdWriteTimestamp = (CmdWriteTimestampType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdWriteTimestamp"); |
| 857 | pTable->CmdInitAtomicCounters = (CmdInitAtomicCountersType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdInitAtomicCounters"); |
| 858 | pTable->CmdLoadAtomicCounters = (CmdLoadAtomicCountersType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdLoadAtomicCounters"); |
| 859 | pTable->CmdSaveAtomicCounters = (CmdSaveAtomicCountersType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdSaveAtomicCounters"); |
| 860 | pTable->DbgSetValidationLevel = (DbgSetValidationLevelType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglDbgSetValidationLevel"); |
| 861 | pTable->DbgRegisterMsgCallback = (DbgRegisterMsgCallbackType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglDbgRegisterMsgCallback"); |
| 862 | pTable->DbgUnregisterMsgCallback = (DbgUnregisterMsgCallbackType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglDbgUnregisterMsgCallback"); |
| 863 | pTable->DbgSetMessageFilter = (DbgSetMessageFilterType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglDbgSetMessageFilter"); |
| 864 | pTable->DbgSetObjectTag = (DbgSetObjectTagType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglDbgSetObjectTag"); |
| 865 | pTable->DbgSetGlobalOption = (DbgSetGlobalOptionType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglDbgSetGlobalOption"); |
| 866 | pTable->DbgSetDeviceOption = (DbgSetDeviceOptionType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglDbgSetDeviceOption"); |
| 867 | pTable->CmdDbgMarkerBegin = (CmdDbgMarkerBeginType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdDbgMarkerBegin"); |
| 868 | pTable->CmdDbgMarkerEnd = (CmdDbgMarkerEndType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglCmdDbgMarkerEnd"); |
| 869 | pTable->WsiX11AssociateConnection = (WsiX11AssociateConnectionType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglWsiX11AssociateConnection"); |
| 870 | pTable->WsiX11GetMSC = (WsiX11GetMSCType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglWsiX11GetMSC"); |
| 871 | pTable->WsiX11CreatePresentableImage = (WsiX11CreatePresentableImageType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglWsiX11CreatePresentableImage"); |
| 872 | pTable->WsiX11QueuePresent = (WsiX11QueuePresentType) fpGPA((XGL_PHYSICAL_GPU) gpuw->nextObject, "xglWsiX11QueuePresent"); |
Jon Ashburn | 79113cc | 2014-12-01 14:22:40 -0700 | [diff] [blame] | 873 | } |