swr: renamed duplicate swr_create_screen()
authorGeorge Kyriazis <george.kyriazis@intel.com>
Thu, 17 Nov 2016 22:21:12 +0000 (16:21 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Mon, 21 Nov 2016 18:44:46 +0000 (12:44 -0600)
There are 2 swr_create_screen() functions.  One in swr_loader.cpp, which
is used during driver init, and the other is hiding in swr_screen.cpp,
which ends up in the arch-specific .dll/.so.

Rename the second one to swr_create_screen_internal(), to avoid confusion
in header files.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/drivers/swr/swr_loader.cpp
src/gallium/drivers/swr/swr_public.h
src/gallium/drivers/swr/swr_screen.cpp

index 2113c371c5fb438fce3f30070a2a1a4813c48e38..9d79fa5fb0d997aeeee03c861cee2949c42b57b6 100644 (file)
@@ -54,7 +54,7 @@ swr_create_screen(struct sw_winsys *winsys)
       exit(-1);
    }
 
-   util_dl_proc pScreenProc = util_dl_get_proc_address(pLibrary, "swr_create_screen");
+   util_dl_proc pScreenProc = util_dl_get_proc_address(pLibrary, "swr_create_screen_internal");
 
    if (!pScreenProc) {
       fprintf(stderr, "SWR library search failure: %s\n", util_dl_error());
index 0814c3b85d61ad6eef09a87b411850338c4aaf0d..7ef81bf8430ddd4bf8204a706e3516573efab684 100644 (file)
@@ -32,8 +32,12 @@ struct sw_displaytarget;
 extern "C" {
 #endif
 
+// driver entry point
 struct pipe_screen *swr_create_screen(struct sw_winsys *winsys);
 
+// arch-specific dll entry point
+PUBLIC struct pipe_screen *swr_create_screen_internal(struct sw_winsys *winsys);
+
 struct sw_winsys *swr_get_winsys(struct pipe_screen *pipe);
 
 struct sw_displaytarget *swr_get_displaytarget(struct pipe_resource *resource);
index cc79f28bad11bb3b6e8f7291b69b4099bb92842e..8a85128603135cb9d8343dd1f192b1b64dbd083e 100644 (file)
@@ -986,7 +986,7 @@ swr_destroy_screen(struct pipe_screen *p_screen)
 
 PUBLIC
 struct pipe_screen *
-swr_create_screen(struct sw_winsys *winsys)
+swr_create_screen_internal(struct sw_winsys *winsys)
 {
    struct swr_screen *screen = CALLOC_STRUCT(swr_screen);