xgl.py: remove icd_dispatch_table
Its role was replaced by XGL_LAYER_DISPATCH_TABLE defined in xglLayer.h but it
was still used as "a list of all protoype names". Add proto_names for that
purpose.
diff --git a/xgl-layer-generate.py b/xgl-layer-generate.py
index b8c7cf2..5999aeb 100755
--- a/xgl-layer-generate.py
+++ b/xgl-layer-generate.py
@@ -551,7 +551,7 @@
for ext_name in extensions:
func_body.append(' else if (!strncmp("%s", funcName, sizeof("%s")))\n'
' return %s;' % (ext_name, ext_name, ext_name))
- for name in xgl.icd_dispatch_table:
+ for name in xgl.proto_names:
if name == "GetProcAddr":
continue
if name == "InitAndEnumerateGpus":
@@ -578,7 +578,7 @@
' fpNextGPA = pCurObj->pGPA;\n'
' assert(fpNextGPA);\n');
- for name in xgl.icd_dispatch_table:
+ for name in xgl.proto_names:
func_body.append(' %sType fp%s = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "%s%s");\n'
' nextTable.%s = fp%s;' % (name, name, prefix, name, name, name))
diff --git a/xgl.py b/xgl.py
index 613db90..36d8444 100644
--- a/xgl.py
+++ b/xgl.py
@@ -759,133 +759,7 @@
headers.extend(ext.headers)
protos.extend(ext.protos)
-# the dispatch table defined for ICDs
-# XXX figure out the real order
-# XXX this is not extensible
-icd_dispatch_table = (
- "GetProcAddr",
- "InitAndEnumerateGpus",
- "GetGpuInfo",
- "CreateDevice",
- "DestroyDevice",
- "GetExtensionSupport",
- "EnumerateLayers",
- "GetDeviceQueue",
- "QueueSubmit",
- "QueueSetGlobalMemReferences",
- "QueueWaitIdle",
- "DeviceWaitIdle",
- "GetMemoryHeapCount",
- "GetMemoryHeapInfo",
- "AllocMemory",
- "FreeMemory",
- "SetMemoryPriority",
- "MapMemory",
- "UnmapMemory",
- "PinSystemMemory",
- "RemapVirtualMemoryPages",
- "GetMultiGpuCompatibility",
- "OpenSharedMemory",
- "OpenSharedQueueSemaphore",
- "OpenPeerMemory",
- "OpenPeerImage",
- "DestroyObject",
- "GetObjectInfo",
- "BindObjectMemory",
- "CreateFence",
- "GetFenceStatus",
- "WaitForFences",
- "CreateQueueSemaphore",
- "SignalQueueSemaphore",
- "WaitQueueSemaphore",
- "CreateEvent",
- "GetEventStatus",
- "SetEvent",
- "ResetEvent",
- "CreateQueryPool",
- "GetQueryPoolResults",
- "GetFormatInfo",
- "CreateImage",
- "GetImageSubresourceInfo",
- "CreateImageView",
- "CreateColorAttachmentView",
- "CreateDepthStencilView",
- "CreateShader",
- "CreateGraphicsPipeline",
- "CreateComputePipeline",
- "StorePipeline",
- "LoadPipeline",
- "CreatePipelineDelta",
- "CreateSampler",
- "CreateDescriptorSet",
- "BeginDescriptorSetUpdate",
- "EndDescriptorSetUpdate",
- "AttachSamplerDescriptors",
- "AttachImageViewDescriptors",
- "AttachMemoryViewDescriptors",
- "AttachNestedDescriptors",
- "ClearDescriptorSetSlots",
- "CreateViewportState",
- "CreateRasterState",
- "CreateMsaaState",
- "CreateColorBlendState",
- "CreateDepthStencilState",
- "CreateCommandBuffer",
- "BeginCommandBuffer",
- "EndCommandBuffer",
- "ResetCommandBuffer",
- "CmdBindPipeline",
- "CmdBindPipelineDelta",
- "CmdBindStateObject",
- "CmdBindDescriptorSet",
- "CmdBindDynamicMemoryView",
- "CmdBindVertexData",
- "CmdBindIndexData",
- "CmdBindAttachments",
- "CmdPrepareMemoryRegions",
- "CmdPrepareImages",
- "CmdDraw",
- "CmdDrawIndexed",
- "CmdDrawIndirect",
- "CmdDrawIndexedIndirect",
- "CmdDispatch",
- "CmdDispatchIndirect",
- "CmdCopyMemory",
- "CmdCopyImage",
- "CmdCopyMemoryToImage",
- "CmdCopyImageToMemory",
- "CmdCloneImageData",
- "CmdUpdateMemory",
- "CmdFillMemory",
- "CmdClearColorImage",
- "CmdClearColorImageRaw",
- "CmdClearDepthStencil",
- "CmdResolveImage",
- "CmdSetEvent",
- "CmdResetEvent",
- "CmdMemoryAtomic",
- "CmdBeginQuery",
- "CmdEndQuery",
- "CmdResetQueryPool",
- "CmdWriteTimestamp",
- "CmdInitAtomicCounters",
- "CmdLoadAtomicCounters",
- "CmdSaveAtomicCounters",
- "DbgSetValidationLevel",
- "DbgRegisterMsgCallback",
- "DbgUnregisterMsgCallback",
- "DbgSetMessageFilter",
- "DbgSetObjectTag",
- "DbgSetGlobalOption",
- "DbgSetDeviceOption",
- "CmdDbgMarkerBegin",
- "CmdDbgMarkerEnd",
-
- "WsiX11AssociateConnection",
- "WsiX11GetMSC",
- "WsiX11CreatePresentableImage",
- "WsiX11QueuePresent",
-)
+proto_names = [proto.name for proto in protos]
def does_function_create_object(name):
return name in (