summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_loader.cpp
diff options
context:
space:
mode:
authorAlok Hota <[email protected]>2018-05-25 10:19:48 -0500
committerTim Rowley <[email protected]>2018-05-25 10:56:55 -0500
commitb3360f5c8b74906187a8801d83f2c4f73f3c025e (patch)
tree990950cca73bb50ce2570fab228586918bca5bd2 /src/gallium/drivers/swr/swr_loader.cpp
parentb6b114c1aeaa996a4bf8c1fd409e8141d18b120c (diff)
swr/rast: Moved memory init out of core swr init
Added two new files for a wrapper function for initialization v2: added missing include for single architecture builds Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_loader.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_loader.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/swr_loader.cpp b/src/gallium/drivers/swr/swr_loader.cpp
index 01b98046462..c5b2e294ef7 100644
--- a/src/gallium/drivers/swr/swr_loader.cpp
+++ b/src/gallium/drivers/swr/swr_loader.cpp
@@ -21,6 +21,7 @@
* IN THE SOFTWARE.
***************************************************************************/
+#include "memory/InitMemory.h"
#include "util/u_cpu_detect.h"
#include "util/u_dl.h"
#include "swr_public.h"
@@ -35,6 +36,7 @@ swr_initialize_screen_interface(struct swr_screen *screen, const char arch[])
#ifdef HAVE_SWR_BUILTIN
screen->pLibrary = NULL;
screen->pfnSwrGetInterface = SwrGetInterface;
+ InitTilesTable();
fprintf(stderr, "(using: builtin).\n");
#else
char filename[256] = { 0 };
@@ -48,7 +50,9 @@ swr_initialize_screen_interface(struct swr_screen *screen, const char arch[])
util_dl_proc pApiProc = util_dl_get_proc_address(screen->pLibrary,
"SwrGetInterface");
- if (!pApiProc) {
+ util_dl_proc pInitFunc = util_dl_get_proc_address(screen->pLibrary,
+ "InitTilesTable");
+ if (!pApiProc || !pInitFunc) {
fprintf(stderr, "(skipping: %s).\n", util_dl_error());
util_dl_close(screen->pLibrary);
screen->pLibrary = NULL;
@@ -56,6 +60,8 @@ swr_initialize_screen_interface(struct swr_screen *screen, const char arch[])
}
screen->pfnSwrGetInterface = (PFNSwrGetInterface)pApiProc;
+ pInitFunc();
+
fprintf(stderr, "(using: %s).\n", filename);
#endif
return true;