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