Change GetProcAddr function signature to use XGL types.
authorJon Ashburn <jon@lunarg.com>
Fri, 17 Oct 2014 21:31:22 +0000 (15:31 -0600)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Thu, 30 Oct 2014 00:01:59 +0000 (18:01 -0600)
Fix bug in GPA for basic_plugin.c .

include/xgl.h
include/xglLayer.h
layers/basic_plugin.c
loader/loader.c
xgl.py

index b810c04..64734e1 100644 (file)
@@ -1761,7 +1761,7 @@ typedef struct _XGL_DISPATCH_INDIRECT_CMD
 // ------------------------------------------------------------------------------------------------
 // API functions
 
-void * XGLAPI xglGetProcAddr(
+XGL_VOID * XGLAPI xglGetProcAddr(
     XGL_PHYSICAL_GPU gpu,
     const XGL_CHAR * pName);
 
index f139fff..3295c8d 100644 (file)
@@ -15,7 +15,7 @@
 #  define XGL_LAYER_EXPORT
 #endif
 
-typedef void * (XGLAPI *GetProcAddrType)(XGL_PHYSICAL_GPU gpu, const XGL_CHAR * pName);
+typedef XGL_VOID * (XGLAPI *GetProcAddrType)(XGL_PHYSICAL_GPU gpu, const XGL_CHAR * pName);
 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);
 typedef XGL_RESULT (XGLAPI *GetGpuInfoType)(XGL_PHYSICAL_GPU gpu, XGL_PHYSICAL_GPU_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData);
 typedef XGL_RESULT (XGLAPI *CreateDeviceType)(XGL_PHYSICAL_GPU gpu, const XGL_DEVICE_CREATE_INFO* pCreateInfo, XGL_DEVICE* pDevice);
index e0928c2..3807d49 100644 (file)
@@ -168,7 +168,7 @@ XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglGetFormatInfo(XGL_DEVICE device, XGL_FORMA
        return result;
 }
 
-XGL_LAYER_EXPORT void * XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* pName) {
+XGL_LAYER_EXPORT XGL_VOID * XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL_CHAR* pName) {
     XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
     if (gpu == NULL)
         return NULL;
@@ -256,7 +256,7 @@ XGL_LAYER_EXPORT void * XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL_CH
         return myTable.CreateQueryPool;
     else if (!strncmp("xglGetQueryPoolResults", (const char *) pName, sizeof ("xglGetQueryPoolResults")))
         return myTable.GetQueryPoolResults;
-    else if (!strncmp("xglGetFormatInfo", (const char *) pName, sizeof ("xgllGetFormatInfo")))
+    else if (!strncmp("xglGetFormatInfo", (const char *) pName, sizeof ("xglGetFormatInfo")))
         return xglGetFormatInfo;
     else if (!strncmp("xglCreateImage", (const char *) pName, sizeof ("xglCreateImage")))
         return myTable.CreateImage;
index b561873..0427600 100644 (file)
@@ -739,7 +739,7 @@ LOADER_EXPORT XGL_RESULT xglSetLayers(const XGL_CHAR * pStr)
 
 #endif
 
-LOADER_EXPORT void * XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL_CHAR * pName) {
+LOADER_EXPORT XGL_VOID * XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL_CHAR * pName) {
 
     if (gpu == NULL)
         return NULL;
diff --git a/xgl.py b/xgl.py
index dbdd063..857eea7 100644 (file)
--- a/xgl.py
+++ b/xgl.py
@@ -87,7 +87,7 @@ class Proto(object):
 
 # XGL core API
 core = (
-    Proto("void *", "GetProcAddr",
+    Proto("XGL_VOID *", "GetProcAddr",
         (Param("XGL_PHYSICAL_GPU", "gpu"),
          Param("const XGL_CHAR*", "pName"))),