Jon Ashburn | d43f9b6 | 2014-10-14 19:15:22 -0600 | [diff] [blame] | 1 | /* Need to define dispatch table |
| 2 | * Core struct can then have ptr to dispatch table at the top |
| 3 | * Along with object ptrs for current and next OBJ |
| 4 | */ |
| 5 | #pragma once |
| 6 | |
| 7 | #include "xgl.h" |
| 8 | #include "xglDbg.h" |
| 9 | #include "xglWsiX11Ext.h" |
| 10 | #if defined(__GNUC__) && __GNUC__ >= 4 |
| 11 | # define XGL_LAYER_EXPORT __attribute__((visibility("default"))) |
| 12 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) |
| 13 | # define XGL_LAYER_EXPORT __attribute__((visibility("default"))) |
| 14 | #else |
| 15 | # define XGL_LAYER_EXPORT |
| 16 | #endif |
| 17 | |
Jon Ashburn | 2173494 | 2014-10-17 15:31:22 -0600 | [diff] [blame] | 18 | typedef XGL_VOID * (XGLAPI *GetProcAddrType)(XGL_PHYSICAL_GPU gpu, const XGL_CHAR * pName); |
Jon Ashburn | d43f9b6 | 2014-10-14 19:15:22 -0600 | [diff] [blame] | 19 | typedef XGL_RESULT (XGLAPI *InitAndEnumerateGpusType)(const XGL_APPLICATION_INFO* pAppInfo, const XGL_ALLOC_CALLBACKS* pAllocCb, XGL_UINT maxGpus, XGL_UINT* pGpuCount, XGL_PHYSICAL_GPU* pGpus); |
| 20 | typedef XGL_RESULT (XGLAPI *GetGpuInfoType)(XGL_PHYSICAL_GPU gpu, XGL_PHYSICAL_GPU_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData); |
| 21 | typedef XGL_RESULT (XGLAPI *CreateDeviceType)(XGL_PHYSICAL_GPU gpu, const XGL_DEVICE_CREATE_INFO* pCreateInfo, XGL_DEVICE* pDevice); |
| 22 | typedef XGL_RESULT (XGLAPI *DestroyDeviceType)(XGL_DEVICE device); |
| 23 | typedef XGL_RESULT (XGLAPI *GetExtensionSupportType)(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* pExtName); |
Jon Ashburn | 96f28fc | 2014-10-15 15:30:23 -0600 | [diff] [blame] | 24 | typedef XGL_RESULT (XGLAPI *EnumerateLayersType)(XGL_PHYSICAL_GPU gpu, XGL_SIZE maxLayerCount, XGL_SIZE maxStringSize, XGL_CHAR* const* pOutLayers, XGL_SIZE* pOutLayerCount); |
Jon Ashburn | d43f9b6 | 2014-10-14 19:15:22 -0600 | [diff] [blame] | 25 | typedef XGL_RESULT (XGLAPI *GetDeviceQueueType)(XGL_DEVICE device, XGL_QUEUE_TYPE queueType, XGL_UINT queueIndex, XGL_QUEUE* pQueue); |
| 26 | typedef XGL_RESULT (XGLAPI *QueueSubmitType)(XGL_QUEUE queue, XGL_UINT cmdBufferCount, const XGL_CMD_BUFFER* pCmdBuffers, XGL_UINT memRefCount, const XGL_MEMORY_REF* pMemRefs, XGL_FENCE fence); |
| 27 | typedef XGL_RESULT (XGLAPI *QueueSetGlobalMemReferencesType)(XGL_QUEUE queue, XGL_UINT memRefCount, const XGL_MEMORY_REF* pMemRefs); |
| 28 | typedef XGL_RESULT (XGLAPI *QueueWaitIdleType)(XGL_QUEUE queue); |
| 29 | typedef XGL_RESULT (XGLAPI *DeviceWaitIdleType)(XGL_DEVICE device); |
| 30 | typedef XGL_RESULT (XGLAPI *GetMemoryHeapCountType)(XGL_DEVICE device, XGL_UINT* pCount); |
| 31 | typedef XGL_RESULT (XGLAPI *GetMemoryHeapInfoType)(XGL_DEVICE device, XGL_UINT heapId, XGL_MEMORY_HEAP_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData); |
| 32 | typedef XGL_RESULT (XGLAPI *AllocMemoryType)(XGL_DEVICE device, const XGL_MEMORY_ALLOC_INFO* pAllocInfo, XGL_GPU_MEMORY* pMem); |
| 33 | typedef XGL_RESULT (XGLAPI *FreeMemoryType)(XGL_GPU_MEMORY mem); |
| 34 | typedef XGL_RESULT (XGLAPI *SetMemoryPriorityType)(XGL_GPU_MEMORY mem, XGL_MEMORY_PRIORITY priority); |
| 35 | typedef XGL_RESULT (XGLAPI *MapMemoryType)(XGL_GPU_MEMORY mem, XGL_FLAGS flags, XGL_VOID** ppData); |
| 36 | typedef XGL_RESULT (XGLAPI *UnmapMemoryType)(XGL_GPU_MEMORY mem); |
| 37 | typedef XGL_RESULT (XGLAPI *PinSystemMemoryType)(XGL_DEVICE device, const XGL_VOID* pSysMem, XGL_SIZE memSize, XGL_GPU_MEMORY* pMem); |
| 38 | typedef XGL_RESULT (XGLAPI *RemapVirtualMemoryPagesType)(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); |
| 39 | typedef XGL_RESULT (XGLAPI *GetMultiGpuCompatibilityType)(XGL_PHYSICAL_GPU gpu0, XGL_PHYSICAL_GPU gpu1, XGL_GPU_COMPATIBILITY_INFO* pInfo); |
| 40 | typedef XGL_RESULT (XGLAPI *OpenSharedMemoryType)(XGL_DEVICE device, const XGL_MEMORY_OPEN_INFO* pOpenInfo, XGL_GPU_MEMORY* pMem); |
| 41 | typedef XGL_RESULT (XGLAPI *OpenSharedQueueSemaphoreType)(XGL_DEVICE device, const XGL_QUEUE_SEMAPHORE_OPEN_INFO* pOpenInfo, XGL_QUEUE_SEMAPHORE* pSemaphore); |
| 42 | typedef XGL_RESULT (XGLAPI *OpenPeerMemoryType)(XGL_DEVICE device, const XGL_PEER_MEMORY_OPEN_INFO* pOpenInfo, XGL_GPU_MEMORY* pMem); |
| 43 | typedef XGL_RESULT (XGLAPI *OpenPeerImageType)(XGL_DEVICE device, const XGL_PEER_IMAGE_OPEN_INFO* pOpenInfo, XGL_IMAGE* pImage, XGL_GPU_MEMORY* pMem); |
| 44 | typedef XGL_RESULT (XGLAPI *DestroyObjectType)(XGL_OBJECT object); |
| 45 | typedef XGL_RESULT (XGLAPI *GetObjectInfoType)(XGL_BASE_OBJECT object, XGL_OBJECT_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData); |
| 46 | typedef XGL_RESULT (XGLAPI *BindObjectMemoryType)(XGL_OBJECT object, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset); |
| 47 | typedef XGL_RESULT (XGLAPI *CreateFenceType)(XGL_DEVICE device, const XGL_FENCE_CREATE_INFO* pCreateInfo, XGL_FENCE* pFence); |
| 48 | typedef XGL_RESULT (XGLAPI *GetFenceStatusType)(XGL_FENCE fence); |
| 49 | typedef XGL_RESULT (XGLAPI *WaitForFencesType)(XGL_DEVICE device, XGL_UINT fenceCount, const XGL_FENCE* pFences, XGL_BOOL waitAll, XGL_UINT64 timeout); |
| 50 | typedef XGL_RESULT (XGLAPI *CreateQueueSemaphoreType)(XGL_DEVICE device, const XGL_QUEUE_SEMAPHORE_CREATE_INFO* pCreateInfo, XGL_QUEUE_SEMAPHORE* pSemaphore); |
| 51 | typedef XGL_RESULT (XGLAPI *SignalQueueSemaphoreType)(XGL_QUEUE queue, XGL_QUEUE_SEMAPHORE semaphore); |
| 52 | typedef XGL_RESULT (XGLAPI *WaitQueueSemaphoreType)(XGL_QUEUE queue, XGL_QUEUE_SEMAPHORE semaphore); |
| 53 | typedef XGL_RESULT (XGLAPI *CreateEventType)(XGL_DEVICE device, const XGL_EVENT_CREATE_INFO* pCreateInfo, XGL_EVENT* pEvent); |
| 54 | typedef XGL_RESULT (XGLAPI *GetEventStatusType)(XGL_EVENT event); |
| 55 | typedef XGL_RESULT (XGLAPI *SetEventType)(XGL_EVENT event); |
| 56 | typedef XGL_RESULT (XGLAPI *ResetEventType)(XGL_EVENT event); |
| 57 | typedef XGL_RESULT (XGLAPI *CreateQueryPoolType)(XGL_DEVICE device, const XGL_QUERY_POOL_CREATE_INFO* pCreateInfo, XGL_QUERY_POOL* pQueryPool); |
| 58 | typedef XGL_RESULT (XGLAPI *GetQueryPoolResultsType)(XGL_QUERY_POOL queryPool, XGL_UINT startQuery, XGL_UINT queryCount, XGL_SIZE* pDataSize, XGL_VOID* pData); |
| 59 | typedef XGL_RESULT (XGLAPI *GetFormatInfoType)(XGL_DEVICE device, XGL_FORMAT format, XGL_FORMAT_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData); |
| 60 | typedef XGL_RESULT (XGLAPI *CreateImageType)(XGL_DEVICE device, const XGL_IMAGE_CREATE_INFO* pCreateInfo, XGL_IMAGE* pImage); |
| 61 | typedef XGL_RESULT (XGLAPI *GetImageSubresourceInfoType)(XGL_IMAGE image, const XGL_IMAGE_SUBRESOURCE* pSubresource, XGL_SUBRESOURCE_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData); |
| 62 | typedef XGL_RESULT (XGLAPI *CreateImageViewType)(XGL_DEVICE device, const XGL_IMAGE_VIEW_CREATE_INFO* pCreateInfo, XGL_IMAGE_VIEW* pView); |
| 63 | typedef XGL_RESULT (XGLAPI *CreateColorAttachmentViewType)(XGL_DEVICE device, const XGL_COLOR_ATTACHMENT_VIEW_CREATE_INFO* pCreateInfo, XGL_COLOR_ATTACHMENT_VIEW* pView); |
| 64 | typedef XGL_RESULT (XGLAPI *CreateDepthStencilViewType)(XGL_DEVICE device, const XGL_DEPTH_STENCIL_VIEW_CREATE_INFO* pCreateInfo, XGL_DEPTH_STENCIL_VIEW* pView); |
| 65 | typedef XGL_RESULT (XGLAPI *CreateShaderType)(XGL_DEVICE device, const XGL_SHADER_CREATE_INFO* pCreateInfo, XGL_SHADER* pShader); |
| 66 | typedef XGL_RESULT (XGLAPI *CreateGraphicsPipelineType)(XGL_DEVICE device, const XGL_GRAPHICS_PIPELINE_CREATE_INFO* pCreateInfo, XGL_PIPELINE* pPipeline); |
| 67 | typedef XGL_RESULT (XGLAPI *CreateComputePipelineType)(XGL_DEVICE device, const XGL_COMPUTE_PIPELINE_CREATE_INFO* pCreateInfo, XGL_PIPELINE* pPipeline); |
| 68 | typedef XGL_RESULT (XGLAPI *StorePipelineType)(XGL_PIPELINE pipeline, XGL_SIZE* pDataSize, XGL_VOID* pData); |
| 69 | typedef XGL_RESULT (XGLAPI *LoadPipelineType)(XGL_DEVICE device, XGL_SIZE dataSize, const XGL_VOID* pData, XGL_PIPELINE* pPipeline); |
| 70 | typedef XGL_RESULT (XGLAPI *CreatePipelineDeltaType)(XGL_DEVICE device, XGL_PIPELINE p1, XGL_PIPELINE p2, XGL_PIPELINE_DELTA* delta); |
| 71 | typedef XGL_RESULT (XGLAPI *CreateSamplerType)(XGL_DEVICE device, const XGL_SAMPLER_CREATE_INFO* pCreateInfo, XGL_SAMPLER* pSampler); |
| 72 | typedef XGL_RESULT (XGLAPI *CreateDescriptorSetType)(XGL_DEVICE device, const XGL_DESCRIPTOR_SET_CREATE_INFO* pCreateInfo, XGL_DESCRIPTOR_SET* pDescriptorSet); |
| 73 | typedef XGL_VOID (XGLAPI *BeginDescriptorSetUpdateType)(XGL_DESCRIPTOR_SET descriptorSet); |
| 74 | typedef XGL_VOID (XGLAPI *EndDescriptorSetUpdateType)(XGL_DESCRIPTOR_SET descriptorSet); |
| 75 | typedef XGL_VOID (XGLAPI *AttachSamplerDescriptorsType)(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_SAMPLER* pSamplers); |
| 76 | typedef XGL_VOID (XGLAPI *AttachImageViewDescriptorsType)(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_IMAGE_VIEW_ATTACH_INFO* pImageViews); |
| 77 | typedef XGL_VOID (XGLAPI *AttachMemoryViewDescriptorsType)(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_MEMORY_VIEW_ATTACH_INFO* pMemViews); |
| 78 | typedef XGL_VOID (XGLAPI *AttachNestedDescriptorsType)(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount, const XGL_DESCRIPTOR_SET_ATTACH_INFO* pNestedDescriptorSets); |
| 79 | typedef XGL_VOID (XGLAPI *ClearDescriptorSetSlotsType)(XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT startSlot, XGL_UINT slotCount); |
| 80 | typedef XGL_RESULT (XGLAPI *CreateViewportStateType)(XGL_DEVICE device, const XGL_VIEWPORT_STATE_CREATE_INFO* pCreateInfo, XGL_VIEWPORT_STATE_OBJECT* pState); |
| 81 | typedef XGL_RESULT (XGLAPI *CreateRasterStateType)(XGL_DEVICE device, const XGL_RASTER_STATE_CREATE_INFO* pCreateInfo, XGL_RASTER_STATE_OBJECT* pState); |
| 82 | typedef XGL_RESULT (XGLAPI *CreateMsaaStateType)(XGL_DEVICE device, const XGL_MSAA_STATE_CREATE_INFO* pCreateInfo, XGL_MSAA_STATE_OBJECT* pState); |
| 83 | typedef XGL_RESULT (XGLAPI *CreateColorBlendStateType)(XGL_DEVICE device, const XGL_COLOR_BLEND_STATE_CREATE_INFO* pCreateInfo, XGL_COLOR_BLEND_STATE_OBJECT* pState); |
| 84 | typedef XGL_RESULT (XGLAPI *CreateDepthStencilStateType)(XGL_DEVICE device, const XGL_DEPTH_STENCIL_STATE_CREATE_INFO* pCreateInfo, XGL_DEPTH_STENCIL_STATE_OBJECT* pState); |
| 85 | typedef XGL_RESULT (XGLAPI *CreateCommandBufferType)(XGL_DEVICE device, const XGL_CMD_BUFFER_CREATE_INFO* pCreateInfo, XGL_CMD_BUFFER* pCmdBuffer); |
| 86 | typedef XGL_RESULT (XGLAPI *BeginCommandBufferType)(XGL_CMD_BUFFER cmdBuffer, XGL_FLAGS flags); |
| 87 | typedef XGL_RESULT (XGLAPI *EndCommandBufferType)(XGL_CMD_BUFFER cmdBuffer); |
| 88 | typedef XGL_RESULT (XGLAPI *ResetCommandBufferType)(XGL_CMD_BUFFER cmdBuffer); |
| 89 | typedef XGL_VOID (XGLAPI *CmdBindPipelineType)(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_PIPELINE pipeline); |
| 90 | typedef XGL_VOID (XGLAPI *CmdBindPipelineDeltaType)(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_PIPELINE_DELTA delta); |
| 91 | typedef XGL_VOID (XGLAPI *CmdBindStateObjectType)(XGL_CMD_BUFFER cmdBuffer, XGL_STATE_BIND_POINT stateBindPoint, XGL_STATE_OBJECT state); |
| 92 | typedef XGL_VOID (XGLAPI *CmdBindDescriptorSetType)(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_UINT index, XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT slotOffset); |
| 93 | typedef XGL_VOID (XGLAPI *CmdBindDynamicMemoryViewType)(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, const XGL_MEMORY_VIEW_ATTACH_INFO* pMemView); |
Chia-I Wu | 3b04af5 | 2014-11-08 10:48:20 +0800 | [diff] [blame] | 94 | typedef XGL_VOID (XGLAPI *CmdBindVertexDataType)(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT binding); |
Jon Ashburn | d43f9b6 | 2014-10-14 19:15:22 -0600 | [diff] [blame] | 95 | typedef XGL_VOID (XGLAPI *CmdBindIndexDataType)(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_INDEX_TYPE indexType); |
| 96 | typedef XGL_VOID (XGLAPI *CmdBindAttachmentsType)(XGL_CMD_BUFFER cmdBuffer, XGL_UINT colorAttachmentCount, const XGL_COLOR_ATTACHMENT_BIND_INFO* pColorAttachments, const XGL_DEPTH_STENCIL_BIND_INFO* pDepthStencilAttachment); |
| 97 | typedef XGL_VOID (XGLAPI *CmdPrepareMemoryRegionsType)(XGL_CMD_BUFFER cmdBuffer, XGL_UINT transitionCount, const XGL_MEMORY_STATE_TRANSITION* pStateTransitions); |
| 98 | typedef XGL_VOID (XGLAPI *CmdPrepareImagesType)(XGL_CMD_BUFFER cmdBuffer, XGL_UINT transitionCount, const XGL_IMAGE_STATE_TRANSITION* pStateTransitions); |
| 99 | typedef XGL_VOID (XGLAPI *CmdDrawType)(XGL_CMD_BUFFER cmdBuffer, XGL_UINT firstVertex, XGL_UINT vertexCount, XGL_UINT firstInstance, XGL_UINT instanceCount); |
| 100 | typedef XGL_VOID (XGLAPI *CmdDrawIndexedType)(XGL_CMD_BUFFER cmdBuffer, XGL_UINT firstIndex, XGL_UINT indexCount, XGL_INT vertexOffset, XGL_UINT firstInstance, XGL_UINT instanceCount); |
| 101 | typedef XGL_VOID (XGLAPI *CmdDrawIndirectType)(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT32 count, XGL_UINT32 stride); |
| 102 | typedef XGL_VOID (XGLAPI *CmdDrawIndexedIndirectType)(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT32 count, XGL_UINT32 stride); |
| 103 | typedef XGL_VOID (XGLAPI *CmdDispatchType)(XGL_CMD_BUFFER cmdBuffer, XGL_UINT x, XGL_UINT y, XGL_UINT z); |
| 104 | typedef XGL_VOID (XGLAPI *CmdDispatchIndirectType)(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset); |
| 105 | typedef XGL_VOID (XGLAPI *CmdCopyMemoryType)(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY srcMem, XGL_GPU_MEMORY destMem, XGL_UINT regionCount, const XGL_MEMORY_COPY* pRegions); |
| 106 | typedef XGL_VOID (XGLAPI *CmdCopyImageType)(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE destImage, XGL_UINT regionCount, const XGL_IMAGE_COPY* pRegions); |
| 107 | typedef XGL_VOID (XGLAPI *CmdCopyMemoryToImageType)(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY srcMem, XGL_IMAGE destImage, XGL_UINT regionCount, const XGL_MEMORY_IMAGE_COPY* pRegions); |
| 108 | typedef XGL_VOID (XGLAPI *CmdCopyImageToMemoryType)(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_GPU_MEMORY destMem, XGL_UINT regionCount, const XGL_MEMORY_IMAGE_COPY* pRegions); |
| 109 | typedef XGL_VOID (XGLAPI *CmdCloneImageDataType)(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE_STATE srcImageState, XGL_IMAGE destImage, XGL_IMAGE_STATE destImageState); |
| 110 | typedef XGL_VOID (XGLAPI *CmdUpdateMemoryType)(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY destMem, XGL_GPU_SIZE destOffset, XGL_GPU_SIZE dataSize, const XGL_UINT32* pData); |
| 111 | typedef XGL_VOID (XGLAPI *CmdFillMemoryType)(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY destMem, XGL_GPU_SIZE destOffset, XGL_GPU_SIZE fillSize, XGL_UINT32 data); |
| 112 | typedef XGL_VOID (XGLAPI *CmdClearColorImageType)(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE image, const XGL_FLOAT color[4], XGL_UINT rangeCount, const XGL_IMAGE_SUBRESOURCE_RANGE* pRanges); |
| 113 | typedef XGL_VOID (XGLAPI *CmdClearColorImageRawType)(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE image, const XGL_UINT32 color[4], XGL_UINT rangeCount, const XGL_IMAGE_SUBRESOURCE_RANGE* pRanges); |
| 114 | typedef XGL_VOID (XGLAPI *CmdClearDepthStencilType)(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE image, XGL_FLOAT depth, XGL_UINT32 stencil, XGL_UINT rangeCount, const XGL_IMAGE_SUBRESOURCE_RANGE* pRanges); |
| 115 | typedef XGL_VOID (XGLAPI *CmdResolveImageType)(XGL_CMD_BUFFER cmdBuffer, XGL_IMAGE srcImage, XGL_IMAGE destImage, XGL_UINT rectCount, const XGL_IMAGE_RESOLVE* pRects); |
| 116 | typedef XGL_VOID (XGLAPI *CmdSetEventType)(XGL_CMD_BUFFER cmdBuffer, XGL_EVENT event); |
| 117 | typedef XGL_VOID (XGLAPI *CmdResetEventType)(XGL_CMD_BUFFER cmdBuffer, XGL_EVENT event); |
| 118 | typedef XGL_VOID (XGLAPI *CmdMemoryAtomicType)(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY destMem, XGL_GPU_SIZE destOffset, XGL_UINT64 srcData, XGL_ATOMIC_OP atomicOp); |
| 119 | typedef XGL_VOID (XGLAPI *CmdBeginQueryType)(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT slot, XGL_FLAGS flags); |
| 120 | typedef XGL_VOID (XGLAPI *CmdEndQueryType)(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT slot); |
| 121 | typedef XGL_VOID (XGLAPI *CmdResetQueryPoolType)(XGL_CMD_BUFFER cmdBuffer, XGL_QUERY_POOL queryPool, XGL_UINT startQuery, XGL_UINT queryCount); |
| 122 | typedef XGL_VOID (XGLAPI *CmdWriteTimestampType)(XGL_CMD_BUFFER cmdBuffer, XGL_TIMESTAMP_TYPE timestampType, XGL_GPU_MEMORY destMem, XGL_GPU_SIZE destOffset); |
| 123 | typedef XGL_VOID (XGLAPI *CmdInitAtomicCountersType)(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_UINT startCounter, XGL_UINT counterCount, const XGL_UINT32* pData); |
| 124 | typedef XGL_VOID (XGLAPI *CmdLoadAtomicCountersType)(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_UINT startCounter, XGL_UINT counterCount, XGL_GPU_MEMORY srcMem, XGL_GPU_SIZE srcOffset); |
| 125 | typedef XGL_VOID (XGLAPI *CmdSaveAtomicCountersType)(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_UINT startCounter, XGL_UINT counterCount, XGL_GPU_MEMORY destMem, XGL_GPU_SIZE destOffset); |
| 126 | typedef XGL_RESULT (XGLAPI *DbgSetValidationLevelType)(XGL_DEVICE device, XGL_VALIDATION_LEVEL validationLevel); |
| 127 | typedef XGL_RESULT (XGLAPI *DbgRegisterMsgCallbackType)(XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback, XGL_VOID* pUserData); |
| 128 | typedef XGL_RESULT (XGLAPI *DbgUnregisterMsgCallbackType)(XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback); |
| 129 | typedef XGL_RESULT (XGLAPI *DbgSetMessageFilterType)(XGL_DEVICE device, XGL_INT msgCode, XGL_DBG_MSG_FILTER filter); |
| 130 | typedef XGL_RESULT (XGLAPI *DbgSetObjectTagType)(XGL_BASE_OBJECT object, XGL_SIZE tagSize, const XGL_VOID* pTag); |
| 131 | typedef XGL_RESULT (XGLAPI *DbgSetGlobalOptionType)(XGL_DBG_GLOBAL_OPTION dbgOption, XGL_SIZE dataSize, const XGL_VOID* pData); |
| 132 | typedef XGL_RESULT (XGLAPI *DbgSetDeviceOptionType)(XGL_DEVICE device, XGL_DBG_DEVICE_OPTION dbgOption, XGL_SIZE dataSize, const XGL_VOID* pData); |
| 133 | typedef XGL_VOID (XGLAPI *CmdDbgMarkerBeginType)(XGL_CMD_BUFFER cmdBuffer, const XGL_CHAR* pMarker); |
| 134 | typedef XGL_VOID (XGLAPI *CmdDbgMarkerEndType)(XGL_CMD_BUFFER cmdBuffer); |
| 135 | typedef XGL_RESULT (XGLAPI *WsiX11AssociateConnectionType)(XGL_PHYSICAL_GPU gpu, const XGL_WSI_X11_CONNECTION_INFO* pConnectionInfo); |
Chia-I Wu | 6204f34 | 2014-11-07 13:33:45 +0800 | [diff] [blame] | 136 | typedef XGL_RESULT (XGLAPI *WsiX11GetMSCType)(XGL_DEVICE device, xcb_window_t window, xcb_randr_crtc_t crtc, XGL_UINT64* pMsc); |
Jon Ashburn | d43f9b6 | 2014-10-14 19:15:22 -0600 | [diff] [blame] | 137 | typedef XGL_RESULT (XGLAPI *WsiX11CreatePresentableImageType)(XGL_DEVICE device, const XGL_WSI_X11_PRESENTABLE_IMAGE_CREATE_INFO* pCreateInfo, XGL_IMAGE* pImage, XGL_GPU_MEMORY* pMem); |
| 138 | typedef XGL_RESULT (XGLAPI *WsiX11QueuePresentType)(XGL_QUEUE queue, const XGL_WSI_X11_PRESENT_INFO* pPresentInfo, XGL_FENCE fence); |
| 139 | |
| 140 | typedef struct _XGL_BASE_LAYER_OBJECT |
| 141 | { |
| 142 | GetProcAddrType pGPA; |
| 143 | XGL_BASE_OBJECT nextObject; |
| 144 | XGL_BASE_OBJECT baseObject; |
| 145 | } XGL_BASE_LAYER_OBJECT; |
| 146 | |
| 147 | typedef struct _XGL_LAYER_DISPATCH_TABLE |
| 148 | { |
| 149 | GetProcAddrType GetProcAddr; |
| 150 | InitAndEnumerateGpusType InitAndEnumerateGpus; |
| 151 | GetGpuInfoType GetGpuInfo; |
| 152 | CreateDeviceType CreateDevice; |
| 153 | DestroyDeviceType DestroyDevice; |
| 154 | GetExtensionSupportType GetExtensionSupport; |
Jon Ashburn | 96f28fc | 2014-10-15 15:30:23 -0600 | [diff] [blame] | 155 | EnumerateLayersType EnumerateLayers; |
Jon Ashburn | d43f9b6 | 2014-10-14 19:15:22 -0600 | [diff] [blame] | 156 | GetDeviceQueueType GetDeviceQueue; |
| 157 | QueueSubmitType QueueSubmit; |
| 158 | QueueSetGlobalMemReferencesType QueueSetGlobalMemReferences; |
| 159 | QueueWaitIdleType QueueWaitIdle; |
| 160 | DeviceWaitIdleType DeviceWaitIdle; |
| 161 | GetMemoryHeapCountType GetMemoryHeapCount; |
| 162 | GetMemoryHeapInfoType GetMemoryHeapInfo; |
| 163 | AllocMemoryType AllocMemory; |
| 164 | FreeMemoryType FreeMemory; |
| 165 | SetMemoryPriorityType SetMemoryPriority; |
| 166 | MapMemoryType MapMemory; |
| 167 | UnmapMemoryType UnmapMemory; |
| 168 | PinSystemMemoryType PinSystemMemory; |
| 169 | RemapVirtualMemoryPagesType RemapVirtualMemoryPages; |
| 170 | GetMultiGpuCompatibilityType GetMultiGpuCompatibility; |
| 171 | OpenSharedMemoryType OpenSharedMemory; |
| 172 | OpenSharedQueueSemaphoreType OpenSharedQueueSemaphore; |
| 173 | OpenPeerMemoryType OpenPeerMemory; |
| 174 | OpenPeerImageType OpenPeerImage; |
| 175 | DestroyObjectType DestroyObject; |
| 176 | GetObjectInfoType GetObjectInfo; |
| 177 | BindObjectMemoryType BindObjectMemory; |
| 178 | CreateFenceType CreateFence; |
| 179 | GetFenceStatusType GetFenceStatus; |
| 180 | WaitForFencesType WaitForFences; |
| 181 | CreateQueueSemaphoreType CreateQueueSemaphore; |
| 182 | SignalQueueSemaphoreType SignalQueueSemaphore; |
| 183 | WaitQueueSemaphoreType WaitQueueSemaphore; |
| 184 | CreateEventType CreateEvent; |
| 185 | GetEventStatusType GetEventStatus; |
| 186 | SetEventType SetEvent; |
| 187 | ResetEventType ResetEvent; |
| 188 | CreateQueryPoolType CreateQueryPool; |
| 189 | GetQueryPoolResultsType GetQueryPoolResults; |
| 190 | GetFormatInfoType GetFormatInfo; |
| 191 | CreateImageType CreateImage; |
| 192 | GetImageSubresourceInfoType GetImageSubresourceInfo; |
| 193 | CreateImageViewType CreateImageView; |
| 194 | CreateColorAttachmentViewType CreateColorAttachmentView; |
| 195 | CreateDepthStencilViewType CreateDepthStencilView; |
| 196 | CreateShaderType CreateShader; |
| 197 | CreateGraphicsPipelineType CreateGraphicsPipeline; |
| 198 | CreateComputePipelineType CreateComputePipeline; |
| 199 | StorePipelineType StorePipeline; |
| 200 | LoadPipelineType LoadPipeline; |
| 201 | CreatePipelineDeltaType CreatePipelineDelta; |
| 202 | CreateSamplerType CreateSampler; |
| 203 | CreateDescriptorSetType CreateDescriptorSet; |
| 204 | BeginDescriptorSetUpdateType BeginDescriptorSetUpdate; |
| 205 | EndDescriptorSetUpdateType EndDescriptorSetUpdate; |
| 206 | AttachSamplerDescriptorsType AttachSamplerDescriptors; |
| 207 | AttachImageViewDescriptorsType AttachImageViewDescriptors; |
| 208 | AttachMemoryViewDescriptorsType AttachMemoryViewDescriptors; |
| 209 | AttachNestedDescriptorsType AttachNestedDescriptors; |
| 210 | ClearDescriptorSetSlotsType ClearDescriptorSetSlots; |
| 211 | CreateViewportStateType CreateViewportState; |
| 212 | CreateRasterStateType CreateRasterState; |
| 213 | CreateMsaaStateType CreateMsaaState; |
| 214 | CreateColorBlendStateType CreateColorBlendState; |
| 215 | CreateDepthStencilStateType CreateDepthStencilState; |
| 216 | CreateCommandBufferType CreateCommandBuffer; |
| 217 | BeginCommandBufferType BeginCommandBuffer; |
| 218 | EndCommandBufferType EndCommandBuffer; |
| 219 | ResetCommandBufferType ResetCommandBuffer; |
| 220 | CmdBindPipelineType CmdBindPipeline; |
| 221 | CmdBindPipelineDeltaType CmdBindPipelineDelta; |
| 222 | CmdBindStateObjectType CmdBindStateObject; |
| 223 | CmdBindDescriptorSetType CmdBindDescriptorSet; |
| 224 | CmdBindDynamicMemoryViewType CmdBindDynamicMemoryView; |
Chia-I Wu | 3b04af5 | 2014-11-08 10:48:20 +0800 | [diff] [blame] | 225 | CmdBindVertexDataType CmdBindVertexData; |
Jon Ashburn | d43f9b6 | 2014-10-14 19:15:22 -0600 | [diff] [blame] | 226 | CmdBindIndexDataType CmdBindIndexData; |
| 227 | CmdBindAttachmentsType CmdBindAttachments; |
| 228 | CmdPrepareMemoryRegionsType CmdPrepareMemoryRegions; |
| 229 | CmdPrepareImagesType CmdPrepareImages; |
| 230 | CmdDrawType CmdDraw; |
| 231 | CmdDrawIndexedType CmdDrawIndexed; |
| 232 | CmdDrawIndirectType CmdDrawIndirect; |
| 233 | CmdDrawIndexedIndirectType CmdDrawIndexedIndirect; |
| 234 | CmdDispatchType CmdDispatch; |
| 235 | CmdDispatchIndirectType CmdDispatchIndirect; |
| 236 | CmdCopyMemoryType CmdCopyMemory; |
| 237 | CmdCopyImageType CmdCopyImage; |
| 238 | CmdCopyMemoryToImageType CmdCopyMemoryToImage; |
| 239 | CmdCopyImageToMemoryType CmdCopyImageToMemory; |
| 240 | CmdCloneImageDataType CmdCloneImageData; |
| 241 | CmdUpdateMemoryType CmdUpdateMemory; |
| 242 | CmdFillMemoryType CmdFillMemory; |
| 243 | CmdClearColorImageType CmdClearColorImage; |
| 244 | CmdClearColorImageRawType CmdClearColorImageRaw; |
| 245 | CmdClearDepthStencilType CmdClearDepthStencil; |
| 246 | CmdResolveImageType CmdResolveImage; |
| 247 | CmdSetEventType CmdSetEvent; |
| 248 | CmdResetEventType CmdResetEvent; |
| 249 | CmdMemoryAtomicType CmdMemoryAtomic; |
| 250 | CmdBeginQueryType CmdBeginQuery; |
| 251 | CmdEndQueryType CmdEndQuery; |
| 252 | CmdResetQueryPoolType CmdResetQueryPool; |
| 253 | CmdWriteTimestampType CmdWriteTimestamp; |
| 254 | CmdInitAtomicCountersType CmdInitAtomicCounters; |
| 255 | CmdLoadAtomicCountersType CmdLoadAtomicCounters; |
| 256 | CmdSaveAtomicCountersType CmdSaveAtomicCounters; |
| 257 | DbgSetValidationLevelType DbgSetValidationLevel; |
| 258 | DbgRegisterMsgCallbackType DbgRegisterMsgCallback; |
| 259 | DbgUnregisterMsgCallbackType DbgUnregisterMsgCallback; |
| 260 | DbgSetMessageFilterType DbgSetMessageFilter; |
| 261 | DbgSetObjectTagType DbgSetObjectTag; |
| 262 | DbgSetGlobalOptionType DbgSetGlobalOption; |
| 263 | DbgSetDeviceOptionType DbgSetDeviceOption; |
| 264 | CmdDbgMarkerBeginType CmdDbgMarkerBegin; |
| 265 | CmdDbgMarkerEndType CmdDbgMarkerEnd; |
| 266 | WsiX11AssociateConnectionType WsiX11AssociateConnection; |
| 267 | WsiX11GetMSCType WsiX11GetMSC; |
| 268 | WsiX11CreatePresentableImageType WsiX11CreatePresentableImage; |
| 269 | WsiX11QueuePresentType WsiX11QueuePresent; |
| 270 | } XGL_LAYER_DISPATCH_TABLE; |
| 271 | |
| 272 | // ------------------------------------------------------------------------------------------------ |
| 273 | // API functions |